• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

page cannot be displayed error

 
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
http://localhost/myapp/hello.jsp
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:
logonURL,http://localhost/myapp/Login.jsp
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!
 
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, neither of these two URLs works for me:
https://localhost:8443/
https://localhost:8443/examples/servlets/index.html
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.
 
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic