Solved

.jsp page gives exception when hosted to the server.

Posted on 2012-04-12
9
438 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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