954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

JSP and class file help!

Hi Guys,
This is probably a very basic query, but asnyways. I'm trying to write a jsp website involes doing some data calculations. However, I'm having problems trying to get my own java classes to be recognised by tomcat. So far I've tried :-
1. putting the classes in the same directory as the jsp page.
2. packaging the classes and putting the package in the same dir. as the jsp page
3. using both the include and import methods to import my classes
But nothing seems to work. I keep getting the same error e.g
MyVariable var
^ - Cannot find symbol

Can someone please help and tell me what I'm doing wrong bearing in mind that I'm a complete JSP newb.

Tenketsu
Newbie Poster
1 post since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

Hi, i think you need to put them in the WEB-INF folder of your application and then shutdown and restart Tomcat.

Edit: Sorry i think the packages need to go into the WEB-INF - classes folder.

Cerberus
Junior Poster
162 posts since Sep 2006
Reputation Points: 27
Solved Threads: 14
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You