• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with bean using Apache  RSS feed

 
Anurag Saxena
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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
 
Sandeep. Oza
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • 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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!