File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling a action class method from JSP in struts

 
trupti nigam
Ranch Hand
Posts: 623
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,,

In struts how do I call a method in the action class from the JSP?

Thanks,
trupti
 
David Hibbs
Ranch Hand
Posts: 374
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't. You assemble a form or hyperlink to the action and invoke it via an HTTP POST or GET operation. PLEASE do not try to invoke a method in an action class directly from a JSP! This ties your view directly to your controller, and suddenly you might as well not be using MVC at all!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic