Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean Problem

 
Raja Islam
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i have a problem using jsp and bean.i made a Login.jsp and set its title from bean
<jsp:useBean id="loginBean" class="com.LoginBean" scope="session" />
<head><title><jsp:getProperty name="loginBean" property="title" /></title>
and the request of Login.jsp is submit to a servlet and servlet invoke method of bean in this method bean change its value of title.i check that the title is changing in bean with sop(title).from bean i redirect the page with the help of req.sendRedirect("Login.jsp");. but at the Login.jsp when i get the value it show me the old value of title.i used scope="page" and scope="request" but it is not working
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you try a scope of "session" - sendRedirect creates a new request so page or request scope is not what you want.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic