Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 14 Jul 2008 23:52:44 -0000 Issue 8141

user-digest-help

2008-07-14


Author LoginPost Reply

user Digest 14 Jul 2008 23:52:44 -0000 Issue 8141

Topics (messages 188867 through 188896):

Tiles questions
 188867 by: Zhang, Larry (L.)
 188868 by: Zhang, Larry (L.)
 188869 by: Alberto A. Flores

Re: message resources ???key??? displaying
 188870 by: danipruebas.adw.es
 188872 by: Dante A. Castiglione Maldonado
 188873 by: Lukasz Lenart
 188874 by: danipruebas.adw.es

Re: [S2] NPE when using struts form tags in sitemesh decorator
 188871 by: Musachy Barroso
 188875 by: Piero Sartini
 188877 by: Musachy Barroso

Re: [S2] newly-created Session context
 188876 by: Gabriel Belingueres
 188881 by: Pierre Thibaudeau
 188882 by: Pierre Thibaudeau
 188885 by: Gabriel Belingueres
 188888 by: Pierre Thibaudeau
 188889 by: Gabriel Belingueres
 188892 by: Pierre Thibaudeau
 188895 by: Gabriel Belingueres

S2 Locale sensitive validations
 188878 by: stanlick

Issue in Validation value Stack - Duplicate error messages
 188879 by: MaheshK
 188883 by: Lukasz Lenart
 188884 by: MaheshK

Re: about iterating values
 188880 by: Milan Milanovic

Where to get latest binaries
 188886 by: Struts Two
 188896 by: Wes Wannemacher

Re: Referring to Properties object via OGNL?
 188887 by: Dave Belfer-Shevett

Re: Struts 2 Indexed Properties
 188890 by: Jishnu Viswanath

messages_(locale).properties
 188891 by: Jishnu Viswanath

Validator plugin error
 188893 by: danipruebas.adw.es

Re: REST plugin URL syntax
 188894 by: Mike Watson

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_188867.ezm (zipped)
I have a mainLayout which has a header, body and footer.(and thus I have
4 jsps, mainLayout.jsp, header.jsp, body.jsp, and footer.jsp, and notice
that body.jsp will be different for each different screen page).

One setting can be of:

<!-- shared by all -->
<definition name="mainLayout" path="/jsp/common/mainLayout.jsp">
    <put name="header" value="/jsp/common/header.jsp" />
  <put name="body" value="" />
    <put name="footer" value="/jsp/common/footer.jsp" />
</definition>

<!-- this is different from each screen page -->
<definition name="viewemployee" extends="mainLayout">
 <put name="body" value="/jsp/employee/employee.jsp" />
</definition>  
 

Then I have a further requirement: Manager pages's body has left, middle
and right. All manager pages will have common left and right, but middle
will be different. So I define the managerBody like

 <!-- every manager page shares this -->
  <definition name="managerBody"
path="/jsp/common/managerBodyLayout.jsp">
   <put name="left" value="/jsp/common/left.jsp"/>
   <put name="middle" value=""/>
   <put name="right" value="/jsp/common/right.jsp"/>
 </definition>

Then if I have managerPage1, I can define as:

<definition name="managerPage1" extends="mainLayout">
     <put name="bodyContent" value="managerBody"/>
   <put name="middle"
value="/jsp/manager/managerMiddle1.jsp"/>"/>
</definition>  

Unfortunately, this doesn't work. Can somebody help? Thanks.

Attachment: user_188868.ezm (zipped)


I have a mainLayout which has a header, body and footer.(and thus I have
4 jsps, mainLayout.jsp, header.jsp, body.jsp, and footer.jsp, and notice
that body.jsp will be different for each different screen page).

One setting can be of:

<!-- shared by all -->
<definition name="mainLayout" path="/jsp/common/mainLayout.jsp">
    <put name="header" value="/jsp/common/header.jsp" />
  <put name="body" value="" />
    <put name="footer" value="/jsp/common/footer.jsp" />
</definition>

<!-- this is different from each screen page -->
<definition name="viewemployee" extends="mainLayout">
 <put name="body" value="/jsp/employee/employee.jsp" />
</definition>  
 

Then I have a further requirement: Manager pages's body has left, middle
and right. All manager pages will have common left and right, but middle
will be different. So I define the managerBody like

 <!-- every manager page shares this -->
  <definition name="managerBody"
path="/jsp/common/managerBodyLayout.jsp">
   <put name="left" value="/jsp/common/left.jsp"/>
   <put name="middle" value=""/>
   <put name="right" value="/jsp/common/right.jsp"/>
 </definition>

Then if I have managerPage1, I can define as:

<definition name="managerPage1" extends="mainLayout">
     <put name="body" value="managerBody"/>
   <put name="middle"
value="/jsp/manager/managerMiddle1.jsp"/>"/>
</definition>  

Unfortunately, this doesn't work. Can somebody help? Thanks.

