• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

beans in servlet

 
Abhijeet Gholkar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys
Can i use beans in servlet, as they are used in jsp.
<I><jsp:useBean id="test" class="test" scope="sesson"/>
<jsp:setProperty name="test" property="*"/></I>
If yes please tell me were can i get information about it.
Raja
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet API does not have any magic tags like those in JSP so you would have to write out the method calls necessary to get and set parameters. You would also have to provide for creating and saving the bean.
Take a look at what your JSP page is generating as Java source to get an idea of what you would have to create.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic