jQuery in Action, 3rd edition
The moose likes JSP and the fly likes page cannot be displayed error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "page cannot be displayed error" Watch "page cannot be displayed error" New topic

page cannot be displayed error

Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
We have a working web application developed by a contractor (who is currently unavailable due to a deadline), and I'm the new hire trying to make modifications to a JSP page. To do so, I've attempted to copy over all necessary files from the server to my development machine after installing Tomcat. I'll call the application's directory myapp (located in Tomcat\webapps). In myapp\ROOT, the index.html file contained a simple redirect to the external WWW URL. I've changed it to this:

However, when I type in my browser either localhost or http://localhost, it goes to that index.html and then redirects to the above URL, but it always says the page cannot be displayed. I figured one possible problem could be that the original redirect URL was an HTTPS one, and that maybe that wouldn't make sense to use that with localhost, but I've played with that both ways and can't get it to work. So then I tried a JSP example that I had already run in another directory (specifically, in C:\Tomcat\webapps\ROOT\mytest\hello.jsp), and I dropped that hello.jsp into the myapp directory and tried to call it like this:
However, I get the same error! I'm not sure what I should be investigating for problems here.
There was a myappconfig.txt file in C:\Tomcat (the top-level directory), and in there he had hardcoded some file locations and URLs, including the following:
That's my modified version. Previously it had been an https address with the WWW site of the application (so on the production server, when you type localhost, he has it hardcoded so it goes directly to the webapp).
Using XP's ability to search in the text of files, I've searched throughout the Tomcat directory for both myappconfig.txt and logonURL, but that myappconfig.txt is the only place either of them are mentioned (unless they're hardcoded into some servlet or something like that).
Anyway, I hope that's enough info to give someone an idea of what I should be checking for. Thanks for any help!
Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
Is there a /Tomcat/webapps/myapp/WEB-INF/ directory?
The directory doesn't need to have anything in it, but it has to be there. Otherwise, Tomcat won't recognize that "myapp" is a web application at all.

Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
Yes, there is a WEB-INF directory in C:\Tomcat\webapps\myapp\. I don't think I really changed a lot. The difference is that I'm trying to actually get to this app via localhost, and on the production machine there's no way to really do that since localhost's index really just redirects you to the live WWW site, so I'm thinking there's something hardcoded to keep me from being able to do that here...
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
By the way, neither of these two URLs works for me:
How do I make sure my machine listens to https on 8443?
Calling netstat -a at the command line doesn't say anything about port 8443 as far as I can tell.
I agree. Here's the link: http://aspose.com/file-tools
subject: page cannot be displayed error
It's not a secret anymore!