• 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
Sheriff
Posts: 36032
432
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.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!