• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forwards Tiles & Anchors

 
Kye nos
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, here is my dilemma...

I have a Struts based web app, that uses tiles. My action is smart enough
to know when I need to use a specific bookmark (i.e. target; <a id="name"></a>
as a part of the URL. After some research, I found the simplest [i]complicated[i]
solution to a simple problem is to clone the forward and modify the path
as follows:

ActionForward af = new ActionForward(mapping.findForward("success"));

af.setPath(af.getPath() + "?#name");

return af;

This works fine for normal struts actions that forward to a jsp page.
Unfortunately, I have a tiles definition in my "path" attribute of the
action instead of a url, as such:

<action path="/*WizardPage2" type="com.web.struts.actions.{1}Action" parameter="wizardPage2" name="{1}WizardForm" scope="session" validate="true" input="/{1}WizardPage1.do">
<forward name="success" path=".view.wizardPage2.{1}"/>
</action>

Due to this, I get the following error:

[2006-08-01 12:14:41,110] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/context].[action] Servlet.service() for servlet action threw exception
java.lang.IllegalArgumentException: Path .view.wizardPage2.Ops?#selectType does not start with a "/" character

Any ideas?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic