You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lukas Österreicher <lu...@inode.at> on 2003/11/24 14:33:23 UTC

Tiles problem with / in action forward since struts 1.1

Hello

In latest revisions of struts it seemes to be required to have an action forward
start with  a /. This is ok under normal situations, however, it seemes to cause
troubles with tiles, at least for me.

When forwarding to a tile defind in the xml configureation file for tiles
it seemes to be required to forward to a location not starting with / or
it won't find the tile.

Are you aware of this and can confirm it?

Some people to deem to try to bypass this by setting the
referrer url in another parameter rather then the action forward,
but I think this not a good solution, especially if you need many
forward locations.

Do you know a solution for this?

Lukas



>/index.jsp gets translated (as needed) to account for the context path
>automatically. The paths that start with / are evaluated relative to
>your web app. You can use the /index.jsp style paths and deploy your app
>with any context path without having to change anything.
>
>-Max
>
>On Thu, 2003-02-27 at 22:01, Affan Qureshi wrote:
>> I have been using Struts 1.1b2 and tiles in my application and have defined
>> forwards like:
>>
>> <forward name="Success" path="index.jsp?selected=1" redirect="false"/>
>>
>> where forward paths were JSP pages,  whithout the starting "/" for paths and
>> it worked ok. But this does not work when I installed Strut 1.1rc1 coz it
>> gave the exception:
>>
>> java.lang.IllegalArgumentException: Path index.jsp?selected=1 does not start
>> with a "/" character
>>
>> Have I been doing it wrong until now? Is this a TilesRequestProcessor issue?
>> I had done so, so that I can deploy my app under any context/module etc. and
>> have no dependency on root path.
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Tiles problem with / in action forward since struts 1.1

Posted by David Friedman <hu...@ix.netcom.com>.
Lukas,

How are you trying to 'forward' to your tile?  Certain logic:tags don't
foward to tiles - it's in their documentation.  Please provide examples of
your <forward> tags, relevant <action .../> tags, and how you are trying to
'forward' to it.

Regards,
David

-----Original Message-----
From: Lukas Österreicher [mailto:lukas.oesterreicher@inode.at]
Sent: Monday, November 24, 2003 8:33 AM
To: struts-user@jakarta.apache.org
Subject: Tiles problem with / in action forward since struts 1.1


Hello

In latest revisions of struts it seemes to be required to have an action
forward
start with  a /. This is ok under normal situations, however, it seemes to
cause
troubles with tiles, at least for me.

When forwarding to a tile defind in the xml configureation file for tiles
it seemes to be required to forward to a location not starting with / or
it won't find the tile.

Are you aware of this and can confirm it?

Some people to deem to try to bypass this by setting the
referrer url in another parameter rather then the action forward,
but I think this not a good solution, especially if you need many
forward locations.

Do you know a solution for this?

Lukas



>/index.jsp gets translated (as needed) to account for the context path
>automatically. The paths that start with / are evaluated relative to
>your web app. You can use the /index.jsp style paths and deploy your app
>with any context path without having to change anything.
>
>-Max
>
>On Thu, 2003-02-27 at 22:01, Affan Qureshi wrote:
>> I have been using Struts 1.1b2 and tiles in my application and have
defined
>> forwards like:
>>
>> <forward name="Success" path="index.jsp?selected=1" redirect="false"/>
>>
>> where forward paths were JSP pages,  whithout the starting "/" for paths
and
>> it worked ok. But this does not work when I installed Strut 1.1rc1 coz it
>> gave the exception:
>>
>> java.lang.IllegalArgumentException: Path index.jsp?selected=1 does not
start
>> with a "/" character
>>
>> Have I been doing it wrong until now? Is this a TilesRequestProcessor
issue?
>> I had done so, so that I can deploy my app under any context/module etc.
and
>> have no dependency on root path.
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org