Hi,

I use struts 1.2 with tiles.

There are a template layout.jsp, a tile locale.jsp and 2 tileDefinitions a.page 
and b.page.
With the org.apache.struts.actions.LocaleAction there are problems.

In the locale.jsp: (language switch)

 <html:select property="language" size="1">
  <html:option key="label.de" value="de"/>
  <html:option key="label.en" value="en"/>
 </html:select>
 <html:hidden property="page" value="a.page"/>

If the page attribute is set to a tilesDefintions it works, but if not occurs a 
exception:

In the struts-config-xml:

<action path="/processLanguage"
   name="languageForm"
   type="org.apache.struts.actions.LocaleAction">
   <forward name="success" path="b.page"/>
</action>
java.lang.IllegalArgumentException: Path does not start with a "/" character
at 
org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:377)

at 
org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:198)

at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

at 
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)

at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)

at 
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)

1.What is wrong? Why is the forward to the tilesDefinition b.page not valid ?
I test it with it with a action and jsp as pathAttribute (witch starts with a 
"/") but the same Exception occurs.

2.How can I get the actual tilesDefintion in the jsp (local.jsp) (Perhaps with 
jstl-core and EL)
or in the action (LocaleAction.java) to set the pageAttribute to forward to.

Best Regards rula


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to