Solved

.jsp page gives exception when hosted to the server.

Posted on 2012-04-12
9
435 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Javascript onclick event 4 105
Display current date,month,and year to JTextField 3 47
constructor overloading 2 79
memory representation of int[][][] a=new int[2][][]; 10 59
Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

937 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

5 Experts available now in Live!

Get 1:1 Help Now