Previous
|
Next
| Back to Messages
Printable View -
Brief Headers
H:\tomcat331\webapps\examples\WEB-INF\classes>javac RequestHeaderExample.java RequestHeaderExample.java:8: package javax.servlet does not exist import javax.servlet.*; ^ RequestHeaderExample.java:9: package javax.servlet.http does not exist import javax.servlet.http.*; ^ RequestHeaderExample.java:17: cannot find symbol symbol: class HttpServlet public class RequestHeaderExample extends HttpServlet { ^ RequestHeaderExample.java:21: cannot find symbol symbol : class HttpServletRequest location: class RequestHeaderExample public void doGet(HttpServletRequest request, ^ RequestHeaderExample.java:22: cannot find symbol symbol : class HttpServletResponse location: class RequestHeaderExample HttpServletResponse response) ^ RequestHeaderExample.java:23: cannot find symbol symbol : class ServletException location: class RequestHeaderExample throws IOException, ServletException ^ RequestHeaderExample.java:62: cannot find symbol symbol : class HttpServletRequest location: class RequestHeaderExample public void doPost(HttpServletRequest request, ^ RequestHeaderExample.java:63: cannot find symbol symbol : class HttpServletResponse location: class RequestHeaderExample HttpServletResponse response) ^ RequestHeaderExample.java:64: cannot find symbol symbol : class ServletException location: class RequestHeaderExample throws IOException, ServletException ^ 9 errors I presume the problem is the classpath doesn't include the JAR file that has javax.servlet etc. I presume to fix that I need to explicitly set -classpath parameter in javac command. But I have no idea where that particular JAR file is locayed, so that I know what path to specify in the -classpath parameter. Also I'm unable to find the XML file that maps applications to servlet class files, so that I could edit that XML file to include new servlets I write myself. So instead of doing that, I'm trying to modify the sample applications and re-compile them, hence the compiler errors listed above. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Previous
|
Next
| Back to Messages
Save Message Text
|