Solved

.jsp page gives exception when hosted to the server.

Posted on 2012-04-12
9
434 Views
Last Modified: 2012-06-13
This the error message:

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: /StudentProfile_1.jsp(17,2) File "/../Redirection.jsp" not found
      org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
      org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
      org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
      org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:346)
      org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:379)
      org.apache.jasper.compiler.Parser.parseDirective(Parser.java:491)
      org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1932)
      org.apache.jasper.compiler.Parser.parse(Parser.java:127)
      org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
      org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:118)
      org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:326)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:307)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.35 logs.
0
Comment
Question by:CWS (haripriya)
  • 4
  • 3
  • 2
9 Comments
 
LVL 16

Author Comment

by:CWS (haripriya)
ID: 37838459
Additional Info:

The same set of files when stored inside a folder called 'web' works fine.
0
 
LVL 19

Expert Comment

by:Bardobrave
ID: 37838530
Well.... it seems a path problem.

Your /StudentProfile_1.jsp file seems to be trying to load a Redirection.jsp file that is not placed in the path you specify. Probably your folder structure on development and production environments is different? Check those folder structures and fix your file routes. You'll probably face more issues like this.
0
 
LVL 16

Author Comment

by:CWS (haripriya)
ID: 37839228
Redirection.jsp file exists in that path. Anyone else?
0
 
LVL 27

Expert Comment

by:rrz
ID: 37840862
>"/../Redirection.jsp" not found
Your path seems odd.  
Did you try without the leading "/"
 ../Redirection.jsp  
If that doesn't work, then show us your file structure and  your code.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 19

Expert Comment

by:Bardobrave
ID: 37841250
If inside a folder "web" it works and outside of it it doesn't seems pretty obvious that there is something wrong on your paths or on your folder structure, but we cannot guess it.
0
 
LVL 16

Author Comment

by:CWS (haripriya)
ID: 37850214
These two line are the one which gives error.

<%@ include file="../Redirection.jsp" %>
<%@ include file="../connection.jsp" %>

Even if I give the direct absolute path like "http://www.website.com/Redirection.jsp" it gives the same error.

The path are ok. I checked many times. The whole website works fine if it is inside a 'web' folder. All are relative paths only. So, if I upload the files to 'public_html' it should work. But gives error. This is not my  project. I am only hosting it in the server. Additional info is that the project was built using NetBeans and I am hositng it in Tomcat server. I have no idea why NetBeans create a folder called 'web' and creates all the project files.

After some research in the internet I found that context.xml and web.xml files are important. Anyone know what am I supposed to do in that xml files so that the website works?
0
 
LVL 19

Accepted Solution

by:
Bardobrave earned 250 total points
ID: 37850583
Check:

J2EE tutorial

and

Deploying web applications to Tomcat

I hope you found some answers there.
0
 
LVL 27

Assisted Solution

by:rrz
rrz earned 250 total points
ID: 37851552
If the JSPs that you are trying to include are in the same folder as StudentProfile.jsp , then try  
<%@ include file="Redirection.jsp" %>
<%@ include file="connection.jsp" %>

If they are in the root folder of your web app, then try
<%@ include file="/Redirection.jsp" %>
<%@ include file="/connection.jsp" %>  

If those don't work, then show us the file structure on your server.
0
 
LVL 16

Author Closing Comment

by:CWS (haripriya)
ID: 38081913
Sorry for the delay. Thanks for all the suggestions.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
Find out what the Office 365 disclaimer function is, why you would use it and its limited ability to create Office 365 signatures.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now