• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I posted this at springsource.org 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.

Questions:
  • 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,

    Ed
    reply
      Bookmark Topic Watch Topic
    • New Topic