This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSP and the fly likes Call java method from jsp 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 » Java » JSP
Bookmark "Call java method from jsp" Watch "Call java method from jsp" New topic

Call java method from jsp

rakesh krish

Joined: Jan 09, 2011
Posts: 7
Hello All,

How do i call my java method from jsp. I have written a method to generate pdf and i want to invoke this method from my jsp?? Please do advice on what approach do i need to take to achieve this.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60050

Invoke how? You need to supply more detail.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Stefan Evans

Joined: Jul 06, 2005
Posts: 1016
If you want to invoke java code, the best way is to write it as a servlet.

You can return the generated PDF via the servlet output stream from the servlet.
I agree. Here's the link:
subject: Call java method from jsp
Similar Threads
calling a .jsp page from a javabean
reply immediately
run applet from java class
How to call a cgi/perl script from jsp/java bean
AJAX Issue - Messages got lost...