Attachment: user_188869.ezm (zipped)
That's because the tiles inheritance you are trying to use doesn't make
sense. The managerPage1 tile does NOT have a "middle" element in the
parent tile (which is defined in the managerBody tile). You probably
need to use a different strategy, perhaps check the role and forward to
the proper tile (tile layout for managers and tile layout for non-managers).

Zhang, Larry (L.) wrote:
>
> I have a mainLayout which has a header, body and footer.(and thus I have
> 4 jsps, mainLayout.jsp, header.jsp, body.jsp, and footer.jsp, and notice
> that body.jsp will be different for each different screen page).
>
> One setting can be of:
>
> <!-- shared by all -->
> <definition name="mainLayout" path="/jsp/common/mainLayout.jsp">
>      <put name="header" value="/jsp/common/header.jsp" />
>   <put name="body" value="" />
>      <put name="footer" value="/jsp/common/footer.jsp" />
> </definition>
>
> <!-- this is different from each screen page -->
> <definition name="viewemployee" extends="mainLayout">
>   <put name="body" value="/jsp/employee/employee.jsp" />
> </definition>  
>  
>
> Then I have a further requirement: Manager pages's body has left, middle
> and right. All manager pages will have common left and right, but middle
> will be different. So I define the managerBody like
>
>  <!-- every manager page shares this -->
>   <definition name="managerBody"
> path="/jsp/common/managerBodyLayout.jsp">
>    <put name="left" value="/jsp/common/left.jsp"/>
>    <put name="middle" value=""/>
>    <put name="right" value="/jsp/common/right.jsp"/>
>  </definition>
>
> Then if I have managerPage1, I can define as:
>
> <definition name="managerPage1" extends="mainLayout">
>      <put name="body" value="managerBody"/>
>    <put name="middle"
> value="/jsp/manager/managerMiddle1.jsp"/>"/>
> </definition>  
>
> Unfortunately, this doesn't work. Can somebody help? Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

--

Alberto A. Flores
http://www.linkedin.com/in/aflores


Attachment: user_188870.ezm (zipped)
It is configured as:

struts-config.xml
<message-resources parameter="ApplicationResources" null="false" />

In web.xml is not defined.

The ApplicationResources.properties file is under:
proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties

And the jsp code:

<logic:messagesPresent message="true">
<html:messages id="msgs" message="true">
<bean:write name="msgs"/>
</html:messages >
</logic:messagesPresent >

Is something wrong about the path/classpath? Do I need to add a key to
<message-resources parameter="ApplicationResources".. key="whatever">??

Regards,


----- Original Message -----
From: "Lukasz Lenart" <lukasz.lenart@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Monday, July 14, 2008 6:32 PM
Subject: Re: message resources ???key??? displaying


> Hi,
>
> How did you configure the messages in struts-config? It should be
> something like this:
>
> <message-resources parameter="MessageResources"/>
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
> Email procesado por MailFoundry
>


Attachment: user_188872.ezm (zipped)
I got the same problem a few moments ago

I put the ApplicationResources.properties file under WEB-INF/classes
and it worked ok


2008/7/14 <danipruebas@(protected)>:
> It is configured as:
>
> struts-config.xml
> <message-resources parameter="ApplicationResources" null="false" />
>
> In web.xml is not defined.
>
> The ApplicationResources.properties file is under:
> proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties
>
> And the jsp code:
>
> <logic:messagesPresent message="true">
> <html:messages id="msgs" message="true">
> <bean:write name="msgs"/>
> </html:messages >
> </logic:messagesPresent >
>
> Is something wrong about the path/classpath? Do I need to add a key to
> <message-resources parameter="ApplicationResources".. key="whatever">??
>
> Regards,
>
>
> ----- Original Message ----- From: "Lukasz Lenart"
> <lukasz.lenart@(protected)>
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Monday, July 14, 2008 6:32 PM
> Subject: Re: message resources ???key??? displaying
>
>
>> Hi,
>>
>> How did you configure the messages in struts-config? It should be
>> something like this:
>>
>> <message-resources parameter="MessageResources"/>
>>
>>
>> Regards
>> --
>> Lukasz
>> http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>> Email procesado por MailFoundry
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188873.ezm (zipped)
> The ApplicationResources.properties file is under:
> proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties

Move to the /WEB-INF/classes


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188874.ezm (zipped)
Hi,

That was the correct path, I didn´t know about it.
Thank you for your answers, guys. ;-)


----- Original Message -----
From: "Lukasz Lenart" <lukasz.lenart@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Monday, July 14, 2008 8:22 PM
Subject: Re: message resources ???key??? displaying


>> The ApplicationResources.properties file is under:
>> proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties
>
> Move to the /WEB-INF/classes
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
> Email procesado por MailFoundry
>


Attachment: user_188871.ezm (zipped)
Don is still working on those changes, you could open a ticket to make
sure everything gets documented.

