envirement: jdk 1.4.2 tomcat 5.0.28 winXP
1. setup virtual host
1.1 modified the file
%tomcat%/conf/
server.xml
1.1.1 location: search the string below:
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
1.1.2 add the string below to setup the new domain's default application
1.1.1 location: search the string below:
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
1.1.2 add the string below to setup the new domain's default application
<Host name="eric.zhu.net" debug="0"
appBase="D:/launched/REQUEST FORM/AjaxStart/build"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
</Host>
appBase="D:/launched/REQUEST FORM/AjaxStart/build"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
</Host>
1.2 create the new project's source files
1.2.1 add folder ROOT in this path
D:/launched/REQUEST FORM/AjaxStart/build
1.2.2 put the project's files in this new folder:
D:/launched/REQUEST FORM/AjaxStart/build/ROOT
1.3 now we can visit the new domain eric.zhu.net:port
1.2.1 add folder ROOT in this path
D:/launched/REQUEST FORM/AjaxStart/build
1.2.2 put the project's files in this new folder:
D:/launched/REQUEST FORM/AjaxStart/build/ROOT
1.3 now we can visit the new domain eric.zhu.net:port
1.4 note: we need to visit the site like eric.zhu.net:8080/hello.jsp if no index.html file in the ROOT folder.
3. add new virtual folder in refered domain.
3.1 create folder named
eric.zhu.net in the path %tomcat%/conf/Catalina
3.2 create a new context file: (%tomcat%/conf/Catalina/eric.zhu.net/AjaxStart.xml)
the context file's content like these:
<Context path="/AjaxStart" reloadable="true" docBase="E:/projects/AjaxStart/build" >
</Context>
3.2 create a new context file: (%tomcat%/conf/Catalina/eric.zhu.net/AjaxStart.xml)
the context file's content like these:
<Context path="/AjaxStart" reloadable="true" docBase="E:/projects/AjaxStart/build" >
</Context>
3.3 now we can visit the url:
eric.zhu.net:port/
AjaxStart
4. set host file to test the new domain:
(if we setup the server face to the street customer,
we should setup DNS to implement ip and domain's reflect)
(if we setup the server face to the street customer,
we should setup DNS to implement ip and domain's reflect)
192.168.12.15 eric.zhu.net