File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to call a method in action passing a parameter inside jsp with struts 1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to call a method in action passing a parameter inside jsp with struts 1" Watch "How to call a method in action passing a parameter inside jsp with struts 1" New topic
Author

How to call a method in action passing a parameter inside jsp with struts 1

Konstantin Netkachev
Greenhorn

Joined: Jul 24, 2009
Posts: 15
Given a method in action class:

public String foo(String str) {
//Some code
}

How to call it in jsp?
Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
Why do you need that? From the view you should call only accessor methods!


OCJP 6 (93%)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You don't; there's no direct access to actions from the JSP in Struts 1.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call a method in action passing a parameter inside jsp with struts 1
 
Similar Threads
Struts --- Customised RequestProcessor
jsp and action class
anyone face Error - tag.getAsString : component context is not defined?
How to call a method other than execute in jsp in struts 2
calling a action class method from JSP in struts