Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 22 Mar 2008 15:10:28 -0000 Issue 7940

user-digest-help

2008-03-22


Author LoginPost Reply

user Digest 22 Mar 2008 15:10:28 -0000 Issue 7940

Topics (messages 184518 through 184538):

Re: s2 : assigning a variable to jsp
 184518 by: Deepak Kumar
 184519 by: niels
 184520 by: Nils-Helge Garli Hegvik
 184532 by: niels
 184534 by: Nils-Helge Garli Hegvik

Re: struts 2 jsf plugin problem
 184521 by: Daniel
 184527 by: Nils-Helge Garli Hegvik

Re: Exception in running application
 184522 by: Laurie Harper
 184523 by: manjunathmn
 184531 by: aum strut

Re: authentication question
 184524 by: mojoRising

Struts 2.06 to 2.10 Upgrade Problem
 184525 by: cree
 184526 by: Dave Newton
 184528 by: cree

Execute method is not called
 184529 by: mojoRising

Setting default @ParentPackage value
 184530 by: Guillaume Bilodeau

Exception while uploading a .jpg file from ValidatorForm through struts action
 184533 by: Ashima Beri

Running a prepare method before the assigned action method
 184535 by: meeboo
 184537 by: meeboo
 184538 by: meeboo

use continue in <s:iterator>
 184536 by: Kibo

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_184518.ezm (zipped)
Hi,

In Struts 2 you can use <s:set tag.

Check the example at
http://www.roseindia.net/struts/struts2/struts2controltags/set-tag.shtml

Thanks


-----Original Message-----
From: niels [mailto:nielssiem@(protected)]
Sent: Friday, March 21, 2008 4:35 PM
To: user@(protected)
Subject: s2 : assigning a variable to jsp


Hello,

I want to assign a property to a value in jsp.

in struts 1.3 i could do it like:

<bean:define id="assign" name="somename" property="userName"
type="java.lang.String" />

Now I can access the variable via: <%=assign%>

How can i accomplish this in struts2 for a property:
<s:property value="userName"/>


thanks
in advance.

Niels


Attachment: user_184519.ezm (zipped)
Hm,
want the otherway around.

something like:
<s:set name="technologyName" value="%{'Java'}"/>
<%= technologyName %>


On Mar 21, 2008, at 12:11 PM, Deepak Kumar wrote:

> Hi,
>
> In Struts 2 you can use <s:set tag.
>
> Check the example at
> http://www.roseindia.net/struts/struts2/struts2controltags/set-tag.shtml
>
> Thanks
>
>
> -----Original Message-----
> From: niels [mailto:nielssiem@(protected)]
> Sent: Friday, March 21, 2008 4:35 PM
> To: user@(protected)
> Subject: s2 : assigning a variable to jsp
>
>
> Hello,
>
> I want to assign a property to a value in jsp.
>
> in struts 1.3 i could do it like:
>
> <bean:define id="assign" name="somename" property="userName"
> type="java.lang.String" />
>
> Now I can access the variable via: <%=assign%>
>
> How can i accomplish this in struts2 for a property:
> <s:property value="userName"/>
>
>
> thanks
> in advance.
>
> Niels
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>


Attachment: user_184520.ezm (zipped)
Check out the set [1] and property [2] tags. It might also be useful
to read about the tag syntax [3]

[1] - http://struts.apache.org/2.x/docs/set.html
[2] - http://struts.apache.org/2.x/docs/property.html
[3] - http://struts.apache.org/2.x/docs/tag-syntax.html

Nils-H

On Fri, Mar 21, 2008 at 12:05 PM, niels <nielssiem@(protected):
> Hello,
>
> I want to assign a property to a value in jsp.
>
> in struts 1.3 i could do it like:
>
> <bean:define id="assign" name="somename" property="userName"
> type="java.lang.String" />
>
> Now I can access the variable via: <%=assign%>
>
> How can i accomplish this in struts2 for a property:
> <s:property value="userName"/>
>
>
> thanks
> in advance.
>
> Niels

Attachment: user_184532.ezm (zipped)
Hi Nils,

If looks at the docs, but can't find an example where I can set a jsp
variable. I have this situation, I use oscache like:

<cache:cache key="<%=cacheKey%>" time="120">

Where I want to set the jsp string 'cacheKey' with a property from the
value stack..

