JSP Object Cannot be resolved to a type

hi!

i'm new to the jsp business nd i tried to create a 3 tier program with a web interface where the web pulls out data from the data base through RMI. here UserDataObject is the interface that extends Remote interface.

However this same code works perfectly when i run it from a servlet. but it dusnt seem to work with JSP...i use tomcat 5.5 and everything is in place..(WEB-INF etc)

this is the code:

<%

try{

UserDataObject udo = (UserDataObject) Naming.lookup("//localhost:1099/Item");

Vector v = udo.getByStatus(username,0);

...........

...........

...........

}catch (NotBoundException e){

e.printStackTrace();//To change body of catch statement use File | Settings | File Templates.

}catch (SQLException e){

e.printStackTrace();

}

%>

and this is the error i get!

An error occurred at line: 110 in the jsp file: /selling.jsp

Generated servlet error:

UserDataObject cannot be resolved to a type

[/code]

I am quite confident that there's nothing wrong with RMI, since data runs back and forth in the servlets and the other application i made..

my problem is How come the same code that works perfectly in servlet doesnt work in jsp...?

plz help me out

thnx

nandun

[1661 byte] By [nandun5a] at [2007-10-2 20:32:40]
# 1

well...thnx for all the replies...how ever i did solve this problem after struggling with it for about 8 hrs...

thr trick is to put the class UserDataObject in a pakcage and import it at the top of the jsp page..

ie.

<%@ page import = "rmi.UserDataObject"%> etc...

rmi is the package i stuffed it in...

hope some1 finds this helpful and think good thoughts about me!

cheers

nandun

nandun5a at 2007-7-13 23:15:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Hi thanks for posting this. I'm a newbie to Java in general. This helped a great deal. Thanks for your 8 hr struggle.
oriensusa at 2007-7-13 23:15:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thanks very much and from me too, for the help.
masterod13a at 2007-7-13 23:15:50 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...