Using servlet classes inside JPS? Plz help!
Hello Java People,
I have a problem that is starting to frustrate me greatly and anyone抯 help would be very appreciated.
My problem is that initially, a website site was developed wholly though servlets. I know this was wrong but hey, its what I have to live with.
I have a main servlet (portal_cgi) that catches all requests. It will then create instances of custom objects such as ONS_Database and a host of other objects we have made and use. All classes/servlets are stored in the web-inf/servlets folder. All servlets and classes can call or create instances of each other. Works great infact!!!!
Enter my JSP problem.
What I need to do is simple. Inside my JPS file, I need to create instances of objects that are stored in my servlet folder. For example
<%
ONS_Database.CarData car =new ONS_Database.CarData();
car.primaryKey =new String(?11?;
%>
Where the ONS_Database class is stored in the web-inf/servlets folder
This command works fine in all of my servlets but I cannot for the life of me import this command into any JPS file. I know its probably a one line <import> command but I simply cannot find it!!!
I understand that the use of Enterprise beans help but don抰 solve my problem. I can get a bean to return an instance of custom objects but whats the point if I cant get my jsp file to access the ONS_Database class to polymorph is back into its correct class?
My question is : How can I initialise and use classes stored in my servlet folder (web-inf/servlets) inside my JPS files?
I have bean (pun intended) searching far and wide and cannot seem to gather the answer to this problem. Lots of information that is similar but not quite solving my problem!
Thanks for the help guys!!!!
Dale M

