gisrob wrote: > Can anybody offer any guidance or advice on how I can set up some virtual > hosts for my application that has multiple skins. > > I want to be able to go to http://flavour1 instead of having to type in > http://longhostname/service/program.jsp?skins=flavour1, and similar for > flavour2, flavour3, etc.. > > All the documentation seems to point to virtual directories, and when I have > tried to use the syntax detailed here > http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html > http://gandhim.wordpress.com/2008/01/31/tomcat-55-virtual-directory/ > http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_21242062.html > > Tomcat tries to open a directory called /service/program.jsp?skins=flavour1/ > > How do I phrase the context syntax correctly? > > MTIA > > Rob >
Write a Servlet Filter that parses HttpServletRequest.getServerName() and performs the same action that whatever handles the "skins=flavour1" parameter does. In server.xml set the Engine attribute defaultHost to the single host that will handle your application. (This assumes that you know what you're doing re: DNS) p --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org