| Author |
webpages on Tomcat
|
|
| eddiekwang@hotmail.com 2005-10-27, 9:57 pm |
| Hi,
I am a JSP newbie. I installed apache tomcat on my PC. I can view all
the example JSP pages at http://localhost:8080/jsp-examples/. The files
themselves reside at C:\Program Files\Apache Software Foundation\Tomcat
5.0\webapps\jsp-examples.
So I created a html and a JSP page in C:\Program Files\Apache Software
Foundation\Tomcat 5.0\webapps\. but i can't seem to view them via http.
Am I missing something really fundamental here?
Any help will be greatly appreciated!
Eddy
| |
| HalcyonWild 2005-10-27, 9:57 pm |
|
eddiekwang@hotmail.com wrote:
> Hi,
> I am a JSP newbie. I installed apache tomcat on my PC. I can view all
> the example JSP pages at http://localhost:8080/jsp-examples/. The files
> themselves reside at C:\Program Files\Apache Software Foundation\Tomcat
> 5.0\webapps\jsp-examples.
>
> So I created a html and a JSP page in C:\Program Files\Apache Software
> Foundation\Tomcat 5.0\webapps\. but i can't seem to view them via http.
>
> Am I missing something really fundamental here?
> Any help will be greatly appreciated!
>
> Eddy
====
1. what is the url being typed in your browser
2. avoid putting your html and jsp directly inside webapps folder, it
does not work as far as I know.
3. make a folder (say, call it something). Put your jsp and html inside
webapps\something.
4. in browser, it is localhost:8080/something/jspName.jsp
| |
| eddiekwang@hotmail.com 2005-10-27, 9:57 pm |
| Thank you for the quick response!
Yes I did make a subfolder, and put a file called index.html in this
directory:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\test_jsp
Then I went to this URL to access it:
http://localhost:8080/test_jsp/index.html
The error message from the browser said "The requested resource
(/test_jsp/index.html) is not available."
I am really and frustrated...
Eddy
| |
| Thomas Hawtin 2005-10-27, 9:57 pm |
| eddiekwang@hotmail.com wrote:
>
> Yes I did make a subfolder, and put a file called index.html in this
> directory:
> C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\test_jsp
>
> Then I went to this URL to access it:
> http://localhost:8080/test_jsp/index.html
>
> The error message from the browser said "The requested resource
> (/test_jsp/index.html) is not available."
If you add files to /jsp-examples, does that work?
Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
| |
|
| after u created the subfolder ...did u restart the tomcat server....if
not , restart the server....and your problem will be solved
| |
| eddiekwang@hotmail.com 2005-10-28, 7:02 pm |
| I restarted the server twice. and it still doesn't work... :<
| |
| eddiekwang@hotmail.com 2005-10-28, 7:02 pm |
| Tom,
yes it works if i add files to the /jsp-examples folder.
but why doesn't it recognize the subfolder i created under \webapps?
does this mean that i need to tell the server that i created that
subfolder?
eddy
| |
|
|
| eddiekwang@hotmail.com 2005-10-28, 7:02 pm |
| i finally got it to work!! it turns out that i do have to tell the
server about the new directory.
i follow the instructions on this link:
http://www.devx.com/webdev/Article/16416/1954?pf=true
Thank you everyone for your help!
eddy
|
|
|
|