?
Solved

.jsp page gives exception when hosted to the server.

Posted on 2012-04-12
9
Medium Priority
?
440 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)
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: 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 28

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 1000 total points
ID: 37850583
Check:

J2EE tutorial

and

Deploying web applications to Tomcat

I hope you found some answers there.
0
 
LVL 28

Assisted Solution

by:rrz
rrz earned 1000 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

Technology Partners: 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

Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
The top devops trends for 2017 are focused on improved deployment frequency, decreased lead time for change and decreased MTTR.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

752 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