You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Srhan <ar...@att.com> on 2007/10/17 20:10:10 UTC

problem in of struts-config.xml file..

Hi,
 I've web.xml file in which I've index.jsp as my welcome files list.
<welcome-file-list>
                <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

 in index.jsp I've struts logic redirect tag.

<logic:redirect forward="welcome"/>

In struts-config.xml file I've the following in <global-forwards>

<global-forwards>
 
    <forward name="welcome" path="/login.do" />
     
  </global-forwards>

And I've the following login action..

<action path="/login"
type="com.cingular.cscape.cmps.struts.action.SignOnAction" validate="false">
      <forward name="success" path="/login.jsp" redirect="true" />      
    </action>

Once I try to run the following URL in the browser it is saying "Page cannot
be displayed"

http://localhost:7001/cmps

http://localhost:7001/cmps/login.do

Please advise me if I'm doing any thing wrong.

Thanks,
Anil


-- 
View this message in context: http://www.nabble.com/problem-in-%3Cglobal-forward%3E-of-struts-config.xml-file..-tf4642355.html#a13259654
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: problem in of struts-config.xml file..

Posted by Zarar Siddiqi <za...@gmail.com>.
Try putting the redirect="true" on the global forward instead of the
action forward like this:

<global-forwards>
  <forward name="welcome" path="/login.do" redirect="true"/>
</global-forwards>

<action path="/login"
 type="com.cingular.cscape.cmps.struts.action.SignOnAction" validate="false">
  <forward name="success" path="/login.jsp" />
 </action>

The rest seems OK.

Zarar



On 10/17/07, Srhan <ar...@att.com> wrote:
>
> Hi,
>  I've web.xml file in which I've index.jsp as my welcome files list.
> <welcome-file-list>
>                 <welcome-file>index.jsp</welcome-file>
>   </welcome-file-list>
>
>  in index.jsp I've struts logic redirect tag.
>
> <logic:redirect forward="welcome"/>
>
> In struts-config.xml file I've the following in <global-forwards>
>
> <global-forwards>
>
>     <forward name="welcome" path="/login.do" />
>
>   </global-forwards>
>
> And I've the following login action..
>
> <action path="/login"
> type="com.cingular.cscape.cmps.struts.action.SignOnAction" validate="false">
>       <forward name="success" path="/login.jsp" redirect="true" />
>     </action>
>
> Once I try to run the following URL in the browser it is saying "Page cannot
> be displayed"
>
> http://localhost:7001/cmps
>
> http://localhost:7001/cmps/login.do
>
> Please advise me if I'm doing any thing wrong.
>
> Thanks,
> Anil
>
>
> --
> View this message in context: http://www.nabble.com/problem-in-%3Cglobal-forward%3E-of-struts-config.xml-file..-tf4642355.html#a13259654
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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