| Author |
html vs servlet
|
Naveed Ali
Ranch Hand
Joined: Aug 30, 2002
Posts: 41
|
|
I have just created a small seperate web application (given to it a eperate context path in server.xml) for Tomcat 4.0 and Win2000. I can successfuly call my servlet but can't the html file. I want to load the html file first through URL and then call this servlet from html file. How can i do it??? I am sure how to call it from within html file atleast. The directory structure is, servlet class placed in /application/WEB-INF/classes/classes index.html placed in /application/ web.xml placed in /application/WEB-INF/ Are any changes required in web.xml file regarding index.html instead of servlet mapping etc.?? I have mapped servlet successfuly and is running. The /application directory is under the /webapps directoy of Apache Tomcat installation directory.
|
 |
Ivan Matmati
Ranch Hand
Joined: Feb 26, 2003
Posts: 41
|
|
Your html file should be called with http://host : port/context/index.html. Have you tried this?What is your log saying then? [ April 22, 2004: Message edited by: Ivan Matmati ]
|
No Gates!<p>SCPJ 1.4<br />SCWCD 1.4
|
 |
Jawan Reshman
Greenhorn
Joined: Apr 01, 2004
Posts: 4
|
|
There are two solutions to your problem 1. (As suggested by Ivan Matmati in his reply). Access your page as following. http://<your host>:<your port>/context/index.html 2. Decalare in web.xml <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> and you your index.html will be displayed when accessed by http://<yourhost>:<yourport> Hope this helps.
|
 |
 |
|
|
subject: html vs servlet
|
|
|