Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error when compiling servlet

843835Apr 23 2003 — edited Apr 24 2003
I have this error and don't understand exactly what it means. Any advice on where to look to research it? I tried typing in the exception itself and even wrapper, but am not getting anything that explains to me why it happened and how to fix it.

[code error]
javax.servlet.ServletException: Wrapper cannot find servlet class com.kpotter.servlet.EmployeeServlet or a class it depends on
[code error]
package com.kpotter.servlets;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.kpotter.beans.EmployeeProfile;

public class EmployeeServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse res)
		throws ServletException, IOException {
		//Set the Content-Type header
		res.setContentType("text/html");
		PrintWriter out = res.getWriter();
		EmployeeProfile profile = new EmployeeProfile();
		/**
		* Write out the HTML page.
		* */
		out.println("<HTML>");
		out.println("<HEAD><TITLE>Employee</TITLE></HEAD>");
		out.println("<BODY>");
		out.println(profile.getfirstName());
                out.println("</BODY></HTML>");
	        out.close(); 
	}
	// End of the HTTP doGet() method.

	public void doPost(HttpServletRequest req, HttpServletResponse res)
		throws ServletException, IOException {
			doGet(req, res);
	}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2003
Added on Apr 23 2003
12 comments
139 views