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!
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)
Joined: Jul 15, 2003
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...