Meaningless Drivel is fun!
The moose likes Servlets and the fly likes Bean Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Bean Problem" Watch "Bean Problem" New topic

Bean Problem

Raja Islam
Ranch Hand

Joined: Dec 07, 2001
Posts: 74
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

Joined: Mar 22, 2000
Posts: 13037
I suggest you try a scope of "session" - sendRedirect creates a new request so page or request scope is not what you want.
I agree. Here's the link:
subject: Bean Problem
It's not a secret anymore!