like (what of course doesn't work):

String cacheKey = "pre_"+<s:property value="pageAlias" />;


Thanks
Niels

On Mar 21, 2008, at 12:59 PM, Nils-Helge Garli Hegvik wrote:

> Check out the set [1] and property [2] tags. It might also be useful
> to read about the tag syntax [3]
>
> [1] - http://struts.apache.org/2.x/docs/set.html
> [2] - http://struts.apache.org/2.x/docs/property.html
> [3] - http://struts.apache.org/2.x/docs/tag-syntax.html
>
> Nils-H
>
> On Fri, Mar 21, 2008 at 12:05 PM, niels <nielssiem@(protected):
>> Hello,
>>
>> I want to assign a property to a value in jsp.
>>
>> in struts 1.3 i could do it like:
>>
>> <bean:define id="assign" name="somename" property="userName"
>> type="java.lang.String" />
>>
>> Now I can access the variable via: <%=assign%>
>>
>> How can i accomplish this in struts2 for a property:
>> <s:property value="userName"/>
>>
>>
>> thanks
>> in advance.
>>
>> Niels
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>


Attachment: user_184534.ezm (zipped)
Ok, that's a bit different... I'm not sure that the S2 tags expose
things as scripting variables (please correct me if I'm wrong)...

I guess you could set the variable to the request scope (or expose it
as a property on your action), and since the FilterDispatcher wraps
the servlet request to look for request attributes on the value stack,
you should be able to look up the attribute in the request, using
regular JSP expressions or JSP EL. This of course assumes that you
don't access the JSP directly, but through an action (which you should
be doing anyway).

Nils-H

On Fri, Mar 21, 2008 at 8:54 PM, niels <nielssiem@(protected):
> Hi Nils,
>
> If looks at the docs, but can't find an example where I can set a jsp
> variable. I have this situation, I use oscache like:
>
> <cache:cache key="<%=cacheKey%>" time="120">
>
> Where I want to set the jsp string 'cacheKey' with a property from the
> value stack..
>
> like (what of course doesn't work):
>
> String cacheKey = "pre_"+<s:property value="pageAlias" />;
>
>
> Thanks
> Niels
>
>
>
> On Mar 21, 2008, at 12:59 PM, Nils-Helge Garli Hegvik wrote:
>
> > Check out the set [1] and property [2] tags. It might also be useful
> > to read about the tag syntax [3]
> >
> > [1] - http://struts.apache.org/2.x/docs/set.html
> > [2] - http://struts.apache.org/2.x/docs/property.html
> > [3] - http://struts.apache.org/2.x/docs/tag-syntax.html
> >
> > Nils-H
> >
> > On Fri, Mar 21, 2008 at 12:05 PM, niels <nielssiem@(protected):
> >> Hello,
> >>
> >> I want to assign a property to a value in jsp.
> >>
> >> in struts 1.3 i could do it like:
> >>
> >> <bean:define id="assign" name="somename" property="userName"
> >> type="java.lang.String" />
> >>
> >> Now I can access the variable via: <%=assign%>
> >>
> >> How can i accomplish this in struts2 for a property:
> >> <s:property value="userName"/>
> >>
> >>
> >> thanks
> >> in advance.
> >>
> >> Niels
> >
>
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
>
>

Attachment: user_184521.ezm (zipped)
I've done what you have said, unfortunately without results. I still
receive index.jsp:16:26: No property editor found for the bean "
javax.el.ValueExpression".

Any other ideas?

On Thu, Mar 20, 2008 at 12:43 PM, Nils-Helge Garli Hegvik <nilsga@(protected)>
wrote:

> First of all, I'm not even sure if it's possible to use the portlet
> and the jsf plugin at the same time. I have not tried, but there might
> be issues with it if they try to do conflicting things in the
> interceptors and the results.
>
> > struts.xml
> >
> > <package name="default" extends="portlet-jsf-default"
> namespace="/view">
> >
> >      <action name="index" class="com.mycompany.HelloAction">
> >         <interceptor-ref name="basicStack"/>
> >         <interceptor-ref name="jsfStack"/>
> >         <result name="success" type="jsf"/>
> >         <result>/WEB-INF/jsp/view/index.jsp</result>
> >      </action>
> >   </package>
> >
>
> A couple of things here. You're extending portlet-jsf-default, which
> still has the jsfStack as the default interceptor ref. Since you have
> defined a "jsf" package that extends "portlet-jsf-default", you should
> probably extend the "jsf" package instead. However, it's probably just
> as easy configuring the correct interceptor stack and default
> interceptor ref right there in the "portlet-jsf-default" package. In
> addition, you're overriding the default interceptor stack in your
> action definition, so it's not really using the portletDefaultStack,
> even if you had configured your default interceptor stack correctly.
> Unless you need to use different interceptors in your action, there's
> no need configuring those interceptor-refs there.
>
> You could also try swapping the order of the portletDefaultStack and
> the jsfStack and see if that makes a difference.
>
> Nils-H
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_184527.ezm (zipped)
Sorry, no clue. As I said, I have no idea if this combination will
work at all. Maybe someone with JSF experience can point out what's
wrong. At least it looks like the portlet dispatcher has been able to
execute the action, but it's failing with the JSF result.

You might want to consider creating your portlet with either JSF or
Struts 2 instead of combining them both.

Nils-H

On Fri, Mar 21, 2008 at 1:55 PM, Daniel <pdaniel2005@(protected):
> I've done what you have said, unfortunately without results. I still
> receive index.jsp:16:26: No property editor found for the bean "
> javax.el.ValueExpression".
>
> Any other ideas?
>
>
> On Thu, Mar 20, 2008 at 12:43 PM, Nils-Helge Garli Hegvik <nilsga@(protected)>
> wrote:
>
>
>
> > First of all, I'm not even sure if it's possible to use the portlet
> > and the jsf plugin at the same time. I have not tried, but there might
> > be issues with it if they try to do conflicting things in the
> > interceptors and the results.
> >
> > > struts.xml
> > >
> > > <package name="default" extends="portlet-jsf-default"
> > namespace="/view">
> > >
> > >      <action name="index" class="com.mycompany.HelloAction">
> > >         <interceptor-ref name="basicStack"/>
> > >         <interceptor-ref name="jsfStack"/>
> > >         <result name="success" type="jsf"/>
> > >         <result>/WEB-INF/jsp/view/index.jsp</result>
> > >      </action>
> > >   </package>
> > >
> >
> > A couple of things here. You're extending portlet-jsf-default, which
> > still has the jsfStack as the default interceptor ref. Since you have
> > defined a "jsf" package that extends "portlet-jsf-default", you should
> > probably extend the "jsf" package instead. However, it's probably just
> > as easy configuring the correct interceptor stack and default
> > interceptor ref right there in the "portlet-jsf-default" package. In
> > addition, you're overriding the default interceptor stack in your
> > action definition, so it's not really using the portletDefaultStack,
> > even if you had configured your default interceptor stack correctly.
> > Unless you need to use different interceptors in your action, there's
> > no need configuring those interceptor-refs there.
> >
> > You could also try swapping the order of the portletDefaultStack and
> > the jsfStack and see if that makes a difference.
> >
> > Nils-H
> >
>
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>

Attachment: user_184522.ezm (zipped)
I'm surprised the application is even serving requests with an exception
starting the filter, and since the cause seems to be a missing OGNL jar,
OGNL expressions presumably wouldn't be working anyhow.

Check that the error really is coming from the application you're
testing, not another one deployed in the same container :-) Then check
to make sure you have the OGNL jar (and all other dependencies) deployed.

L.
aum strut wrote:
> Hi All,
>
> i am running an application, everythingis working fine....application is
> running fine...
> but in the console it is giving an exception.......although the application
> is running fine..
> below is the console output:
>
>
> SEVERE: Exception starting filter struts2
>
> Unable to load bean:
> type:com.opensymphony.xwork2.util.ObjectTypeDeterminerclass:
> com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer - bean -
> jar:file:/E:/MyEclipse/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/Jewellery/WEB-INF/lib/struts2-
> core-2.0.11.jar!/struts-default.xml:36:148
>
> at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(*
> XmlConfigurationProvider.java:208*)
>
> at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(*
> StrutsXmlConfigurationProvider.java:101*)
>
> at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(*
> DefaultConfiguration.java:131*)
>
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(*
> ConfigurationManager.java:52*)
>
> at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(*
> Dispatcher.java:395*)
>
> at org.apache.struts2.dispatcher.Dispatcher.init(*Dispatcher.java:452*)
>
> at org.apache.struts2.dispatcher.FilterDispatcher.init(*
> FilterDispatcher.java:201*)
>
> at org.apache.catalina.core.ApplicationFilterConfig.getFilter(*
> ApplicationFilterConfig.java:275*)
>
> at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(*
> ApplicationFilterConfig.java:397*)
>
> at org.apache.catalina.core.ApplicationFilterConfig.<init>(*
> ApplicationFilterConfig.java:108*)
>
> at org.apache.catalina.core.StandardContext.filterStart(*
> StandardContext.java:3693*)
>
> at org.apache.catalina.core.StandardContext.start(*StandardContext.java:4340
> *)
>
> at org.apache.catalina.core.ContainerBase.addChildInternal(*
> ContainerBase.java:791*)
>
> at org.apache.catalina.core.ContainerBase.addChild(*ContainerBase.java:771*)
>
> at org.apache.catalina.core.StandardHost.addChild(*StandardHost.java:525*)
>
> at org.apache.catalina.startup.HostConfig.deployDirectory(*HostConfig.java
> :920*)
>
> at org.apache.catalina.startup.HostConfig.deployDirectories(*HostConfig.java
> :883*)
>
> at org.apache.catalina.startup.HostConfig.deployApps(*HostConfig.java:492*)
>
> at org.apache.catalina.startup.HostConfig.start(*HostConfig.java:1138*)
>
> at org.apache.catalina.startup.HostConfig.lifecycleEvent(*HostConfig.java
> :311*)
>
> at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(*
> LifecycleSupport.java:117*)
>
> at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java:1053*)
>
> at org.apache.catalina.core.StandardHost.start(*StandardHost.java:719*)
>
> at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java:1045*)
>
> at org.apache.catalina.core.StandardEngine.start(*StandardEngine.java:443*)
>
> at org.apache.catalina.core.StandardService.start(*StandardService.java:516*
> )
>
> at org.apache.catalina.core.StandardServer.start(*StandardServer.java:710*)
>
> at org.apache.catalina.startup.Catalina.start(*Catalina.java:566*)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>
> at java.lang.reflect.Method.invoke(Unknown Source)
>
> at org.apache.catalina.startup.Bootstrap.start(*Bootstrap.java:288*)
>
> at org.apache.catalina.startup.Bootstrap.main(*Bootstrap.java:413*)
>
> Caused by: java.lang.NoClassDefFoundError: *ognl/OgnlException
> *
>
> at java.lang.Class.getDeclaredConstructors0(*Native Method*)
>
> at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
>
> at java.lang.Class.getDeclaredConstructors(Unknown Source)
>
> at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(*
> XmlConfigurationProvider.java:198*)
>
> .... 33 more
>
> Mar 21, 2008 2:58:10 PM org.apache.catalina.core.StandardContext start
>
> SEVERE: Error filterStart
>
>
>
> any pointer in this regard will be much appricated...
>
>
>
> --aum
>