musachy

On Mon, Jul 14, 2008 at 1:22 PM, Piero Sartini <lists@(protected):
> Ok, the problem was that since 2.1.3 the filters changed:
>
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
> instead of ActionContextCleanup and
> org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
> instead of the FilterDispatcher.
>
> Now everything works like expected. I will update the wiki of the sitemesh
> plugin ..
>
> Am Montag, 14. Juli 2008 15:23:16 schrieb Piero Sartini:
>> The S2 version is 2.1.3-SNAPSHOT. The exact same project was working some
>> time ago with 2.1.1-SNAPSHOT. So maybe this is something that got broken in
>> newer builds.
>>
>> The problem seems to be that Freemarker can't get its configuration at this
>> point. But ActionContextCleanUp is the first filter in chain, and tags like
>> @s.url do work, only the form and input fields do not work.
>>
>> If I try the exact same form outside the decorator in a normal, decorated
>> page, everything works like expected.
>>
>> Any ideas?
>>
>> java.lang.NullPointerException
>>      at
>> org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration(Free
>>markerManager.java:159) at
>> org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTempl
>>ate(FreemarkerTemplateEngine.java:90) at
>> org.apache.struts2.components.UIBean.mergeTemplate (UIBean.java:558) at
>> org.apache.struts2.components.Submit.end (Submit.java:109) at
>> org.apache.struts2.views.freemarker.tags.CallbackWriter.afterBody(CallbackW
>>riter.java:84) at freemarker.core.Environment.visit (Environment.java:299) at
>> freemarker.core.UnifiedCall.accept (UnifiedCall.java:130) at
>> freemarker.core.Environment.visit (Environment.java:208) at
>> freemarker.core.MixedContent.accept (MixedContent.java:92) at
>> freemarker.core.Environment.visit (Environment.java:208) at
>> freemarker.core.Environment.include (Environment.java:1477) at
>> freemarker.core.Include.accept (Include.java:169)
>>     at freemarker.core.Environment.visit (Environment.java:208)
>>      at freemarker.core.MixedContent.accept (MixedContent.java:92)
>>      at freemarker.core.Environment.visit (Environment.java:208)
>>      at freemarker.core.Environment.process (Environment.java:188)
>>      at freemarker.template.Template.process (Template.java:237)
>>      at
>> org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMarkerP
>>ageFilter.java:160) at
>> org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageF
>>ilter.java:116) at
>> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java
>>:62) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
>>nFilterChain.java:246) ...
>> ...
>> ...
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment: user_188875.ezm (zipped)
I added a "warning" box with title "Struts 2.1.3" to the wiki page of
struts2-sitemesh-plugin. Hope this is ok... I looked there before searching
the code, maybe it helps others.

Is there a solution for the "version problem" in the wiki now? I remember
there was no way to handle this some time ago. I could help out updating the
docs if you say me in what way this should be done. (Dont want to make
changes you have to revert afterwards ;-)

 Piero

Am Montag, 14. Juli 2008 20:09:30 schrieb Musachy Barroso:
> Don is still working on those changes, you could open a ticket to make
> sure everything gets documented.
>
> musachy
>
> On Mon, Jul 14, 2008 at 1:22 PM, Piero Sartini <lists@(protected)>
wrote:
> > Ok, the problem was that since 2.1.3 the filters changed:
> >
> > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
> > instead of ActionContextCleanup and
> > org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
> > instead of the FilterDispatcher.
> >
> > Now everything works like expected. I will update the wiki of the
> > sitemesh plugin ..
> >
> > Am Montag, 14. Juli 2008 15:23:16 schrieb Piero Sartini:
> >> The S2 version is 2.1.3-SNAPSHOT. The exact same project was working
> >> some time ago with 2.1.1-SNAPSHOT. So maybe this is something that got
> >> broken in newer builds.
> >>
> >> The problem seems to be that Freemarker can't get its configuration at
> >> this point. But ActionContextCleanUp is the first filter in chain, and
> >> tags like @s.url do work, only the form and input fields do not work.
> >>
> >> If I try the exact same form outside the decorator in a normal,
> >> decorated page, everything works like expected.
> >>
> >> Any ideas?
> >>
> >> java.lang.NullPointerException
> >>      at
> >> org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration(F
> >>ree markerManager.java:159) at
> >> org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTe
> >>mpl ate(FreemarkerTemplateEngine.java:90) at
> >> org.apache.struts2.components.UIBean.mergeTemplate (UIBean.java:558) at
> >> org.apache.struts2.components.Submit.end (Submit.java:109) at
> >> org.apache.struts2.views.freemarker.tags.CallbackWriter.afterBody(Callba
> >>ckW riter.java:84) at
> >> freemarker.core.Environment.visit (Environment.java:299) at
> >> freemarker.core.UnifiedCall.accept (UnifiedCall.java:130) at
> >> freemarker.core.Environment.visit (Environment.java:208) at
> >> freemarker.core.MixedContent.accept (MixedContent.java:92) at
> >> freemarker.core.Environment.visit (Environment.java:208) at
> >> freemarker.core.Environment.include (Environment.java:1477) at
> >> freemarker.core.Include.accept (Include.java:169)
> >>     at freemarker.core.Environment.visit (Environment.java:208)
> >>      at freemarker.core.MixedContent.accept (MixedContent.java:92)
> >>      at freemarker.core.Environment.visit (Environment.java:208)
> >>      at freemarker.core.Environment.process (Environment.java:188)
> >>      at freemarker.template.Template.process (Template.java:237)
> >>      at
> >> org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMark
> >>erP ageFilter.java:160) at
> >> org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePa
> >>geF ilter.java:116) at
> >> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.j
> >>ava
> >>
> >>:62) at
> >>
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> >>tio nFilterChain.java:246) ...
> >> ...
> >> ...
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)

