You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Dan Brown <db...@foundryinc.com> on 2001/05/18 22:12:02 UTC

Actions not working when servlet is remapped in web.xml

I changed by web.xml file in newapp to map the Turbine servlet to be the 
default servlet by adding the following statement after the servlet 
element.

   <servlet-mapping>
     <servlet-name>newapp</servlet-name>
     <url-pattern>/</url-pattern>
   </servlet-mapping>

Doing this allows me to hit the newapp site using the URL 
"http://localhost:8080/newapp" versus the URL 
"http://localhost:8080/newapp/servlet/newapp".  The html login pages 
form element appears correctly as so...

<form method="post" action="http://localhost:8080/newapp/action/LoginUser">

But, when I attempt to Login, I am put back to the login page even with 
a successful login with the form line changed to this..

<form method="post" 
action="http://localhost:8080/newapp/action/LoginUser/action/LoginUser">

Notice is just appended an action/LoginUser to the action.  The screen 
located at templates/app/screens/Login.vm sets the action with the 
following Velocity call as follows indicating that the setAction() 
method does not work correctly in this case.

<form method="post" action="$link.setAction("LoginUser")">

In addition, If I hit the newapp site using the new url with a ending 
slash "http://localhost:8080/newapp/" the resulting form action appears 
as follows.

<form method="post" 
action="http://172.16.7.15:8080/newapp//action/LoginUser">

Adding an addition slash between newapp and action.  This should be 
fixed as well.  Can someone fix this.

Thanks,

- Dan


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