Spring MVC "duplicates" parts of the URL I looked at the previous link but the answers did not work and did not seem relevant (unless I'm doing something wrong).
My jboss-web.xml root is "/portal"
I have an jsp doc (with only html in it) that posts to a java controller that authenticates a username and password. The formaction is "portal/index".
<input type="submit" name="submit" value="Submit" onclick="return validation()" formaction="portal/index"/>
The controller's class level path annotation is "portal". The method that I want it to post to has a path annotation "/index".
@Controller
@Path("portal")
public class TheController
{....}
@POST
@Path("/index")
public Response login()
{....}
If the password and username are correct, then the method will forward to home.jsp. Otherwise, it will go back to index.jsp. For some reason, when I submit the form with the incorrect username and password the 1st time, it will go back to "portal/portal/index" (the form will show up) and if I submit it incorrectly a 2nd time, it will go to "portal/portal/portal/index" and the security filter it goes through will return a 404 not found. What is wrong with my set up that is leading to the duplicating URL?