Attachment: user_188877.ezm (zipped)
> I added a "warning" box with title "Struts 2.1.3" to the wiki page of
> struts2-sitemesh-plugin. Hope this is ok... I looked there before searching
> the code, maybe it helps others.
>

yes that is perfect, thanks.


> Is there a solution for the "version problem" in the wiki now? I remember
> there was no way to handle this some time ago. I could help out updating the
> docs if you say me in what way this should be done. (Dont want to make
> changes you have to revert afterwards ;-)

No, there isn't any solution for the version problem ATM.

Attachment: user_188876.ezm (zipped)
Where in the interceptor chain do your custom interceptor execute?

2008/7/14 Pierre Thibaudeau <pierre.thibaudeau@(protected)>:
> I have an interceptor that puts an object in the Session scope.
>
> The interceptor calls the following when retrieving the Session:
>
>   public String intercept(ActionInvocation invocation) throws Exception {
>     ActionContext context = invocation.getInvocationContext();
>     HttpServletRequest request = (HttpServletRequest)
> context.get(StrutsStatics.HTTP_REQUEST);
>     HttpSession session = request.getSession(true /* create if need be
> */);
>     session.setAttribute(attributeName, someObject);
>     ...
>   }
>
> Given that code, I don't see how the Session could be null after that
> interception --- otherwise an exception would be thrown at the point when I
> attempt to set the Session attribute.
>
> Yet, immediately after I start the server (therefore no Session has yet been
> created), if I issue a browser request on an action that uses that
> interceptor, OGNL reports the Session as being indeed null --- or so the
> xml-debug output of the context shows. It's only on the second request that
> the xml-debug shows a Session context containing the desired object.
>
> Is there a way of explaining this discrepancy?
> Apart from this custom interceptor, I use the paramPrepareParam stack.
> Would there be another interceptor in there interfering with my custom
> newly-created Session (but not interfering when the Session is not new
> anymore)?
>
> Toughts?
>

Attachment: user_188881.ezm (zipped)
2008/7/14 Gabriel Belingueres <belingueres@(protected)>:

> Where in the interceptor chain do your custom interceptor execute?
>

       <interceptor-stack name="customStack">
          <interceptor-ref name="userLanguage"/>
          <interceptor-ref name="debugging"/>
          <interceptor-ref name="autoLogin"/>
          <interceptor-ref name="paramsPrepareParamsStack" />
       </interceptor-stack>

The interceptor I mentioned in my earlier post is the first one:
userLanguage.

BTW, to make more accurate what I stated earlier, the xml-debug tree does
not actually claim that the Session is null; rather that it's empty.
Here's the relevant section:

<debug>

<parameters/>

<context>
 ...
</context>

<request>
 ...
</request>

<session/>

<valueStack>
 ...
</valueStack>

</debug>

As you can see, the <session/> tag is empty...

Attachment: user_188882.ezm (zipped)
Extra update.

What makes this even more puzzling is that EL can find the object while OGNL
cannot. On the first request,
${userLanguage} will display the correct value, but
<s:property value="#session['userLanguage']"/> will display nothing.

On the second request, both expressions will display the same (and correct)
value.

Attachment: user_188885.ezm (zipped)
That's strange.
Which S2 version are you using?

2008/7/14 Pierre Thibaudeau <pierre.thibaudeau@(protected)>:
> Extra update.
>
> What makes this even more puzzling is that EL can find the object while OGNL
> cannot. On the first request,
> ${userLanguage} will display the correct value, but
> <s:property value="#session['userLanguage']"/> will display nothing.
>
> On the second request, both expressions will display the same (and correct)
> value.
>

Attachment: user_188888.ezm (zipped)
2008/7/14 Gabriel Belingueres <belingueres@(protected)>:

> That's strange.
> Which S2 version are you using?
>

Struts 2.1.2