Attachment: user_184523.ezm (zipped)

Hi,

  Please make sure that the you are placing the xwor2 jar in lib folder
and not in Referenced Lib package(if u r using MyEclipse IDE) and specifiy
the opensymphony URI in web.xml.

Thanks.



aum strut wrote:
>
> Hi All,
>
> i am running an application, everythingis working fine....application is
> running fine...
> but in the console it is giving an exception.......although the
> application
> is running fine..
> below is the console output:
>
>
> SEVERE: Exception starting filter struts2
>
> Unable to load bean:
> type:com.opensymphony.xwork2.util.ObjectTypeDeterminerclass:
> com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer - bean -
> jar:file:/E:/MyEclipse/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/Jewellery/WEB-INF/lib/struts2-
> core-2.0.11.jar!/struts-default.xml:36:148
>
> at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(*
> XmlConfigurationProvider.java:208*)
>
> at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(*
> StrutsXmlConfigurationProvider.java:101*)
>
> at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(*
> DefaultConfiguration.java:131*)
>
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(*
> ConfigurationManager.java:52*)
>
> at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(*
> Dispatcher.java:395*)
>
> at org.apache.struts2.dispatcher.Dispatcher.init(*Dispatcher.java:452*)
>
> at org.apache.struts2.dispatcher.FilterDispatcher.init(*
> FilterDispatcher.java:201*)
>
> at org.apache.catalina.core.ApplicationFilterConfig.getFilter(*
> ApplicationFilterConfig.java:275*)
>
> at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(*
> ApplicationFilterConfig.java:397*)
>
> at org.apache.catalina.core.ApplicationFilterConfig.<init>(*
> ApplicationFilterConfig.java:108*)
>
> at org.apache.catalina.core.StandardContext.filterStart(*
> StandardContext.java:3693*)
>
> at
> org.apache.catalina.core.StandardContext.start(*StandardContext.java:4340
> *)
>
> at org.apache.catalina.core.ContainerBase.addChildInternal(*
> ContainerBase.java:791*)
>
> at
> org.apache.catalina.core.ContainerBase.addChild(*ContainerBase.java:771*)
>
> at org.apache.catalina.core.StandardHost.addChild(*StandardHost.java:525*)
>
> at org.apache.catalina.startup.HostConfig.deployDirectory(*HostConfig.java
> :920*)
>
> at
> org.apache.catalina.startup.HostConfig.deployDirectories(*HostConfig.java
> :883*)
>
> at
> org.apache.catalina.startup.HostConfig.deployApps(*HostConfig.java:492*)
>
> at org.apache.catalina.startup.HostConfig.start(*HostConfig.java:1138*)
>
> at org.apache.catalina.startup.HostConfig.lifecycleEvent(*HostConfig.java
> :311*)
>
> at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(*
> LifecycleSupport.java:117*)
>
> at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java:1053*)
>
> at org.apache.catalina.core.StandardHost.start(*StandardHost.java:719*)
>
> at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java:1045*)
>
> at
> org.apache.catalina.core.StandardEngine.start(*StandardEngine.java:443*)
>
> at
> org.apache.catalina.core.StandardService.start(*StandardService.java:516*
> )
>
> at
> org.apache.catalina.core.StandardServer.start(*StandardServer.java:710*)
>
> at org.apache.catalina.startup.Catalina.start(*Catalina.java:566*)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>
> at java.lang.reflect.Method.invoke(Unknown Source)
>
> at org.apache.catalina.startup.Bootstrap.start(*Bootstrap.java:288*)
>
> at org.apache.catalina.startup.Bootstrap.main(*Bootstrap.java:413*)
>
> Caused by: java.lang.NoClassDefFoundError: *ognl/OgnlException
> *
>
> at java.lang.Class.getDeclaredConstructors0(*Native Method*)
>
> at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
>
> at java.lang.Class.getDeclaredConstructors(Unknown Source)
>
> at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(*
> XmlConfigurationProvider.java:198*)
>
> ... 33 more
>
> Mar 21, 2008 2:58:10 PM org.apache.catalina.core.StandardContext start
>
> SEVERE: Error filterStart
>
>
>
> any pointer in this regard will be much appricated...
>
>
>
> --aum
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184531.ezm (zipped)
hi all,

