facebook

Simple bean application can’t find class

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #231542 Reply

    wsheaffer
    Member

    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

    #231561 Reply

    Riyad Kalla
    Member

    Tim,
    As far as I know you have always have to fully qualify your classnames, I’m not surprised that “UserData” doesn’t work. Also keep in mind that you are reporting what seems to be app server issues (500) which are unrelated to MyEclipse. While we are more than happy to help, this may just be a case of wrong-code.

    Maybe I missed what you were saying, please clarify it if I did and you were infact pointing to a different issue.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Simple bean application can’t find class

You must be logged in to post in the forum log in