Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Servlet.service() for servlet jsp threw exception

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I made a few changes in my jsp page, but it didnt work the way i expected. so i replaced the changed jsp file with my backed up copy. Since then I get this error. Restarting the tomcat server didnt work. The same version of the jsp file works in the production server. But the test server show this error in the log file. Not sure what went wrong. Can someone explain me why this error is occuring?



The error is pointing towards the Display_jsp file line number 70 available in work/Catalina/localhost/_/org/apache/jsp folder.




In work/Catalina/localhost/_/org/apache/jsp folder. I find two files Display_jsp.java and Display_jsp.class. While replacing the Display.jsp from my backed up copy should I have replaced the Display_jsp.java and Display_jsp.class files too from my backup? Was this not generated by the tomcat server. Restarting the apache tomcat server must have created the new .java and .class files for this jsp file is it not? I am kind of confused, can someone please help me solve the problem?
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I take it you have not redeployed the app, you are just manually replacing the files?

Is redeploying+restarting an option for you?
 
Romeo Ranjan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I just manually replaced the Display.jsp file thats it..
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's Java code in the JSP? Is this an old legacy page?

You need to determine which line is causing the NPE and find out which reference is null.

And learn not to put Java in a JSP where is most certainly does not belong.
 
Romeo Ranjan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

Thanks for the reply..This is an application that was created years before and I have to give support. I have nothing to do with the development part. I will see which variable is having null reference. Between I have question. Whenever I make changes to this jsp page, should I be precompiling in a command line? or just making changes to the jsp file and restarting the tomcat server will take care of the compilation part? The weird thing is that the same jsp file work just fine in the production but why not in the test server?
 
samuel smith
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any differences in the server configuration? Something to investigate!
 
reply
    Bookmark Topic Watch Topic
  • New Topic