Attachment: user_188889.ezm (zipped)
Please test your interceptor using the following to get the session:
Map session = invocation.getInvocationContext().getSession();

2008/7/14 Pierre Thibaudeau <pierre.thibaudeau@(protected)>:
> 2008/7/14 Gabriel Belingueres <belingueres@(protected)>:
>
>> That's strange.
>> Which S2 version are you using?
>>
>
> Struts 2.1.2
>

Attachment: user_188892.ezm (zipped)
2008/7/14 Gabriel Belingueres <belingueres@(protected)>:
> Please test your interceptor using the following to get the session:
> Map session = invocation.getInvocationContext().getSession();

Well, Gabriel:

a) I'll be d*mned!
b) You're a genius! ;) (I would never have thought of looking that way!)

Now, it's worth making an extra comment about this strange situation.
I patched my interceptor as follows:

 public String intercept(ActionInvocation invocation) throws Exception {
   ActionContext context = invocation.getInvocationContext();
   HttpServletRequest request = (HttpServletRequest)
context.get(StrutsStatics.HTTP_REQUEST);
   HttpSession session = request.getSession(true /* create if not yet
in existence */);
   Map<?,?> sessionMap = invocation.getInvocationContext().getSession();
          ...
    }

In other words, I didn't merely REPLACE my previous HttpSession by the
Map<?,?>, but I added the Map<?,?>. With this new setup, so long as I
put one object in the sessionMap, then the other object (yes, there
were two of them; I hadn't mention the second one) is set properly
with HttpSession.setAttribute(String). And BOTH object are recognized
by OGNL, not merely the one that I had Map.put(Object, Object)...

So basically, we are facing an initialization issue somewhere. I wish
there was a more elegant way of preparing that new session... But at
least, now the interceptor behaves as intended.

I bet this issue should be made explicit in the Strut2 /
ActionInvocation /OGNL guides...

Thanks!

Attachment: user_188895.ezm (zipped)
Seems like something is not correctly initialized in OGNL when you get
the session from the HTTPServletRequest object this way (it should be
documented somewhere or otherwise fix it.)

But you don't need to get both the HTTPSession and the Map to put
something in session scope. The SessionMap is an adapter to ease unit
testing of actions, and every change is is done to the SessionMap it
is delegated to the HTTPSession object.

2008/7/14 Pierre Thibaudeau <pierre.thibaudeau@(protected)>:
> 2008/7/14 Gabriel Belingueres <belingueres@(protected)>:
>> Please test your interceptor using the following to get the session:
>> Map session = invocation.getInvocationContext().getSession();
>
> Well, Gabriel:
>
> a) I'll be d*mned!
> b) You're a genius! ;) (I would never have thought of looking that way!)
>
> Now, it's worth making an extra comment about this strange situation.
> I patched my interceptor as follows:
>
>     public String intercept(ActionInvocation invocation) throws Exception {
>           ActionContext context = invocation.getInvocationContext();
>           HttpServletRequest request = (HttpServletRequest)
> context.get(StrutsStatics.HTTP_REQUEST);
>           HttpSession session = request.getSession(true /* create if not yet
> in existence */);
>           Map<?,?> sessionMap = invocation.getInvocationContext().getSession();
>           ...
>     }
>
> In other words, I didn't merely REPLACE my previous HttpSession by the
> Map<?,?>, but I added the Map<?,?>. With this new setup, so long as I
> put one object in the sessionMap, then the other object (yes, there
> were two of them; I hadn't mention the second one) is set properly
> with HttpSession.setAttribute(String). And BOTH object are recognized
> by OGNL, not merely the one that I had Map.put(Object, Object)...
>
> So basically, we are facing an initialization issue somewhere. I wish
> there was a more elegant way of preparing that new session... But at
> least, now the interceptor behaves as intended.
>
> I bet this issue should be made explicit in the Strut2 /
> ActionInvocation /OGNL guides...
>
> Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188878.ezm (zipped)

Is anyone aware of how to use validation files in a way similar to message
resources? I am finding too much if/else code in Struts 2 actions where for
example input field lengths are a function of locale!
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188879.ezm (zipped)

Hi All,
I am using Strut 2.0 and tiles with Spring and I am having the following
issue in the validation framework.
When ever I submit a form with error in a field, subsequent submission of
the same form (without valid value), generates duplicate error messages.
i.e If i leave the first name field as blank and submit the page, i get a
valid error message due to the validations in place. But if i submit the
same page again as it is, I am getting duplicate error messages for the same
field again.

Also if I enter valid values in the form field after the error message is
displayed, I am not able to get through the page. I am stuck at the error
page itself.

Please find below the code snippets:

spring-config.xml
---------------

 
   
 


Struts.xml
---------

 
 page.applicationStart
 addProjectPageDisplay
 displayProjects



   
   page.applicationStart


"commonAppStack" is a custom made interceptor stack which doesn't have any
fancy stuff.

Any pointers to this issue is appreciated.

Thanks
Mahesh K

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

Attachment: user_188883.ezm (zipped)
Did you put singleton=false or scope=prototype for action's beans in
spring config?


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188884.ezm (zipped)

that worked like a gem...thanks!

Lukasz Lenart wrote:
>
> Did you put singleton=false or scope=prototype for action's beans in
> spring config?
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> 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_188880.ezm (zipped)

Hi,

you can save it into session and use it to display on jsp page.

--
Milan


hns wrote:
>
> hi
>
> it might be this question is not related s2 but still i want to ask
>
> i am using one public function in one class which get key,value pair from
> database query fire and fill in linked hashmap
> and return iterator to access on jsp page
>
> i have used jsp:usebean of this class to get access public function which
> iterate data in page scope
> for my select box
>
> now i have to ask
> when i refresh or redirect this page ,every times Map will get details
> from database ,so at codebehind database accesss happens so many times
> when i refresh or redirect it,
>
> how can i solve this issue
> now
>

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


Attachment: user_188886.ezm (zipped)
Hi:
Can anyone tell me where I can get the latest binaries for struts 2.1..x that contains the fixes since the struts 2.1.2 build release on 02-May-2008. I would like to test JIRA WW-2642 that I opened using 2.1.2 and have the issue closed.
All I need is the sample applicaiton{hello world) with binaries that contain the fixes, say 2.1.3.
I went to followoing page but did not find what I was looking for.  http://people.apache.org/builds/struts/


----- Original Message ----
From: hns <hardik_982@(protected)>
To: user@(protected)
Sent: Monday, July 14, 2008 9:46:43 AM
Subject: RE: about security



HI

According to help of some  previous threads i have created Login
interceptor,i really such thankful to all helpful people who help me in this
discussion please
http://www.nabble.com/about-current-action-name-acsess-td15736383.html#a15755941
Check here  and read out from first thread ,you can take advantage of it




Yanni Tan wrote:
>
>
>
> I am new to the web development, but I like the concept of this answer.
> Could you explain more about how to setup/configure the interceptor? i.e.
> How to hook up your interceptor method with the server?  Thanks!
>

--
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)


   __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!