As far as concern with the .jar files
both the jars are there in the lib folderas moreover there is only one
application deployed in the container with which i m working.

can u just clear me about the point regarding opensymphony URI in web.xml.

--aum


On 3/21/08, manjunathmn <manjunatha.mn08@(protected):
>
>
> Hi,
>
>   Please make sure that the you are placing the xwor2 jar in lib folder
> and not in Referenced Lib package(if u r using MyEclipse IDE) and specifiy
> the opensymphony URI in web.xml.
>
> Thanks.
>
>
>
> aum strut wrote:
> >
> > Hi All,
> >
> > i am running an application, everythingis working fine....application is
> > running fine...
> > but in the console it is giving an exception.......although the
> > application
> > is running fine..
> > below is the console output:
> >
> >
> > SEVERE: Exception starting filter struts2
> >
> > Unable to load bean:
> > type:com.opensymphony.xwork2.util.ObjectTypeDeterminerclass:
> > com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer - bean -
> >
> jar:file:/E:/MyEclipse/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/Jewellery/WEB-INF/lib/struts2-
> > core-2.0.11.jar!/struts-default.xml:36:148
> >
> > at
> >
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register
> (*
> > XmlConfigurationProvider.java:208*)
> >
> > at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(*
> > StrutsXmlConfigurationProvider.java:101*)
> >
> > at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(*
> > DefaultConfiguration.java:131*)
> >
> > at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration
> (*
> > ConfigurationManager.java:52*)
> >
> > at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(*
> > Dispatcher.java:395*)
> >
> > at org.apache.struts2.dispatcher.Dispatcher.init(*Dispatcher.java:452*)
> >
> > at org.apache.struts2.dispatcher.FilterDispatcher.init(*
> > FilterDispatcher.java:201*)
> >
> > at org.apache.catalina.core.ApplicationFilterConfig.getFilter(*
> > ApplicationFilterConfig.java:275*)
> >
> > at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(*
> > ApplicationFilterConfig.java:397*)
> >
> > at org.apache.catalina.core.ApplicationFilterConfig.<init>(*
> > ApplicationFilterConfig.java:108*)
> >
> > at org.apache.catalina.core.StandardContext.filterStart(*
> > StandardContext.java:3693*)
> >
> > at
> > org.apache.catalina.core.StandardContext.start(*StandardContext.java
> :4340
> > *)
> >
> > at org.apache.catalina.core.ContainerBase.addChildInternal(*
> > ContainerBase.java:791*)
> >
> > at
> > org.apache.catalina.core.ContainerBase.addChild(*ContainerBase.java
> :771*)
> >
> > at org.apache.catalina.core.StandardHost.addChild(*StandardHost.java
> :525*)
> >
> > at org.apache.catalina.startup.HostConfig.deployDirectory(*
> HostConfig.java
> > :920*)
> >
> > at
> > org.apache.catalina.startup.HostConfig.deployDirectories(*
> HostConfig.java
> > :883*)
> >
> > at
> > org.apache.catalina.startup.HostConfig.deployApps(*HostConfig.java:492*)
> >
> > at org.apache.catalina.startup.HostConfig.start(*HostConfig.java:1138*)
> >
> > at org.apache.catalina.startup.HostConfig.lifecycleEvent(*
> HostConfig.java
> > :311*)
> >
> > at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(*
> > LifecycleSupport.java:117*)
> >
> > at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
> :1053*)
> >
> > at org.apache.catalina.core.StandardHost.start(*StandardHost.java:719*)
> >
> > at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
> :1045*)
> >
> > at
> > org.apache.catalina.core.StandardEngine.start(*StandardEngine.java:443*)
> >
> > at
> > org.apache.catalina.core.StandardService.start(*StandardService.java
> :516*
> > )
> >
> > at
> > org.apache.catalina.core.StandardServer.start(*StandardServer.java:710*)
> >
> > at org.apache.catalina.startup.Catalina.start(*Catalina.java:566*)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >
> > at java.lang.reflect.Method.invoke(Unknown Source)
> >
> > at org.apache.catalina.startup.Bootstrap.start(*Bootstrap.java:288*)
> >
> > at org.apache.catalina.startup.Bootstrap.main(*Bootstrap.java:413*)
> >
> > Caused by: java.lang.NoClassDefFoundError: *ognl/OgnlException
> > *
> >
> > at java.lang.Class.getDeclaredConstructors0(*Native Method*)
> >
> > at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> >
> > at java.lang.Class.getDeclaredConstructors(Unknown Source)
> >
> > at
> >
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register
> (*
> > XmlConfigurationProvider.java:198*)
> >
> > ... 33 more
> >
> > Mar 21, 2008 2:58:10 PM org.apache.catalina.core.StandardContext start
> >
> > SEVERE: Error filterStart
> >
> >
> >
> > any pointer in this regard will be much appricated...
> >
> >
> >
> > --aum
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Exception-in-running-application-tp16195876p16197714.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_184524.ezm (zipped)

