Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:form tag action - configurable

 
Mark Manns
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone

I want to control the code that shows up in the html:form tag action property in the jsp (i.e. action="/internal/save.do" or action="/internal/update.do"). I'm using the same jsp and ActionForm - the only thing different is the controller selection. I can render the page if I put something like "nextAction" "/internal/save.do" onto the request and then use a scriptlet in the jsp --- but I don't like this approach.

Does anyone know how to address this problem?
Any help greatly appreciated.

Mark
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34372
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark,
This probably isn't the best way, but we sometimes use JavaScript to change the value of the action depending on what the user has clicked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic