• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

forwarding from a servlet to jsp

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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" />
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic