• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.apache.jasper.JasperException: java.lang.NullPointerException

 
Raja gopal Mani
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the below error when I try to run my jsp page ! Please guide me to fix this thing

HTTP Status 500 -

type Exception report

message

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

exception

org.apache.jasper.JasperException: java.lang.NullPointerException

root cause

java.lang.NullPointerException

note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1_01 logs.
Sun Java System Application Server 9.1_01


The code for the jsp page is



File : surevac.agreements.model.ContractError.java
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


errMap or eContract may be null. just print those before doing this.

and debugging java code in jsp is pain .
<edit>use jstl/el </edit>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is there Java code in your JSP in 2013? Java scriptlets have been obsolete and discredited since 2002. That's 11 years ago! It is irresponsible and unprofessional to be using Java scriptlets in JSPs in 2013. Please read this JspFaq entry.
 
Raja gopal Mani
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Why is there Java code in your JSP in 2013? Java scriptlets have been obsolete and discredited since 2002. That's 11 years ago! It is irresponsible and unprofessional to be using Java scriptlets in JSPs in 2013. Please read this JspFaq entry.


Yes, you are right ! I am new to Java technology and have to submit a sample project this month for my course and hence I am working with what I learnt so far...
The link you provided is very informative and I will try to update my code with JSTL, thanks for the share
 
Raja gopal Mani
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seetharaman Venkatasamy wrote:

errMap or eContract may be null. just print those before doing this.

and debugging java code in jsp is pain .
<edit>use jstl/el </edit>


Yes, their values are showing null when I checked the code
I will try to correct them
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch Raja

Raja gopal Mani wrote:I will try to correct them

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic