aspose file tools*
The moose likes JSP and the fly likes org.apache.jasper.JasperException: java.lang.NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "org.apache.jasper.JasperException: java.lang.NullPointerException" Watch "org.apache.jasper.JasperException: java.lang.NullPointerException" New topic
Author

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

Raja gopal Mani
Greenhorn

Joined: Jan 23, 2013
Posts: 12
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

Joined: Jan 28, 2008
Posts: 5575



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

Joined: Jan 10, 2002
Posts: 61241
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Raja gopal Mani
Greenhorn

Joined: Jan 23, 2013
Posts: 12
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

Joined: Jan 23, 2013
Posts: 12
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

Joined: Jan 28, 2008
Posts: 5575

Welcome to JavaRanch Raja

Raja gopal Mani wrote:I will try to correct them

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: org.apache.jasper.JasperException: java.lang.NullPointerException