struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Troy Hart <>
Subject Re: Using relative actions in html:form attributes...
Date Thu, 01 Aug 2002 20:51:57 GMT
One very simple thing to do is forgo the use of <html:form> in favor of
the plain html <form>.


On Thu, 2002-08-01 at 13:23, Mark Meytin wrote:
> Hello!
> I have the following interesting problem with Struts 1.0.2 running under
> Tomcat 4.0.4 and Apache combo.  I would like to specify relative
> actions in the html:form tags.  The problem now is that html:form
> tag converts action attributes into absolute paths, for example
> if I specify action="" in html:form tags, the
> resulting HTML page contains <form action="/myapp/">
> tag, where it gets /myapp prefix by always unconditionally making
> a call to request.getContextPath().  Well, in my case this is not
> working, because due to the use of Apache ProxyPass statements,
> URLs of the pages do not correspond to Tomcat ContextPaths.  
> Specifically, my JSP files are located in /webapps/superapp/subdir
> directory, through the magic of the following ProxyPass statements:
> ProxyPass         /subdir         http://localhost:8080/superapp/subdir
> ProxyPassReverse  /subdir         http://localhost:8080/superapp/subdir
> I can access my pages by going to http://<myhost>/subdir/page.jsp
> and my actions as http://<myhost>/subdir/  But because
> html:form tag generates a link to /superapp/subdir/ my
> forms cannot access the action at all, resulting in Apache's 404
> result.  
> Any ideas will be much appreciated!  It there a way to handle this
> type of situation, when Apache URLs do not correspond to
> Tomcat ContextPath URLs?  I'm getting a bit desperate here ;^)
> -M-
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message