I have moved all JSP's under WEB-INF directory (e.g.
/WEB-INF/pages/login.jsp), and this solution seems to work perfectly on my
local environment with exploded directory structure. However, Struts seems
to not be working at all when we package and deploy an ear file (before I
moved the jsp's it had been working with ear deployment)...I am still
troubleshooting, but any ideas what could be the issue here?

Thanks

John


Jeromy Evans - Blue Sky Minds wrote:
>
> I've been told that some older containers don't allow you to forward to
> JSP's behind /WEB-INF. It wouldn't surprise me.
> Other than that I've found Ian's suggestion to be the most effective way
> to ensure users can't access JSPs directly, IMO a must for Tiles, html
> fragments and any page using struts tags.
>
> The only issue I've experienced is when (bad) scriptets within the JSP
> manipulate the request object directly, which is assumed to use the
> /xxx.jsp URI but is actually /WEB-INF/results/xxx.jsp.
>
> Many would argue that best practice is to not use JSPs at all. Another
> group would argue that Acegi should be used rather than rolling your own
> filter.
>
> Hope that helps.
>
> mojoRising wrote:
>> Is this considered the Best Practice: Keeping all JSP's under the WEB-INF
>> directory? We have not done that on my project, I am curious if there are
>> plus' and minus' to this?
>>
>> Thanks,
>> John
>>
>>
>> The easiest way is to always have the user call an action to get a JSP,
>> even if it is a simple page. You then also ensure that all data
>> necessary for that page has been obtained. The, by placing the JSP's in
>> the WEB-INF directory you will prevent access directly from a browser
>> (only from the s2 dispatcher).
>>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184525.ezm (zipped)

I have been working on this for a couple hours now and I just cannot resolve
it. I have been running an earlier version of struts 2 and from my reading
to gain struts-dojo-tags support I need to run on struts 2.1. I have
downloaded the struts 2.1 zip file and have replaced all old struts 2.06
with struts 2.1 jar files.

This is apparently the only error I have recieved thus far. From more
reading others suggest missing jar files. I have all minimum required, at
this point I am not really sure why it says it cannot find this jar file.
It is the xwork-2.1.0.jar file from what I have seen. Here is a list of all
the required jar files of which I have:
xwork-2.1.0.jar
commons-logging-1.0.4.jar
struts2-core-2.1.0.jar
freemarker-2.3.10.jar
ognl-2.6.11.jar

Thanks in advance



Unable to load bean: type:com.opensymphony.xwork2.util.ValueStackFactory
class:com.opensymphony.xwork2.ognl.OgnlValueStackFactory - bean -
jar:file:.../WEB-INF/lib/struts2-core-2.1.0.jar!/struts-default.xml:69:-1
 at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register (XmlConfigurationProvider.java:208)
 at
org.apache.struts2.config.StrutsXmlConfigurationProvider.register (StrutsXmlConfigurationProvider.java:99)
 at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload (DefaultConfiguration.java:131)
 at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (ConfigurationManager.java:52)
 at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration (Dispatcher.java:373)
 at org.apache.struts2.dispatcher.Dispatcher.init (Dispatcher.java:426)
 at
org.apache.struts2.dispatcher.FilterDispatcher.init (FilterDispatcher.java:211)
 at
org.apache.catalina.core.ApplicationFilterConfig.getFilter (ApplicationFilterConfig.java:223)
 at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (ApplicationFilterConfig.java:304)
 at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
 at
org.apache.catalina.core.StandardContext.filterStart (StandardContext.java:3600)
 at
org.apache.catalina.core.StandardContext.start (StandardContext.java:4193)
 at
org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:759)
 at org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:739)
 at org.apache.catalina.core.StandardHost.addChild (StandardHost.java:524)
 at org.apache.catalina.startup.HostConfig.deployWAR (HostConfig.java:809)
 at org.apache.catalina.startup.HostConfig.deployWARs (HostConfig.java:698)
 at org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java:472)
 at org.apache.catalina.startup.HostConfig.start (HostConfig.java:1122)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:310)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:119)
 at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1021)
 at org.apache.catalina.core.StandardHost.start (StandardHost.java:718)
 at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1013)
 at org.apache.catalina.core.StandardEngine.start (StandardEngine.java:442)
 at org.apache.catalina.core.StandardService.start (StandardService.java:450)
 at org.apache.catalina.core.StandardServer.start (StandardServer.java:709)
 at org.apache.catalina.startup.Catalina.start (Catalina.java:551)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:294)
 at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:432)
