Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SimpleFormController. HTML action left blank. Spring creates action under WEB-INF  RSS feed

Edward Winchester
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I posted this at but didn't get any replies. Wonder if anyone has witnessed this before?

Spring is generating an HTML form action attribute under WEB-INF. This leads to a 404 when submit it pressed. Here's a bit of background into my very small app:

I have a controller to handle login. It extends SimpleFormController:

Also have a "standard" view resolver:

Here's my login form from the JSP page (note the action is not specified):

I'm developing this application on 3 different computers (depending on where I am location-wise). On 2 of the computers, when the form is presented in the browser and I look at the HTML source, the HTML form tag's action attribute is "/test/agentLogin.htm". This is as I would expect.

On the 3rd computer, I get the following: "/test/WEB-INF/jsp/agentLogin.jsp". This then leads to a HTTP 404 error when submit is pressed.

If I hardcode the action attribute in the JSP to "/test/agentLogin.htm" all's fine.

  • Am I being sloppy in missing out the action attribute? This page says it's not required.
  • Could this be a bug in Spring showing itself under certain circumstances?

  • Thanks,

    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!