Olá, eu estou na parte de Struts da Apostila FJ21 da Caelum, estou seguindo os exemplos direitinho. Quando rodo um arquivo jsp qualquer, funciona beleza, mas quando rodo o exemplo da apostila esta dando esse erro, já repetir os passos mais de 20 vezes e nada de “funfar”.
ERRO:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /testa-mensagens.jsp at line 4
1: <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
2: <html>
3: <head>
4: <title><bean:message key="site.titulo"/></title>
5: </head>
6: <body>
7: <bean:message key="menu.nome"/><br/>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: Missing message for key "site.titulo" in bundle "(default bundle)" for locale pt_BR
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.testa_002dmensagens_jsp._jspService(testa_002dmensagens_jsp.java:89)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.jsp.JspException: Missing message for key "site.titulo" in bundle "(default bundle)" for locale pt_BR
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:233)
org.apache.jsp.testa_002dmensagens_jsp._jspx_meth_bean_005fmessage_005f0(testa_002dmensagens_jsp.java:106)
org.apache.jsp.testa_002dmensagens_jsp._jspService(testa_002dmensagens_jsp.java:61)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
meu MessageResources
# 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.
# -- standard errors --
errors.header=<UL>
errors.prefix=<LI>
errors.suffix=</LI>
errors.footer=</UL>
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
# -- other --
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details should follow.
errors.token=Request could not be completed. Operation is not in sequence.
# -- welcome --
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the struts-blank.war to a new WAR file using the name for your application. Place it in your container's "webapp" folder (or equivalent), and let your container auto-deploy the application. Edit the skeleton configuration files as needed, restart your container, and you are on your way! (You can find the MessageResources.properties file with this message in the /WEB-INF/src folder.)
# -- comentário de um arquivo .properties
menu.nome=Nome do menu
menu.arquivo=Escolher arquivo
menu.editar=Editar Arquivo
menu.sair=Sair da aplicação
site.titulo=Sistema de teste do Struts
minha jsp
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<html>
<head>
<title><bean:message key="site.titulo"/></title>
</head>
<body>
<bean:message key="menu.nome"/><br/>
<bean:message key="menu.arquivo"/><br/>
<bean:message key="menu.editar"/><br/>
<bean:message key="menu.sair"/><br/>
<bean:message key="menu.titulo"/><br/>
</body>
</html>