http://www.flickr.com/gift/


Attachment: user_188896.ezm (zipped)
The easiest (and most reliable) is to build from source yourself... In a
nutshell, do the following -

svn co
https://svn.apache.org/repos/asf/struts/current/ struts

cd struts

svn co http://svn.opensymphony.com/svn/xwork/trunk xwork

cd xwork

mvn -Pall clean install

(wait until complete)

cd ../struts2

mvn -Pall clean install

(wait a bit)

Then, when everything is done, you have not only all the appropriate and
up-to-date libs, but you have the sources to in case you want to attach
and debug.

For a quick test, just delve into one of the app directories and run
jetty like so -

cd apps/showcase
mvn jetty:run


-Wes


On Mon, 2008-07-14 at 13:04 -0700, Struts Two wrote:
> Hi:
> Can anyone tell me where I can get the latest binaries for struts 2.1..x that contains the fixes since the struts 2.1.2 build release on 02-May-2008. I would like to test JIRA WW-2642 that I opened using 2.1.2 and have the issue closed.
> All I need is the sample applicaiton{hello world) with binaries that contain the fixes, say 2.1.3.
> I went to followoing page but did not find what I was looking for. http://people.apache.org/builds/struts/
>
>
> ----- Original Message ----
> From: hns <hardik_982@(protected)>
> To: user@(protected)
> Sent: Monday, July 14, 2008 9:46:43 AM
> Subject: RE: about security
>
>
>
> HI
>
> According to help of some previous threads i have created Login
> interceptor,i really such thankful to all helpful people who help me in this
> discussion please
> http://www.nabble.com/about-current-action-name-acsess-td15736383.html#a15755941
> Check here and read out from first thread ,you can take advantage of it
>
>
>
>
> Yanni Tan wrote:
> >
> >
> >
> > I am new to the web development, but I like the concept of this answer.
> > Could you explain more about how to setup/configure the interceptor? i.e.
> > How to hook up your interceptor method with the server? Thanks!
> >
>


Attachment: user_188887.ezm (zipped)
On Monday 14 July 2008 00:30:19 Jeromy Evans wrote:
> Dave Belfer-Shevett wrote:
> > In my JSP, I have:
> > Preferred cid is <s:property value="#attr.properties[preferredcid]"/><br>
>
> This expression reads "evaluate perferredcid, then get the value of
> #attr.properties[evalresult]".
>
> I expect you want. <s:property value="#attr.properties['preferredcid']"/>
>
> so it uses the literal string 'preferredcid' instead of evaluating it.
>
> Please let me know if that fixes it. OGNL doesn't provide much useful
> feedback for cases like these.

That fixed it. Is there a chance we can update the 'collections' page in the
struts docs to give information like this?

