Solved

.jsp page gives exception when hosted to the server.

Posted on 2012-04-12
9
436 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
trouble with PDF encryption using itext-1.3.1 17 84
HTML5 vs JSP - REST based application development 4 1,052
using if condition without JSTL 2 108
'exit' is not valid keyword in java 14 152
An article on effective troubleshooting
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

785 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