Thanks for helping.
I assume you mean this part:
<servlet-mapping> <servlet-name>controller</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
The above code works (hooray), but if I try to change the url pattern to anything more specific (such as /login, or /login*, or /login/*) I get the wrong action parameter value . . .
atta-ur rehman wrote:
Okay, now you need to show your web.xml!
struts-config.xml looks fine. I'd suggest you try it with .do extension first and then try path mapping in web.xml
ATTA
On Jul 5, 2004, at 4:40 PM, Erik Weber wrote:
<form-beans>
<form-bean name="loginForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>
</form-beans>
<action-mappings>
<action path="/login" type="LoginAction" name="loginForm" scope="session" input="/login.jsp">
<forward name="success" path="/home.jsp"/>
<forward name="failure" path="/login.jsp"/>
</action>
</action-mappings>
<message-resources parameter="ApplicationResources"/>
I have tried mapping the controller servlet to all kinds of path prefixes including "/login" and "/login/*" and "/". None of them result in the correct action parameter in the form. I don't want to use extension mapping. I want to use path mapping. Is this where the problem is?
atta-ur rehman wrote:
Hello Erik,
Is it possible for you to show your struts-config.xml file?
ATTA
On Jul 5, 2004, at 4:01 PM, Erik Weber wrote:
Could someone please tell me what would cause the html:form tag to ignore the value I specify to the action parameter, and instead, rewrite the action parameter value to be equal to the context root of the application?
For example, my web app login page is:
http://localhost:8080/Test/index.jsp
In login.jsp, I have this opening form tag:
<html:form action="/login">
I have a matching action configured in struts-config.xml. But the struts tag is rendering the form tag like this:
<form name="loginForm" action="/Test">
No matter what I try this does not change. This is extremely frustrating. Any help would be appreciated.
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]