You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2002/09/04 21:16:12 UTC

Need help in struts-config.xml file

Hi,I am developing a web application using struts,  my
URL to the main page
ishttp://localhost:8080/maps/pages/index.jspMy web
application is maps, so if i have to define a action
tag in struts-config.xml how can i do it.i have
defined a action tag like below, 
<action path="/pages/signout"
type="com.pfizer.maps.SignoutAction"  scope="request">
<forward name="success" path="/pages/signout.jsp"
redirect="true"/>
</action>

and i have in my selectenv.jsp javascript like this 

document.forms[0].action= '/pages/signout.do';
document.forms[0].submit();

but i when i call this javascript i get 404 error and
the URL i get is
http://pfizer-maps:8080/pages/signout.do

so how can i make it work, i dont want to hardcode my
application, as i may change the name in future


=====
A$HI$H

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Need help in struts-config.xml file

Posted by Billy Ng <ev...@hotmail.com>.
I ran into the same problem, but I brand it in the properties file and I
have a URL object to pick it.  So you just need to change it in one place if
the app name is changed.

Billy Ng

----- Original Message -----
From: "Ashish Kulkarni" <ku...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, September 04, 2002 12:16 PM
Subject: Need help in struts-config.xml file


> Hi,I am developing a web application using struts,  my
> URL to the main page
> ishttp://localhost:8080/maps/pages/index.jspMy web
> application is maps, so if i have to define a action
> tag in struts-config.xml how can i do it.i have
> defined a action tag like below,
> <action path="/pages/signout"
> type="com.pfizer.maps.SignoutAction"  scope="request">
> <forward name="success" path="/pages/signout.jsp"
> redirect="true"/>
> </action>
>
> and i have in my selectenv.jsp javascript like this
>
> document.forms[0].action= '/pages/signout.do';
> document.forms[0].submit();
>
> but i when i call this javascript i get 404 error and
> the URL i get is
> http://pfizer-maps:8080/pages/signout.do
>
> so how can i make it work, i dont want to hardcode my
> application, as i may change the name in future
>
>
> =====
> A$HI$H
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>