Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


 

Java Tutorials


 

 

Struts Tutorials

Struts Resources

Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Null Pointer Exception In Struts2HelloWorld, Struts Struts2 Struts 2 Hello World Files

User Comments
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl
  Blink   Furl   Simpy   Y! MyWeb 

;
 
Java Examples for Beginners
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

1 comments so far (post your own) View All Comments Latest 10 Comments:

I downloaded "struts2-blank-2.0.9" and configured it as per this site to run the Struts2HelloWorld application.

The build was successful.

----------------------
Buildfile: build.xml

clean:
[delete] Deleting directory C:\Program Files\Apache Software Foundation\Tomca
t 5.5\webapps\struts2tutorial\WEB-INF\classes
[mkdir] Created dir: C:\Program Files\Apache Software Foundation\Tomcat 5.5\
webapps\struts2tutorial\WEB-INF\classes

prepare:
[copy] Copying 1 file to C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\struts2tutorial\WEB-INF\src\classes

resources:

compile:
[javac] Compiling 1 source file to C:\Program Files\Apache Software Foundati
on\Tomcat 5.5\webapps\struts2tutorial\WEB-INF\src\classes
[jar] Building jar: C:\Program Files\Apache Software Foundation\Tomcat 5.5
\webapps\struts2tutorial\WEB-INF\lib\struts2tutorial.jar

project:

all:

BUILD SUCCESSFUL
Total time: 4 seconds
---------------------------------------

But when I am trying to open the HelloWorld.jsp page in the browser I am getting Null pointer exception.

-----------------------------------------------
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

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

exception

org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NullPointerException
org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
org.apache.jsp.example.HelloWorld_jsp._jspx_meth_s_text_0(org.apache.jsp.example.HelloWorld_jsp:127)
org.apache.jsp.example.HelloWorld_jsp._jspService(org.apache.jsp.example.HelloWorld_jsp:69)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
------------------------------------------------

I searched in google with this exception on this link

https://issues.apache.org/struts/browse/WW-1969

Plz assist me.
Thanks in advance.



Posted by Suraj Gupta on Tuesday, 09.11.07 @ 15:35pm | #26751

Ask programming questions?

 

 

Back to Tutorial
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name

 

 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright 2007. All rights reserved.