Caused by: java.lang.IncompatibleClassChangeError: Implementing class
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at
org.apache.catalina.loader.WebappClassLoader.findClassInternal (WebappClassLoader.java:1812)
 at
org.apache.catalina.loader.WebappClassLoader.findClass (WebappClassLoader.java:866)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1319)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1198)
 at
com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass (ClassLoaderUtil.java:139)
 at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register (XmlConfigurationProvider.java:180)
 ... 33 more
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184526.ezm (zipped)
--- cree <vint@(protected):
> I have been running an earlier version of struts 2 and from my reading
> to gain struts-dojo-tags support I need to run on struts 2.1. I have
> downloaded the struts 2.1 zip file and have replaced all old struts 2.06
> with struts 2.1 jar files.
>
> This is apparently the only error I have recieved thus far. From more
> reading others suggest missing jar files. I have all minimum required, at
> this point I am not really sure why it says it cannot find this jar file.

It doesn't say it can't find the jar file; it says it's unable to load the
bean.

> Unable to load bean: type:com.opensymphony.xwork2.util.ValueStackFactory
> class:com.opensymphony.xwork2.ognl.OgnlValueStackFactory - bean -
> [...]
> Caused by: java.lang.IncompatibleClassChangeError: Implementing class

You can't just stop reading a stack trace at the top line :)

That said:

- If you want the *new* Dojo tags, yes, you need 2.1. If the tags from 2.0
are adequate, then you don't.
- S2.1 isn't released, so there can always be unexpected issues.

Personally I'd try creating a "sanity check" 2.1.0 (if you're dead-set on
using that; personally I'd use trunk) which is nothing more than a "hello,
world" app to make sure it works rather than blindly replacing your current
app with 2.1 jars. If you're not interested in doing that, I'd try doing a
complete clean and redeploy and make sure that the old libraries are not
being deployed or are still there; without really thinking about it it sounds
like there could be two versions of a library on the classpath etc.