Thanks again.

 -d

Attachment: user_188890.ezm (zipped)
Re you using struts 2 itself?

If yes it would look something like this
<s:iterator value="listName" status="stat">
 <input name="someName[<s:property value='stat.index'/>]">
</s:iterator>

The code you send looks like struts 1
Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-----Original Message-----
From: YAQ [mailto:yvette_quinby@(protected)]
Sent: Monday, July 14, 2008 4:05 PM
To: user@(protected)
Subject: Struts 2 Indexed Properties


Hi,

I'm having problem with Struts2 and indexed properties.

The list in my action is not being updated.

My JSP is something like:

<logic:iterate id="coverTypes" name="questionnaireVO.coverTypesList"
indexId="index">
 <input  type="hidden"
     id="questionnaireInputVO.coverTypesList[<c:out
value="${index}" />].key"
     name="questionnaireInputVO.coverTypesList[<c:out
value="${index}"
/>].key"
     value="<c:out value="${coverTypes.key.id}" />"
/>
 <input  type="hidden"
     id="questionnaireInputVO.coverTypesList[<c:out
value="${index}"
/>].agreementType.key"
     name="questionnaireInputVO.coverTypesList[<c:out
value="${index}"
/>].agreementType.key"
     value="<c:out
value="${coverTypes.agreementType.key.id}" />" />
</logic:iterate>


I've discovered I need an entry in the x-work conversion properties:

Element_questionnaireInputVO.coverTypesList=com.mypath.CoverTypeVO
CreateIfNull_questionnaireInputVO.coverTypesList=true


But I am getting the following error:


[2008-07-14 12:13:07,860] [.Transports : 2] DEBUG
[com.opensymphony.xwork2.util.InstantiatingNullHandler     ] :
Entering
nullPropertyValue [target=com.mypath.QuestionnaireInputVO@(protected),
property=coverTypesList]
[2008-07-14 12:13:07,860] [.Transports : 2] ERROR
[com.opensymphony.xwork2.util.InstantiatingNullHandler     ] : Could
not
create and/or set value back on to object
org.springframework.beans.factory.BeanCreationException: Error creating
bean
with name '[Lcom.mypath.CoverTypeVO;': Could not resolve matching
constructor
 at
org.springframework.beans.factory.support.ConstructorResolver.autowireCo
nstructor(ConstructorResolver.java:178)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:799)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.autowire(AbstractAutowireCapableBeanFactory.java:255)
 at
com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjec
tFactory.java:145)
 at
com.opensymphony.xwork2.util.InstantiatingNullHandler.createObject(Insta
ntiatingNullHandler.java:123)
 at
com.opensymphony.xwork2.util.InstantiatingNullHandler.nullPropertyValue(
InstantiatingNullHandler.java:104)
 at ognl.ASTProperty.getValueBody(ASTProperty.java:94)
 at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
 at ognl.SimpleNode.getValue(SimpleNode.java:210)
 at ognl.ASTChain.setValueBody(ASTChain.java:168)
 at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
 at ognl.SimpleNode.setValue(SimpleNode.java:246)
 at ognl.Ognl.setValue(Ognl.java:476)
 at
com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
 at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:158)
 at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:146)
 at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(
ParametersInterceptor.java:193)
 at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Pa
rametersInterceptor.java:159)
 at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
com.ing.itrf.starlite.common.interceptor.StarliteSecurityInterceptor.int
ercept(StarliteSecurityInterceptor.java:54)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Servle
tConfigInterceptor.java:170)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
com.ing.itrf.starlite.common.interceptor.StarliteDebugInterceptor.interc
ept(StarliteDebugInterceptor.java:54)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercep
t(ExceptionMappingInterceptor.java:176)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:50)
 at
org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:5
04)
 at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:419)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ing.itrf.solution.filter.PerformanceMonitorFilter.doFilter(Performan
ceMonitorFilter.java:135)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ing.itrf.security.filter.SecurityFilter$1.run(SecurityFilter.java:21
4)
 at
java.security.AccessController.doPrivileged (AccessController.java:260)
 at javax.security.auth.Subject.doAs (Subject.java:555)
 at
com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:165)
 at
com.ing.itrf.security.filter.SecurityFilter.doFilter(SecurityFilter.java
:212)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ing.itrf.solution.filter.WaitPageFilter.doFilter(WaitPageFilter.java
:190)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ing.itrf.solution.filter.EncodingFilter.doFilter(EncodingFilter.java
:115)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:1027)
 at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:544)
 at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:210)
 at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
39)
 at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:332)
 at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
 at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invo
ke(CacheableInvocationContext.java:120)
 at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:250)
 at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
 at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
 at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
652)
 at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
 at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937)
