tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Dockery" <use...@sbdconsultants.com>
Subject Re: Virtual host and app
Date Sun, 02 Nov 2003 20:34:26 GMT
You need a Context node in your Host for the default context.

"Javier" <xleyba@yahoo.com> wrote in message
news:200311022104430763.00706AA5@smtp.adsl.ya.com...
>
> Hi
>
> I'm new to Tomcat 5 and I trying to get my first virtual host working.
>
> Then I tried to make a test by simply make a HelloWorld servlet deployed
in
> PruebaJavier directory (below webapps) and I configured Tomcat like this:
>
> host in server.xml
> ----------------------------
>    <Host name="pjkt" debug="0" appBase="PruebaJavier" unpackWARs="true"
> autoDeploy="true">
>          <Valve className="org.apache.catalina.valves.AccessLogValve"
>                  directory="logs"  prefix="pjkt_access_log." suffix=".txt"
>                  pattern="common" resolveHosts="false"/>
>         <Logger className="org.apache.catalina.logger.FileLogger"
>                  directory="logs"  prefix="pjkt_error_log." suffix=".txt"
>             timestamp="true"/>
>    </Host>
>
> -----------------------------
>
>
> pjkt is name asociated with 127.0.0.1 ip address in host files (in my
> WinXP).....(it's a dirty way I use to have virtual hosts in my winXP).
>
>
> In webapps/PruebaJavier/WEB-INF I've a web.xml file like this:
>
> -------------------------------------
> <web-app>
>
>     <display-name>Prueba Javier</display-name>
>     <description>
>       Prueba Javier
>     </description>
>
>
>     <!-- Define example application events listeners -->
>     <listener>
>         <listener-class>listeners.ContextListener</listener-class>
>     </listener>
>     <listener>
>         <listener-class>listeners.SessionListener</listener-class>
>     </listener>
>
>     <!-- Define servlets that are included in the example application -->
>
>     <servlet>
>         <servlet-name>HelloWorldExample</servlet-name>
>         <servlet-class>HelloWorldExample</servlet-class>
>     </servlet>
>
>
> </web-app>
> --------------------------------
>
>
> Now I tried to run http://pjkt:8080/HelloWorldExample and nothing happens
> !!! No errors in log...nothing to see....
>
>
> What I did wrong ??
>
> How could I configure a simple vhost and how could I configure my servlet
> as default index as I made with Apache with my php applications ? (I dont
> want to make jsp files).
>
> Thank in advance !
>
>
> <jl>




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message