Hello my name is Tim Willson, ITS 5 with the Minneosota Department of Finance. I had posted this under a closed topic “Simple JSP Application cannot see class”
Warren Shaffer is conducting a training class and we have hit this bean problem.
On Warren’s machine the project runs correctly but with the student machine we see a 500 error. I’ve zipped the project into a file that I can send you. “org.apache.jasper.JasperException: /SaveName.jsp(28,2) The value for the useBean class attribute UserData is invalid.”
Basically the
Code:
<%@ page import=”us.mn.state.finance.*” %>
<jsp:useBean id=”user” class=”us.mn.state.finance.UserData” scope=”session”/>
works correctly in the .jsp file but the
Code:
<%@ page import=”us.mn.state.finance.*” %>
<jsp:useBean id=”user” class=”UserData” scope=”session”/>
Our setter.jsp file has the following code
Code:
<%@ page import=”us.mn.state.finance.*” %>
<jsp:useBean id=”user” class=”us.mn.state.finance.UserData” scope=”session”/>
<jsp:setProperty name=”user” property=”*”/>
works correctly in the .jsp file and
Code:
<%@ page import=”us.mn.state.finance.*” %>
<jsp:useBean id=”user” class=”UserData” scope=”session”/>
<jsp:setProperty name=”user” property=”*”/>
did not.
It appears to be a default search path of sorts or a configuration setting in not finding the class.
-tw