You appear to be missing a quote in your input field around the name attribute:
With regards to debugging, Put some extra statements on your JSP page to test certain values.
I would recommend checking
- the request parameter being passed in (is the form value being submitted)
- the value in the bean (is the value being passed into the bean)
- the sesion id (are we maintaining the session)
On page 2, this code will see that the parameter is passing through correctly
And then check if your bean is being populated.
On page 3, the parameter should be null, the bean username should be populated, and the sessionid should be the same as the previous one.
Joined: Jul 01, 2007
Earlier i was getting 'The value for the useBean class attribute is invalid' error and on googling i got links which said that there should be a public default constructor without arguments in the java bean class. But for me issue was with class files not under WEB_INF directory.
Is it necessary that i include a public default constructor without arguments in the java bean class? As i see that above code runs fine without the constructor also.