Need Help: Problem with JSP setProperty to Bean
[nobr]Hi,
This is my first time posting to this forum so I am not completely aware how Duke dollars work but if anybody can help me I will be happy to give some... whats normal for solving a problem? 10?
Anyway... the problem...
I have a simple JSP with a simple HTML <form> that has a text field and a Submit button. Submit takes the user to the next JSP page however the setter method for property 'user' is never called. I can verify this through an attached debugger.
I am using Tomcat 5.5, and I never had a problem like this in previous versions of Tomcat.
I have tried changing the scope of the bean to request however nothing changed. I excluded all my business logic and tested this one more time just to make sure I wasn't inadvertadely screwing with something however this still does not work.
I am sure I am missing something small but for the life of me I can't figure out what.
Here is my code:
index.jsp
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<jsp:useBean id="something" scope="session" class="com.db.servlet.UserBean">
<jsp:setProperty name="something" property="*"/>
</jsp:useBean>
Select
<form id="Form1" method="post" action="multi.jsp">
User:
<input type="text" name="user" size="20"><br>
<input type="submit" value="Submit">
</form>
<br>
Or select Single mode.</P><br>
<a href="tris.html">tris</a>
</body>
</html>
UserBean:
package com.db.servlet;
publicclass UserBean{
private String user =null;
public UserBean(){
}
publicvoid setUser(String user){
this.user = user;
}
public String getUser(){
return user;
}
}
[/nobr]

