• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

loading an action class in jsp

 
Ar Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64958
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ar Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64958
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic