struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shyam Anand <struts_new...@yahoo.com>
Subject Re: NullPointerException
Date Thu, 16 Dec 2004 17:44:05 GMT
Hi,

I have not fully understood the context in which you
get this error. However, I noticed that in your action
mapping in struts-config.xml,

<quote>
  <action
    	path="/InsertArticle"
    	type="articles.ArticleAction"
    	name="articleForm"
    	scope="request"
    	validate="false"
    	input="/Template.jsp">
	<forward name="success"
path="/articles/preview.jsp"/>
	<forward name="failure"
path="/articles/Template.jsp"/>
	</action>

<unquote>

you do not specify the complete path for your input
JSP - input="/Template.jsp". I guess it should be: 
path="/articles/Template.jsp"/.
Wonder if this might be causing the error.

HTH,
Shyam



--- "uma.k" <uma.k@net-kraft.com> wrote:

> I get NullPointerException when I access this
> index.jsp page. I also have
> ApplicationResources.properties file in
> web-inf/classes folder
> 
> <%@ taglib uri="/WEB-INF/struts-bean.tld"
> prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld"
> prefix="html" %>
> <html>
> <head>
> <title><bean:message
> key="title.employeeApp"/></title>
> </head>
> <body>
> <h1><bean:message key="title.employeeApp"/></h1>
> <br>
> <html:link page="/articleForm.do">Add An
> Article</html:link>
> </body>
> </html>
> 
> This is my struts-config.xml file
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> 
> <!DOCTYPE struts-config PUBLIC
>           "-//Apache Software Foundation//DTD Struts
> Configuration 1.2//EN"
>          
>
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
> 
> 
> <struts-config>
> 
> <form-beans>
>     <form-bean name="articleForm"
> type="articles.ArticleForm"/>
> </form-beans>
> 
> <action-mappings>
> 
> 	<action path="/articleForm"
> 			forward="/articles/Template.jsp" />
> 
>     <action
>     	path="/InsertArticle"
>     	type="articles.ArticleAction"
>     	name="articleForm"
>     	scope="request"
>     	validate="false"
>     	input="/Template.jsp">
> 	<forward name="success"
> path="/articles/preview.jsp"/>
> 	<forward name="failure"
> path="/articles/Template.jsp"/>
> 	</action>
> 
> </action-mappings>
> 
> 	<message-resources
> 		parameter="ApplicationResources"
> 		null="false" />
> 
> 
> </struts-config>
> 
> 
> This is my complete exception
> 
> java.lang.NullPointerException
> 	at
>
org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:121
> 9)
> 	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._jspService(index$jsp.java:68)
> 	at
>
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> 	at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:201)
> 	at
>
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
> 	at
>
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
> 	at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
> 	at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> 	at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:243)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> 	at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 	at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:190)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> 	at
>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
> 46)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> 	at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 	at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
> 	at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> 	at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:170)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> 	at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> )
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> 	at
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> 	at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 	at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :174)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> 	at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 	at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> 1027)
> 	at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
> )
> 	at java.lang.Thread.run(Thread.java:595)
> 
> 
> What could be wrong?
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

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


Mime
View raw message