Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception: Servlet.service() for servlet jsp threw exception

 
ashwini hikulkarni
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
please help me to resolve the error related to jsp , I would be thankful to you
warm regards

Error is
16:47:04,209 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.uploadHistory_jsp._jspService(org.apache.jsp.uploadHistory_jsp:96)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

I am posting my JSP and Servlet kindly help me please

JSP CODE where i want to see the retrived data from database



MY ACTIONSERVLET
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think , the problem is here !!



and you are storing the request objects attribute like this :



Change it to proper name, and try !!
 
ashwini hikulkarni
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for responding

but sagar every thing is mapped clearly.. even though it is showing error

Adding to this i would also post my Upload Services.java



please respond
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Pl check the fileList object you are getting is null on not !!
 
ashwini hikulkarni
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it is getting
null
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So , How can you call a method on null object, it certainly gonna throw a NullPointerException, so find out why its set to null in your Action Class .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic