views:

2277

answers:

5

I want to use a java file "SaveProp" which is written in a package "user". The class file has been placed in the WEBINF/classes.Below are the two lines which causes the issue.

jsp:useBean id="user" class="user.SaveProp" scope="session"

jsp:setProperty name="user" property="*"

This is the code, but it throws, The value for the useBean class attribute user.SaveProp is invalid

I'm using Tomcat 6.0

Thanks in advance.

A: 

You should put the file under WEBINF/classes/user

kgiannakakis
Thanks a lot man.It works..
A: 

Even though i kept the file in users folder i am getting the same err? what might be the problem?

+1  A: 

3 things

  1. Make sure the class file is under WEBINF/classes/user
  2. Make sure there is a public default constructor without arguments
  3. You can also use type= instead of class= if the bean already exists in the scope
tiktock
A: 

The value for the useBean class attribute com.* is invalid.

udj
A: 

Make sure the defualt no-arg constructor is there and its public

Monish Gandhi