• 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

problem with bean using Apache

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not able to to the following in Apache:
******
<jsp:useBean id="credentials" class="db.MyBean" scope="session" />
<jsp:setproperty name="credentials" property="*"/>
<%= "User is 1 " + credentials.getUser() %>
<%= "User is 2 " + request.getParameter("user") %>
*******
When I call this from my html page by entering "Hello" for user field and I get the following:
***********
User is 1
User is 2 Hello
***********
it means that I am not able to set the property of my bean properly. My html and jsp file
is in ROOT. My bean file is in ROOT/Web_inf/classes/db
Why I am not able to det the property?
Thanks
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Anurag,
code is right.. But what you got on the page while running this jsp..?
Pl. check by writing System.out.println("something ") in thr method... it calls the bean or not?
write what you is get displayed on jsp page.
Good Day,
Sandeep Oza
 
Goodbye moon men. Hello tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic