I am currently trying to remove embedded tomcat from my code, and run it externally. So I dont have update it inside the code each time they come out with a new Tomcat version. When I try to drop my code into the webapp directory and run it this error shows up
org\apache\jsp\Index_jsp.java:3: package javax.servlet does not exist
import javax.servlet.*;
of coures this happens for more then javax.servlet. Does anyone have any ideas on what I should do, I have read many forms on this but none of them have proven to be useful.
I am currently trying to remove embedded tomcat from my code,
org\apache\jsp\Index_jsp.java:3: package javax.servlet does not exist
import javax.servlet.*;
To avoid the above error include servlet-api, jsp-api jar files in the classpath.
This message was edited 1 time. Last update was at by ruquia tabassum
John Lark
Ranch Hand
Joined: Feb 08, 2010
Posts: 60
posted
0
Ill try adding those to my .classPath if they are not already there thanks! As for what the first linke meant I am currently using and embedded version of tomcat and am trying to move to an external version. So right now tomcat is within my program in this case it works flawlessly its when I try to run it with an external version of tomcat that I have the issues. However, Ill post back as to if your suggestion worked.
John Lark
Ranch Hand
Joined: Feb 08, 2010
Posts: 60
posted
0
I am still suffereing from the same issue, but think your right about the class path... whats the best way to determine if my class path is right or wrong? Files keep getting moved and changed and manipulated and to be frank I have no idea whats going on at this point. I am compeltley and utterly confused Tomcat is angry, mean and vicous as the name would suggest LOL! Also, would anyone know where a good Tomcat tutrial for struts is? Prefferbly not the one on the Apache website it hasnt been a tremendously large amount of help...
John Lark
Ranch Hand
Joined: Feb 08, 2010
Posts: 60
posted
0
Another quick question, do I need to be using the servlet-api in Tomcats library or the one I have created? If it isnt to much trouble I would also like to ask why?
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 11689
posted
0
do I need to be using the servlet-api in Tomcats library or the one I have created?
Yes you need to use the servlet-api.jar to compile if you are using the official servlet API and Tomcat.
If you are trying to find a servlet container that is smaller and simpler than Tomcat, they certainly exist.
Grizzly is a high performance container that is well thought of.
Jetty is another that has been around quite a while. The latest release implements servlet version 3.0.