You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rostom Aghanian <ro...@yahoo.com> on 2008/02/06 01:51:45 UTC

Struts 2 Bootstrap Tutorial: Using Tags

Hello,
I am new to Struts and going through the Struts 2 tutorial found at http://struts.apache.org/2.0.11/docs/using-tags.html

I am having a problem with the Wildcard Mapping section, where it specifies to use the following entry in struts.xml:
<action name="*" >
  <result>/tutorial/{1}.jsp</result>
</action>
If I use this action definition and go to http://localhost:8080/tutorial/Logon.action, Tomcat attempts to redirect to /tutorial/tutorial/Logon.jsp, which obviously fails because /tutorial is referenced twice. If I remove the /tutorial part from the  definition, then it works fine. 

Please let me know if this tutorial is erroneous in this aspect or if I'm doing something wrong. Thanks in advance.

rostom



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

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


Re: Struts 2 Bootstrap Tutorial: Using Tags

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
"tutorial" is most likely the context of your web application, so it
will always be a part of the URL to the resources in your app. All
jsps you reference in the configuration, starting with a '/' will
point to the root of the context for your application. So the
behaviour you see is expected.

Nils-H

On Feb 6, 2008 1:51 AM, Rostom Aghanian <ro...@yahoo.com> wrote:
> Hello,
> I am new to Struts and going through the Struts 2 tutorial found at http://struts.apache.org/2.0.11/docs/using-tags.html
>
> I am having a problem with the Wildcard Mapping section, where it specifies to use the following entry in struts.xml:
> <action name="*" >
>   <result>/tutorial/{1}.jsp</result>
> </action>
> If I use this action definition and go to http://localhost:8080/tutorial/Logon.action, Tomcat attempts to redirect to /tutorial/tutorial/Logon.jsp, which obviously fails because /tutorial is referenced twice. If I remove the /tutorial part from the  definition, then it works fine.
>
> Please let me know if this tutorial is erroneous in this aspect or if I'm doing something wrong. Thanks in advance.
>
> rostom
>
>
>
>       ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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