struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Prager" <Bernd.Pra...@RSGSystems.com>
Subject retrieveMessageResources: NullPointerException
Date Thu, 02 Dec 2004 17:59:31 GMT
After days of reading tons of docs and searching the mail archive I feel
kind of stupid right now.
I know this question came up a couple of times but I didn't find the
answer.
Here I am and hope you can help me:

I try to use the bean:message tags and my index.jsp fails with:
--- snip -------------------
Dec 2, 2004 11:47:42 AM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
    at
org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java
:1219)
    at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082)
    at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226)
    at
org.apache.jsp.index_jsp._jspx_meth_bean_message_0(org.apache.jsp.index_
jsp:135)
    at
org.apache.jsp.index_jsp._jspx_meth_html_html_0(org.apache.jsp.index_jsp
:102)
    at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:71)
    at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:325)
    at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82
5)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:731)
    at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:526)
    at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
    at java.lang.Thread.run(Unknown Source)
--- snip -------------------

I have following index.jsp:
--- snip -------------------
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

<html:html locale="true">
<head>
	<title><bean:message bundle="text" key="index.title" /></title>
	<html:base/>
</head>

<body>
test
</body>
</html:html>
--- snip -------------------

My struts-config.xml is:
--- snip -------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE struts-config
	PUBLIC "-//Sun Microsystems, Inc.//DTD Struts Configuration
1.2//EN"
	"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
	
<struts-config>
	<message-resources
		key="text"
		parameter="ApplicationResources"
		null="false"
	/>
	
<action-mappings>
 	<action path="/index" forward="/index.jsp">
	</action>
</action-mappings>

</struts-config>
--- snip -------------------

I do have ApplicationResources.properties in webapps\app\WEB-INF\classes
And struts-config.xml in webapps\app\WEB-INF, also in
webapps\app\WEB-INF\lib:
commons-beanutils.jar    commons-digester.jar    commons-logging.jar
jakarta-oro.jar
commons-collections.jar  commons-fileupload.jar  commons-validator.jar
struts.jar

All files are readable to all users.
I think something is wrong with my struts-config file.
I read that the message bundle might not be available yet when I invoke
index.jsp directly.
I that the cause of my problem?

Thanks for any help.
-- Bernd


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message