[2008-07-14 12:13:07,860] [.Transports : 2] DEBUG
[com.opensymphony.xwork2.util.OgnlValueStack           ] : Error
setting value
ognl.OgnlException: source is null for getProperty(null, "0")
 at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1638)
 at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
 at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
 at ognl.SimpleNode.getValue(SimpleNode.java:210)
 at ognl.ASTChain.setValueBody(ASTChain.java:168)
 at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
 at ognl.SimpleNode.setValue(SimpleNode.java:246)
 at ognl.Ognl.setValue(Ognl.java:476)
 at
com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
 at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:158)
 at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:146)
 at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(
ParametersInterceptor.java:193)
 at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Pa
rametersInterceptor.java:159)
 at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
com.ing.itrf.starlite.common.interceptor.StarliteSecurityInterceptor.int
ercept(StarliteSecurityInterceptor.java:54)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Servle
tConfigInterceptor.java:170)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
com.ing.itrf.starlite.common.interceptor.StarliteDebugInterceptor.interc
ept(StarliteDebugInterceptor.java:54)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercep
t(ExceptionMappingInterceptor.java:176)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
 at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
 at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
 at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
 at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:50)
 at
org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:5
04)
 at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:419)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ing.itrf.solution.filter.PerformanceMonitorFilter.doFilter(Performan
ceMonitorFilter.java:135)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ing.itrf.security.filter.SecurityFilter$1.run(SecurityFilter.java:21
4)
 at
java.security.AccessController.doPrivileged (AccessController.java:260)
 at javax.security.auth.Subject.doAs (Subject.java:555)
 at
com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:165)
 at
com.ing.itrf.security.filter.SecurityFilter.doFilter(SecurityFilter.java
:212)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ing.itrf.solution.filter.WaitPageFilter.doFilter(WaitPageFilter.java
:190)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ing.itrf.solution.filter.EncodingFilter.doFilter(EncodingFilter.java
:115)
 at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
 at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
 at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:1027)
 at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:544)
 at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:210)
 at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
39)
 at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:332)
 at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
 at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invo
ke(CacheableInvocationContext.java:120)
 at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:250)
 at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
 at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
 at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
652)
 at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
 at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937)


Can anyone help?




--
http://www.nabble.com/Struts-2-Indexed-Properties-tp18441212p18441212.ht
ml
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)

Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. If you have received this in error, please contact the
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies
may be subject to our monitoring procedures.


Attachment: user_188891.ezm (zipped)
Hi all,
 Can any one tell me where do I specify that I want to use
messages_en.properties or messages_de.properties?

By the way I am using struts 2.

And one more thing, does browser any intention that it's DE or EN?

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE

 
Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. If you have received this in error, please contact the
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies
may be subject to our monitoring procedures.


Attachment: user_188893.ezm (zipped)
Hi,

I´m trying to use Struts 1.2 Validator plugin. I guess something in struts-config.xml is missing or wrong. If I add the necessary code to use the plugin validator:

<plug-in classname="org.apache.struts.validator.ValidatorPlugIn">
<set-property
  property="pathnames"
  value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>

After redeploying my webapp, I get a 404 error Servlet action not available. Validation and validation-rules are "configured". Any suggestions? Thanks in advance.

Attachment: user_188894.ezm (zipped)
Jeromy,

Thanks *heaps* for finfing the time to do that. I'd pretty much done
everything your demo does except for one little detail:

<constant name="struts.patternMatcher" value="namedVariablePatternMatcher"/>

Doh!

Now to see if that's broken my fancy pants image handler...

BTW, if I want a controller to work in multiple namespaces do I need
to declare seperate packages in struts.xml instead of just relying on
the @Namespace annotation?

Thanks again for all your help.

2008/7/12 Jeromy Evans <jeromy.evans@(protected)>:
> Jeromy Evans wrote:
>>
>>
>> Dusty, you're right. I just had a quick look and I do have a custom action
>> mapper that checks whether the pattern above references an action or method
>> for that exact reason (it checks the list of available actions and gives
>> precedence to those). Works great for me.
>>
>> I released another actionmapper that solved the problem using a different
>> approach. It will be deprecated, but it's still up for info:
>> http://code.google.com/p/struts2urlplugin/
>
> I had an opportunity to throw together a sample application. Apologies for
> the delay.
>
> Relevant source and commentary are included in the demo.
> http://www.blueskyminds.com.au/url-hierarchy/
>
> From the description:
> "This webapp demonstrates a technique to access resources with hierarchical
> relationships in Struts 2.
>
> The model is a Book with a list of Chapters. Each Book has a unique URI:
> eg. /book/1 (book #1)
>
> Each chapter also has a unique URI:
> eg. /book/1/chapter/2 (chapter #2 in book #1)
>
> Following Struts2 conventions, the list of books and list of chapters in a
> book are also available:
> eg. /book (list of books)
> eg. /book/1/chapter (list of chapters in book #1)
>
> regards,
> Jeromy Evans
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
©2008 gg3721.com - Jax Systems, LLC, U.S.A.