Re: #bean...scope=session no longer working?

Lane Sharman <[email protected]>
Newsgroups gmane.comp.java.webmacro.user
Message-ID <[email protected]>
I do not believe the session keyword has ever been propertly interpreted 
and handled as session-bound by the #bean directive.

Keats?

-Lane

Rab Wallace wrote:

>I recently upgraded to Tomcat 5.5.9 and noticed all my
>pages with a #bean...scope=session no longer works
>(scope=page works fine), anyone else seen this?
>
>I tried a simple example:
>A simple bean 'com.myteststuff.Test' has a single long
>attribute 'value' and a getter & setter. In my
>template, I've got:
>
>#bean $test="com.myteststuff.Test" scope=session
>$test.setValue(123)
>
>results in the exception below. If I switch to
>scope=page, everything works fine. Earlier version of
>Tomcat also ok. Thanks for any advice.
>
>Rab Wallace
>
>ps. this problem exists on both the latest Webmacro
>(2.0rc1) and at least the previous version (2.0b1).
>
>
>org.webmacro.PropertyException$NoSuchMethodException:
>No public method setValue(123) on variable $test of
>class org.webmacro.engine.UndefinedMacro at
>jndi:/localhost/metridium_jboss/skins/kelpforest/kelpforest_DefaultMainPage.wm:229.1
>	at
>org.webmacro.engine.PropertyOperator.getProperty(PropertyOperatorCache.java:716)
>	at
>org.webmacro.engine.PropertyOperatorCache.getProperty(PropertyOperatorCache.java:163)
>	at org.webmacro.Context.internalGet(Context.java:383)
>	at org.webmacro.Context.getProperty(Context.java:443)
>	at
>org.webmacro.engine.PropertyVariable.getValue(PropertyVariable.java:52)
>	at
>org.webmacro.engine.Variable.write(Variable.java:211)
>	at org.webmacro.engine.Block.write(Block.java:133)
>	at
>org.webmacro.directive.IfDirective.write(IfDirective.java:210)
>	at org.webmacro.engine.Block.write(Block.java:184)
>	at
>org.webmacro.directive.ForeachDirective.write(ForeachDirective.java:177)
>	at org.webmacro.engine.Block.write(Block.java:145)
>	at
>org.webmacro.directive.IfDirective.write(IfDirective.java:210)
>	at org.webmacro.engine.Block.write(Block.java:199)
>	at
>org.webmacro.engine.WMTemplate.write(WMTemplate.java:324)
>	at
>org.webmacro.engine.WMTemplate.evaluateAsString(WMTemplate.java:253)
>	at
>com.metridia.metridium.servlets.MetridiumServlet.renderPageAlias(MetridiumServlet.java:743)
>	at
>com.metridia.metridium.servlets.MetridiumServlet.doGet(MetridiumServlet.java:598)
>	at
>javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>	at
>javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>	at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>	at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>	at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>	at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>	at
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
>	at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>	at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>	at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>	at
>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>	at
>org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
>	at
>org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
>	at
>org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
>	at
>org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
>	at
>org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
>	at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>	at java.lang.Thread.run(Unknown Source)
>
>
>
>
>
>
>
>
>	
>	
>		
>___________________________________________________________ 
>Yahoo! Messenger - want a free and easy way to contact your friends online? http://uk.messenger.yahoo.com
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by Oracle Space Sweepstakes
>Want to be the first software developer in space?
>Enter now for the Oracle Space Sweepstakes!
>http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
>_______________________________________________
>Webmacro-user mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/webmacro-user
>
>  
>




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.