I haven't had any startup issues with 2.1.0 or 2.1.1 (trunk), so I'd suspect
environmental issues first.

Dave


Attachment: user_184528.ezm (zipped)

Thanks for the response, my final thought was what you mentioned that there
are two (or more) sets of jars competing causing an environment issue. I
guess this was one of those "I hope there is an unresolved problem before I
go through all the jars that need to be replaced" =).

I will consider what you have mentioned and see if I can resolve this
problem.

Thanks again,

John

newton.dave wrote:
>
> --- cree <vint@(protected):
>> I have been running an earlier version of struts 2 and from my reading
>> to gain struts-dojo-tags support I need to run on struts 2.1. I have
>> downloaded the struts 2.1 zip file and have replaced all old struts 2.06
>> with struts 2.1 jar files.
>>
>> This is apparently the only error I have recieved thus far. From more
>> reading others suggest missing jar files. I have all minimum required,
>> at
>> this point I am not really sure why it says it cannot find this jar file.
>
> It doesn't say it can't find the jar file; it says it's unable to load the
> bean.
>
>> Unable to load bean: type:com.opensymphony.xwork2.util.ValueStackFactory
>> class:com.opensymphony.xwork2.ognl.OgnlValueStackFactory - bean -
>> [...]
>> Caused by: java.lang.IncompatibleClassChangeError: Implementing class
>
> You can't just stop reading a stack trace at the top line :)
>
> That said:
>
> - If you want the *new* Dojo tags, yes, you need 2.1. If the tags from 2.0
> are adequate, then you don't.
> - S2.1 isn't released, so there can always be unexpected issues.
>
> Personally I'd try creating a "sanity check" 2.1.0 (if you're dead-set on
> using that; personally I'd use trunk) which is nothing more than a "hello,
> world" app to make sure it works rather than blindly replacing your
> current
> app with 2.1 jars. If you're not interested in doing that, I'd try doing a
> complete clean and redeploy and make sure that the old libraries are not
> being deployed or are still there; without really thinking about it it
> sounds
> like there could be two versions of a library on the classpath etc.
>
> I haven't had any startup issues with 2.1.0 or 2.1.1 (trunk), so I'd
> suspect
> environmental issues first.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184529.ezm (zipped)

I apologize for the vague nature of this question. To clarify, I have a login
page that works for the input method, but will not call the execute method.
I have logging comments that show that when I call the action for my form,
the prepare method fires, then the validate method completes(without
errors), and then it just stops...it never calls the execute method. Any
idea what could cause that?

My form tag:
<s:form validate="true" cssClass="goLoginTable" action="login_execute"
method="post" namespace="/pages" theme="goForm" >

My struts.xml file:

<package name="pages" namespace="/pages" extends="AveroSecure">  
    <action name="login_*" method="{1}" class="pages.Login">    
        <interceptor-ref name="paramsPrepareParamsStack"/>    
        <result name="execute">/WEB-INF/pages/login.jsp</result>
        <result name="input">/WEB-INF/pages/login.jsp</result>
        <result name="error">/WEB-INF/pages/login.jsp</result>                  
        <result name="success" type="redirect-action">
          terms_input  
           /userMgmt
          true
          true
          login
        </result>
       
    </action>
       
    <action name="*" class="pages.Support">
       <result>/WEB-INF/pages/{1}.jsp</result>
    </action>
   
    <action name="logout" class="pages.Logout">
       <result>/WEB-INF/pages/logout.jsp</result>
    </action>    
  </package>




mojoRising wrote:
>
> I have moved all JSP's under WEB-INF directory (e.g.
> /WEB-INF/pages/login.jsp), and this solution seems to work perfectly on my
> local environment with exploded directory structure. However, Struts seems
> to not be working at all when we package and deploy an ear file (before I
> moved the jsp's it had been working with ear deployment)...I am still
> troubleshooting, but any ideas what could be the issue here?
>
> Thanks
>
> John
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184530.ezm (zipped)

Hi guys,

I've spent some time migrating my Struts2 app configuration from struts.xml
to annotations. So far so good, it's nice having configuration next to
actual code.

One thing that's bothering me is the fact that I need to put a
@ParentPackage annotation on each action class for it to pick up my custom
package (with custom interceptors). I have tried doing this with the
CodeBehind plugin but the class doesn't seem to be bound to the package in
the end.

Isn't there a constant in ZeroConfig that would do exactly this?

Thanks,
GB

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184533.ezm (zipped)

Hi All,
I am trying to upload a .jpg file through my struts action.
Below is my set up

In the jsp :

<html:file property="filePath" size="20" maxlength="200"/>


In the form I have a FormFile property as :

class MyForm extends ValidatorForm{
      private FormFile filePath;
      // corresponding getter and setter
}


On submitting my jsp i get the following exception.

STACK TRACE:  java.lang.IllegalArgumentException: argument type mismatch
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Property
Utils.java:1789)
    at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(Property
Utils.java:1684)
    at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.
java:1713)
    at
org.apache.commons.beanutils.BeanUtils.setProperty (BeanUtils.java:101
9)
    at
org.apache.commons.beanutils.BeanUtils.populate (BeanUtils.java:808)
    at
