struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Troy Hart <th...@part.net>
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>.

Troy



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="search.do" in html:form tags, the
> resulting HTML page contains <form action="/myapp/search.do">
> 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/action.do.  But because
> html:form tag generates a link to /superapp/subdir/action.do 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:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
> 



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


Mime
View raw message