• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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!
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic