This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am facing problem in defining relative path in jsp pages.
I include the pages using following code.
On my system using eclispe and tomcat 5.5 it is running fine and it is fetching the page.
But when i try to run it on server I mean server of some web hosting copnay I am getting the following error. I tried to correct it but it seems like that The web hosting server dont know the ../.. format.
I think they have disabled ../.. because of security constraints as if they allow any one can write code to go to its parent directories and can get the details and can delete them or modify them if they have permission. But truly speaking I don't know what the actual thing is?
My pages are in different folders now to bypass this error I can put them all under web-inf but then it will become very hard to manage them.
Originally posted by Sudipto Shekhar: I do not have much idea but the error says that the container cannot find the path you have specified. Which is the context root of your application?
The application is running fine in my system. The problem is coming that when the hosting machine sees ../.. it is not going to parent of parent directory. It is trying to use it as complete URL. You may see the error log.
Can't we use <c:import> to import some page. I am always getting page not found error. Can someone help me that why this error is coming? The file is in the folder tiles which is located in WebContent.
Even with the jsp:include I am getting same error.
But when I try this
It is working fine on my system but on webserver(Hosting server) It is not fetching the page and also not showing any error. Only contents are coming with no headers and footers.
I am not able to find that whats the problem? Can someone help me ? [ December 15, 2008: Message edited by: Himanshu Gupta ]
Thanks everyone. The problem got solved as it was context path issue. When I was putting everything in the root folder it was not taking any context path. I made a folder and named it as project name and pasted all the project files there. It is working fine.