You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eugen Stoianovici <eu...@gmail.com> on 2007/09/19 13:20:09 UTC
[S2] action mappings help
I'm trying to create an index with an action mapped to it for a
subfolder in my webapp. The ideea was to create a index.jsp file that has:
<jsp:forward page="/myapp/subfolder/welcome.action"/>
so it redirects me to a mapped action. The problem is that even though
the url is correct, i get a
"The requested resource (/myapp/subfolder/welcome.action) is not
available" from my server.
If i point my browser to http://website/myapp/subfolder/welcome.action
(ie: if i type this in) everything works out just fine. What am i doing
wrong?
Thanks
Eugen Stoianovici
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] action mappings help
Posted by Eugen Stoianovici <eu...@gmail.com>.
Thanks,
I added
<dispatcher>REQUEST</dispatcher>
<dispatcher>REDIRECT</dispatcher>
in my web.xml file for filter-mapping. Which made perfect sense right
after i read it.
Cory D. Wiles wrote:
> If you are trying to truly redirect then the below line is your problem. It
> is trying to forward not redirect.
> "<jsp:forward page="/myapp/subfolder/welcome.action"/>"
>
> Use:
>
> <%
> String redirectAction = "/myapp/subfolder/welcome.action";
> response.sendRedirect(redirectAction);
> %>
>
> On 9/19/07, Eugen Stoianovici <eu...@gmail.com> wrote:
>
>> I'm trying to create an index with an action mapped to it for a
>> subfolder in my webapp. The ideea was to create a index.jsp file that has:
>> <jsp:forward page="/myapp/subfolder/welcome.action"/>
>>
>> so it redirects me to a mapped action. The problem is that even though
>> the url is correct, i get a
>> "The requested resource (/myapp/subfolder/welcome.action) is not
>> available" from my server.
>>
>> If i point my browser to http://website/myapp/subfolder/welcome.action
>> (ie: if i type this in) everything works out just fine. What am i doing
>> wrong?
>>
>> Thanks
>> Eugen Stoianovici
>>
>> ---------------------------------------------------------------------
>> 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
Re: [S2] action mappings help
Posted by "Cory D. Wiles" <kw...@gmail.com>.
If you are trying to truly redirect then the below line is your problem. It
is trying to forward not redirect.
"<jsp:forward page="/myapp/subfolder/welcome.action"/>"
Use:
<%
String redirectAction = "/myapp/subfolder/welcome.action";
response.sendRedirect(redirectAction);
%>
On 9/19/07, Eugen Stoianovici <eu...@gmail.com> wrote:
>
> I'm trying to create an index with an action mapped to it for a
> subfolder in my webapp. The ideea was to create a index.jsp file that has:
> <jsp:forward page="/myapp/subfolder/welcome.action"/>
>
> so it redirects me to a mapped action. The problem is that even though
> the url is correct, i get a
> "The requested resource (/myapp/subfolder/welcome.action) is not
> available" from my server.
>
> If i point my browser to http://website/myapp/subfolder/welcome.action
> (ie: if i type this in) everything works out just fine. What am i doing
> wrong?
>
> Thanks
> Eugen Stoianovici
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>