You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lou Morin <lu...@hotmail.com> on 2001/09/24 05:25:51 UTC
HTML:FORM Action problem with proxy server
I've been using Struts for the last couple of months and have been pretty
much able to resolve all my problems by reading the documentation,
tutorials, etc.
Now, I'm looking to deploy this to my ISP server. The ISP is translating my
domain name as follows:
"www.tarponweb.com" --> "http://webappcabaret.com/tarponweb1"
My action-mappings are as follows:
<action
path="/SaintIgnatiusYouthGroup/Admin/AdminLogon"
type="com.tarponweb.AdminLogonAction"
name="AdminLogon"
Input="/SaintIgnatiusYouthGroup/Admin/AdminLogonPage.jsp">
<forward name="adminHome"
path="/SaintIgnatiusYouthGroup/Admin/AdminHomePage.jsp"/>
<forward name="adminLogon"
path="/SaintIgnatiusYouthGroup/Admin/AdminLogonPage.jsp"/>
</action>
My html form start like this:
<html:form
action="/SaintIgnatiusYouthGroup/Admin/AdminLogon.do"
focus="userId">
When the form is displayed, if you view the generated source the action
contains a "/tarponweb1" prefix as follows:
<form name="AdminLogon" method="POST"
action="/tarponweb1/SaintIgnatiusYouthGroup/Admin/AdminLogon.do">
The Problem:
When the submit button is pressed the following URL is submitted:
"http://www.tarponweb.com/tarponweb1/SaintIgnatiusYouthGroup/Admin/AdminLogon.do"
This gets translatted to the following:
"http://webappcabaret.com/tarponweb1/tarponweb1/SaintIgnatiusYouthGroup/Admin/AdminLogon.do"
Hence, I get a page not found because of the double
"/tarponweb1/tarponweb1" directories in the URL.
It looks like Struts is adding the "/tarponweb1" to the generated form
because this is the context that it is in ... it does this in my test
environment and it works because "localhost" does not get translated to
"localhost/tarponweb1".
Is there a way to tell Struts not to add the Servlet Context to the form
action?
Has anybody come across this problem?
Any help would be greatly appreciated!
Thanks,
Lou
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp