Troubleshooting

Can't Compile the Servlet

Q1:Why won't my servlet compile? The compiler reports that it can't find the javax.servlet package.
Your classpath isn't set up correctly. You need to locate the servlet.jar file (it might have a different name) and add it to your classpath. You can also use the j2ee.jar file that comes with the J2EE SDK. If you can't find a file with either of these names, consult the documentation for your servlet engine to locate the correct filename.

The Servlet Won't Run

Q1:Why does the Web server gives me a 404 (File Not Found) error or a 500 (Internal Server Error)?
This is usually either an installation problem or a classpath issue. One way to check the installation is to run one of the default servlets that comes ...

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.