Que é erro é esse quando tento rodar minha servlet no tomc

2 respostas
C

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.util.MissingResourceException: Can’t find bundle for base name LocalStrings, locale pt_BR

java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:837)

java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:727)

java.util.ResourceBundle.getBundle(ResourceBundle.java:577)

HelloWorldExample.doGet(HelloWorldExample.java:39)

javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.


Apache Tomcat/5.5.9

2 Respostas

R

post o código !

C

/*

  • Copyright 2004 The Apache Software Foundation
  • Licensed under the Apache License, Version 2.0 (the “License”);
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  • http://www.apache.org/licenses/LICENSE-2.0
    
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an “AS IS” BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.
    /
    /
    $Id: HelloWorldExample.java,v 1.3 2004/03/18 16:40:33 jfarcand Exp $

*/

import <a href="http://java.io">java.io</a>.<em>;

import java.text.</em>;

import java.util.<em>;

import javax.servlet.</em>;

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("&lt;html&gt;");
    out.println("&lt;head&gt;");

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

    out.println("&lt;title&gt;" + title + "&lt;/title&gt;");
    out.println("&lt;/head&gt;");
    out.println("&lt;body bgcolor=\"white\"&gt;");

// 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("&lt;a href=\"../helloworld.html\"&gt;");
    out.println("&lt;img src=\"../images/code.gif\" height=24 " +
                "width=24 align=right border=0 alt=\"view code\"&gt;&lt;/a&gt;");
    out.println("&lt;a href=\"../index.html\"&gt;");
    out.println("&lt;img src=\"../images/return.gif\" height=24 " +
                "width=24 align=right border=0 alt=\"return\"&gt;&lt;/a&gt;");
    out.println("&lt;h1&gt;" + title + "&lt;/h1&gt;");
    out.println("&lt;/body&gt;");
    out.println("&lt;/html&gt;");
}

}

Criado 17 de maio de 2005
Ultima resposta 17 de mai. de 2005
Respostas 2
Participantes 2