wood burning stoves 2.0*
The moose likes Servlets and the fly likes forwarding from a servlet to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "forwarding from a servlet to jsp" Watch "forwarding from a servlet to jsp" New topic
Author

forwarding from a servlet to jsp

Valarie Brandt
Greenhorn

Joined: Oct 03, 2003
Posts: 24
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

Joined: Dec 11, 2004
Posts: 13410

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" />


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Originally posted by Valarie Brandt:
<jsp :p roj4JavaBean id="queryEmployee" type="bean" scope="session"/>


You are using, <jsp:useBean ... > , arent you!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: forwarding from a servlet to jsp