File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes loading  an action class in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "loading  an action class in jsp" Watch "loading  an action class in jsp" New topic
Author

loading an action class in jsp

Ar Reddy
Greenhorn

Joined: Nov 03, 2008
Posts: 20
Hi there, I wanted to load an action class in a jsp file . Any ideas how to do this.
Thanks,
Reddy
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

Why? What purpose would that serve?

You should have no Java code in a JSP, as that is a poor practice that has been discredited for almost 10 years now.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ar Reddy
Greenhorn

Joined: Nov 03, 2008
Posts: 20
I have a scenario. My welcome page should show, which is link to an action. My welcome.jsp need to get data from the database on the page load and show it in tabluar form . That can be done by calling a n action in jsp if it's success then page will display. My question i sneed to load it on th epage loead instead of a href link.
Any suggessions would be fine.
Thanks,
Arpitha.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

You should not be doing database access or Java processing of any kind in the JSP -- that's the job of the controller and model.

Please read this article for information on how to properly structure web applications.
 
GeeCON Prague 2014
 
subject: loading an action class in jsp