org.apache.struts.util.RequestUtils.populate (RequestUtils.java:1096)
    at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProc
essor.java:816)
    at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:254)
    at
org.apache.struts.action.ActionServlet.process (ActionServlet.java:142
0)
    at
org.apache.struts.action.ActionServlet.doPost (ActionServlet.java:520)

    at javax.servlet.http.HttpServlet.service (HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service (HttpServlet.java:803)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:269)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
    at
com.readersdigest.rd.filter.BreadcrumbFilter.doFilter(BreadcrumbFilte
r.java:108)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
    at
com.readersdigest.servlet.filters.DisableUrlSessionFilter.doFilter(Di
sableUrlSessionFilter.java:59)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
    at
com.readersdigest.edwrr.filter.GenericRequestValuesFilter.doFilter(Ge
nericRequestValuesFilter.java:138)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
    at
com.readersdigest.servlet.filters.GrabTrackingParametersFilter.doFilt
er(GrabTrackingParametersFilter.java:81)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
    at
com.readersdigest.servlet.filters.HibernateFilter.doFilter(HibernateF
ilter.java:81)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
    at
com.readersdigest.servlet.filters.SetCharacterEncodingFilter.doFilter
(SetCharacterEncodingFilter.java:134)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:174)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
    at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationVa
lve.java:347)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:108)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:151)
    at
org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java:200)

    at
org.apache.jk.common.HandlerRequest.invoke (HandlerRequest.java:283)
    at org.apache.jk.common.ChannelSocket.invoke (ChannelSocket.java:773)
    at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.ja
va:703)
    at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSock
et.java:895)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:689)
    at java.lang.Thread.run(Unknown Source)




I have absolutely no clue how to debug this. Any suggestions are very
welcomed.


Thanks
Ashima

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184535.ezm (zipped)

Hi all

I have a class for several actions and each action is mapped to a method,
like this:

<action name="update/modelObject"
      class="net.myapp.web.modelObjectActions"
      method="update">
<result>/index.jsp</result>
</action>

The above action will fire when a form is submitted and the modelObject
properties are populated via the form fields. Now that I want is to invoke a
prepare method before the update method so that I first can read the model
object from the database and then populate its fields. I did implement
preparable in modelObjectActions but then the prepare method will be invoked
before all actions in that class, I want it to be invoked just for this
specific action.

Any ideas?

Thanks
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184537.ezm (zipped)

Ahh nevermind the first mail, I managed to work around it.

I still have a problem of not being able to access parameters via my prepare
method though. Here's my action class:

public class UserActions extends StrutsSupport implements Preparable {

 public void prepare()
 {
 if(id != null) //property is located in superclass StrutsSupport
   user= appManager.readUser(Long.valueOf(id));
 }

}

and the struts mapping:
<action name="update/user/*"
       class="net.myapp.web.UserActions">
  <interceptor-ref name="paramsPrepareParamsStack"/>  
  {1}
  <result>/models/user/update.jsp</result>
</action>

The whole flow is that when you access the above action the user object is
read and its values populate the form in update.jsp. But the id property is
never set so the form is never populated. I even tried setting
paramsPrepareParamsStack as the default stack but with no luck.


meeboo wrote:
>
> Hi all
>
> I have a class for several actions and each action is mapped to a method,
> like this:
>
> <action name="update/modelObject"
>        class="net.myapp.web.modelObjectActions"
>        method="update">
> <result>/index.jsp</result>
> </action>
>
> The above action will fire when a form is submitted and the modelObject
> properties are populated via the form fields. Now that I want is to invoke
> a prepare method before the update method so that I first can read the
> model object from the database and then populate its fields. I did
> implement preparable in modelObjectActions but then the prepare method
> will be invoked before all actions in that class, I want it to be invoked
> just for this specific action.
>
> Any ideas?
>
> Thanks
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184538.ezm (zipped)

It seems as if the preparable method can't parse parameters if they are in
the following format

update/modelObject/10.action (where 10.action is the primary key)

where as it works fine when using action urls like this
update/modelObject?10.action

Is this expected behavior?


meeboo wrote:
>
> Hi all
>
> I have a class for several actions and each action is mapped to a method,
> like this:
>
> <action name="update/modelObject"
>        class="net.myapp.web.modelObjectActions"
>        method="update">
> <result>/index.jsp</result>
> </action>
>
> The above action will fire when a form is submitted and the modelObject
> properties are populated via the form fields. Now that I want is to invoke
> a prepare method before the update method so that I first can read the
> model object from the database and then populate its fields. I did
> implement preparable in modelObjectActions but then the prepare method
> will be invoked before all actions in that class, I want it to be invoked
> just for this specific action.
>
> Any ideas?
>
> Thanks
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184536.ezm (zipped)

Hi conference

Can I use "continue" in struts tag <s:iterator> ?
----------------------------------------------------------
from:

for (Category cat : category){  
     
     if (cat.getId() == 1)
         continue;
     
     System.out.println(cat.getName());          
    }
-----------------------------------------------------------------------------
to:

<s:iterator value="category" status="rowstatus" >  
   <s:if test="id == 1">   ?????????????   </s:if>                  
   <li><s:property value="name"/></li>          
</s:iterator>
-------------------------------------------------
Thaks for help
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.