Wrox Home  
Search P2P Archive for: Go

  Return to Index  

servlets thread: =?gb2312?B?UmU6IFtzZXJ2bGV0c10gY2FuJ3QgZ2V0IHNlcnZsZXRzIHRvIHJ1biBvbiB0b21jYXQ=?=


Message #1 by "david_s" <david_s@1...> on Sun, 16 Mar 2003 19:09:55 +0800 (CST)
post protected?public?
or get method?

> i have the proper entries in the web.xml and server.xml, so thats 
> definately not the problem. however, when i do run my servlet, i get this 
> error message:
> 
> ---------------------------------------------------------------------------
> 
> Error: 500
> Location: /meetthestudent/servlet/helloworld
> Internal Servlet Error:
> 
> java.lang.NullPointerException
> 	at java.lang.ClassLoader.resolveClass0(Native Method)
> 	at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
> 	at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass
> (AdaptiveClassLoader.java, Compiled Code)
> 	at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass
> (AdaptiveServletLoader.java:174)
> 	at org.apache.tomcat.core.ServletWrapper.loadServlet
> (ServletWrapper.java:265)
> 	at org.apache.tomcat.core.ServletWrapper.init
> (ServletWrapper.java:289)
> 	at org.apache.tomcat.core.Handler.service(Handler.java:254)
> 	at org.apache.tomcat.core.ServletWrapper.service
> (ServletWrapper.java:372)
> 	at org.apache.tomcat.core.ContextManager.internalService
> (ContextManager.java:812)
> 	at org.apache.tomcat.core.ContextManager.service
> (ContextManager.java:758)
> 	at 
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection
> (HttpConnectionHandler.java:213)
> 	at org.apache.tomcat.service.TcpWorkerThread.runIt
> (PoolTcpEndpoint.java, Compiled Code)
> 	at org.apache.tomcat.util.ThreadPool$ControlRunnable.run
> (ThreadPool.java, Compiled Code)
> 	at java.lang.Thread.run(Thread.java:479)
> 
> ---------------------------------------------------------------------------
> 
> the code of the servlet is as follows:
> 
> ---------------------------------------------------------------------------
> 
> package helloworld;
> /**
>  * <p>Title: </p>
>  * <p>Description: </p>
>  * <p>Copyright: Copyright (c) 2003</p>
>  * <p>Company: </p>
>  * @author not attributable
>  * @version 1.0
>  */
> 
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import javax.servlet.ServletException;
> 
> import java.io.IOException;
> import java.io.PrintWriter;
> 
> public class HelloWorld extends HttpServlet {
>   protected void doPost (HttpServletRequest request, HttpServletResponse 
> response) throws ServletException, IOException {
>     response.setContentType("text/html");
>     PrintWriter out = response.getWriter();
>     out.println("<html>\n\t<body>\n\t\t<basefont 
> face=\"verdana\">\n\t\tHello World!\n\t</body>\n</html>");
>     out.close();
>   }
> }
> 
> ---------------------------------------------------------------------------
> 
> what's the problem? thanx for any help, i would immensely appreciate it!
> 
> -Tom
> 
=============================================================
网易VIP收费邮箱 成功人士的最佳选择!          http://vip.163.com/
玫瑰、巧克力、和情侣铂金钻戒!                  http://vip.163.com/lover/new_love.jsp
春天到了孤独的你还不约会 约会其实很简单            http://dating.163.com/


  Return to Index