Value cannot refresh using Java bean

When I use java bean to get a value. It suppose to refresh and show new value but it doesn't. So any code can help to resolve this issue.

here is my code

(Testing.jsp)

<html>

<head>

<title>Page 3</title>

<link rel=stylesheet type="text/css" href="auction.css">

</head>

<table class="mainBox" width="200">

<tr><td class="boxTitle" >

Testing number 3

</td></tr>

<tr><td>

<span class="headline">

<jsp:useBean id="testing2" class="com.jsp.newsys.testing.Testing2" scope="request">

<jsp:setProperty name="testing2" property="user" value="Hello World"/>

<jsp:getProperty name="testing2" property="user2"/>

</jsp:useBean>

</span>

</td></tr>

</table>

</html>

The bean file which is Testing2.java

package com.jsp.newsys.testing;

import java.beans.*;

import java.util.*;

public class Testing2 extends Object implements java.io.Serializable {

private String user;

private String test;

public Testing2() {

}

public void setUser(String user)

{

test="";

if (user.equals("Hello World"))

{

test="Hi dqwqwd";

}

}

public String getUser2()

{

return this.test;

}

}

I need to restart my tomcat everytime then only the value will refresh. Please help.

Message was edited by:

wesleygch

Message was edited by:

wesleygch

Message was edited by:

wesleygch

[1678 byte] By [wesleygcha] at [2007-11-27 0:02:29]
# 1
Your bean maybe have misspelling errorlook at test and test2 on the jsp file. But I couldn't find any bean property test2 in your bean. Maybe you should try ${testing2.test} instead of ${testing2.test2}I am a new bie also....:-)
newBiea at 2007-7-11 15:54:57 > top of Java-index,Desktop,Developing for the Desktop...