Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 26852 invoked from network); 7 Aug 2007 08:52:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2007 08:52:54 -0000 Received: (qmail 63200 invoked by uid 500); 7 Aug 2007 08:52:42 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 63176 invoked by uid 500); 7 Aug 2007 08:52:42 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 63165 invoked by uid 99); 7 Aug 2007 08:52:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 01:52:42 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pierluigi.fabbris@poste.it designates 62.241.4.129 as permitted sender) Received: from [62.241.4.129] (HELO relay-pt3.poste.it) (62.241.4.129) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 08:52:30 +0000 Received: from [80.104.114.32] (80.104.114.32) by relay-pt3.poste.it (7.3.122) (authenticated as pierluigi.fabbris@poste.it) id 46B7A84500006B22 for users@tomcat.apache.org; Tue, 7 Aug 2007 10:52:16 +0200 Message-ID: <46B832B9.9090501@poste.it> Date: Tue, 07 Aug 2007 10:52:09 +0200 From: Fabbris Pierluigi User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Tomcat Users List Subject: Local String Problem Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, I've this Exception in the Log: 7-ago-2007 10.38.05 org.apache.catalina.core.StandardWrapperValve invoke GRAVE: Servlet.service() for servlet invoker threw exception java.util.MissingResourceException: Can't find bundle for base name LocalStrings, locale it_IT at java.util.ResourceBundle.throwMissingResourceException(Unknown Source) at java.util.ResourceBundle.getBundleImpl(Unknown Source) at java.util.ResourceBundle.getBundle(Unknown Source) at HelloWorldExample.doGet(HelloWorldExample.java:39) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) The HelloWorldExample that I use is the HelloWorldExample for the Example of Tomcat. This file start when I start with example, but not in my web-apps to give me the Exception above. The code of HelloWorldExample is: /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 500674 2007-01-27 23:15:00Z markt $ * */ import java.io.*; 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(""); out.println(""); String title = rb.getString("helloworld.title"); out.println("" + title + ""); out.println(""); out.println(""); // 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(""); out.println("\"view"); out.println(""); out.println("\"return\""); out.println("

" + title + "

"); out.println(""); out.println(""); } } The problem I believe is in: ResourceBundle rb = ResourceBundle.getBundle("LocalStrings",request.getLocale()); but I don't know how can I resolve. The code with this line I think common and I want to resolve the problem forever. How? Sincerally yours, Fabbris Pierluigi --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org