You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Doyle, Michael J" <mi...@gs.com> on 2003/07/09 15:43:14 UTC

When the Struts webapp is not at the root of the server

Hi,

I have been working on a Struts based web application. Things have been
going fine developing on http://localhost:7001/myStrutsApp
<http://localhost:7001/myStrutsApp> . I've discovered a problem when I
deploy to http://www.somehost.com/somepath/myStrutsApp
<http://www.somehost.com/somepath/myStrutsApp> . 

Struts gets confused with the paths it generates to Actions and rewritten
URLs. It seems that Struts assumes the web application is always at the root
of the server, e.g. http://www.somehost.com/myStrutsApp
<http://www.somehost.com/myStrutsApp> . 

It produces 
	<form action="/myStrutsApp/myaction.do">

when what I need is 
	<form action="/somepath/myStrutsApp/myaction.do">

Thus, the <html:form> <html:base> and any other tag that rewrites the URL
don't work properly in this configuration.

Is there a workaround for this? Perhaps something to do with module
configuration? The web server is Netscape 3.5.1 and the app server is
Weblogic 5.10 sp13.

Thanks for any help,
- Mike



Re: When the Struts webapp is not at the root of the server

Posted by "Jamie M. Guillemette" <Ja...@av-basesystems.com>.
Hi Mike,

Your webapp would be built as if it was running from <root>/weapp/yourlinks
how is it that when deployed it is now got an extra piece to the addressing
?

JMG


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