here is the source code, thanks:


/* $Id: HelloWorldExample.java,v 1.2.4.1 2000/07/05 17:45:01 nacho Exp $
 *
 */

import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
 * The simplest possible servlet.
 *
 * @author James Duncan Davidson
 */

public class HelloWorldExample extends HttpServlet {


    public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
        throws IOException, ServletException
    {
        ResourceBundle rb =
            ResourceBundle.getBundle("LocalStrings",request.getLocale());
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();

        out.println("<html>");
        out.println("<head>");

            String title = rb.getString("helloworld_Hello_Servlet.title");

            out.println("<title>" + title + "</title>");
        out.println("</head>");
        out.println("<body bgcolor=\"white\">");
        out.println("<body>");

        // note that all links are created to be relative. this
        // ensures that we can move the web application that this
        // servlet belongs to to a different place in the url
        // tree and not have any harmful side effects.

        // XXX
        // making these absolute till we work out the
        // addition of a PathInfo issue

            out.println("<a href=\"/examples/servlets/helloworld.html\">");
        out.println("<img src=\"/examples/images/code.gif\" height=24 " +
                    "width=24 align=right border=0 alt=\"view code\"></a>");
        out.println("<a href=\"/examples/servlets/index.html\">");
        out.println("<img src=\"/examples/images/return.gif\" height=24 " +
                    "width=24 align=right border=0 alt=\"return\"></a>");
        out.println("<h1>" + title + "</h1>");
        out.println("</body>");
        out.println("</html>");
    }
}




-----Ursprüngliche Nachricht-----
Von: shashi kanth goud [mailto:[EMAIL PROTECTED]]
Gesendet am: Mittwoch, 29. August 2001 15:58
An: [EMAIL PROTECTED]
Betreff: Re: Internal Servlet Error:

plz send ur code
regards 
shashi
On Wed, 29 Aug 2001 Eric Fogang wrote :
>Hi,
>I want to test my servlet application, but there is a 
>wrong message (Error 500).
>please help me.
>Thanks
>
>
>Error: 500
>Location: /test2/hello
>Internal Servlet Error:
>
>java.util.MissingResourceException: Can't find bundle 
>for base name LocalStrings, locale de
> at java.util.ResourceBundle.throwMissingResourceExcepti-
>on(ResourceBundle.java:707)
> at java.util.ResourceBundle.getBundleImpl(ResourceBundl-
>e.java:604)
> at java.util.ResourceBundle.getBundle(ResourceBundle.ja-
>va:559)
> at HelloWorldExample.doGet(HelloWorldExample.java:25)
> at javax.servlet.http.HttpServlet.service(HttpServlet.j-
>ava:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.j-
>ava:853)
> at org.apache.tomcat.core.ServletWrapper.doService(Serv-
>letWrapper.java:404)
> at org.apache.tomcat.core.Handler.service(Handler.java:-
>286)
> at org.apache.tomcat.core.ServletWrapper.service(Servle-
>tWrapper.java:372)
> at org.apache.tomcat.core.ContextManager.internalServic-
>e(ContextManager.java:797)
> at org.apache.tomcat.core.ContextManager.service(Contex-
>tManager.java:743)
> at org.apache.tomcat.service.http.HttpConnectionHandler-
>.processConnection(HttpConnectionHandler.java:210)
> at org.apache.tomcat.service.TcpWorkerThread.runIt(Pool-
>TcpEndpoint.java:416)
> at org.apache.tomcat.util.ThreadPool$ControlRunnable.ru-
>n(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
>
>________________________________________________________-
>___________________
>To unsubscribe, send email to [EMAIL PROTECTED] and
>include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet--
>interest.html
>Resources: http://java.sun.com/products/servlet/external-
>-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.ht-
>ml
>


 
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to