Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forwarding from a servlet to jsp

 
Valarie Brandt
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I have a servlet called EmpSearchResultProj4 which sends info to the javabean called Proj4JavaBean then the info is forwarded to a jsp called Proj4SearchResults.
In the jsp page i need to use jsp syntax for getting an attribute and showing its contents
I get the basic form from my book
my question is what is property suppose to be?
<jsp roj4JavaBean id="queryEmployee" type="bean" scope="session"/>
<jsp:getProperty name="queryEmployee" property="">

thanks.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the name of the property in your bean is firstName, which would mean that your setter/getter methods would be:
getFirstName and setFirstName respectively, your jsp:getProperty tag would look like this:

<jsp:getProperty name"youBeanName" property="firstName" />
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Valarie Brandt:
<jsp :p roj4JavaBean id="queryEmployee" type="bean" scope="session"/>


You are using, <jsp:useBean ... > , arent you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic