This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using servlets with java beans

 
Giselle Dazzi
Ranch Hand
Posts: 168
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Do you know how I can call beans methods from a servlet.
I mean, Im trying to find out how to do a


from inside a servlet instead of a jsp page.
I tried instantiating the bean class and then calling the get method I want but since it's a new instance, I dont see the content it has been set by the session.
Thx in advance,
 
cyril vidal
Ranch Hand
Posts: 247
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Giselle,
The best way to see how you may call a javabean from a serlvet is to check the code of the servlet generated by your JSP page.
I'm sure you know that at translation time, JSP pages are converted into servlets..
So just cut and paste..
Regards,
Cyril
 
Tim Baker
Ranch Hand
Posts: 541
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and if you don't know if your using tomcat look in tomcat/work
 
Giselle Dazzi
Ranch Hand
Posts: 168
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thx, I got it, here's the code I used:
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic