• Post Reply Bookmark Topic Watch Topic
  • New Topic

New Virtual Host

Michael Zalewski
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to set up a site in Websphere 4.0 / IIS 5.0 / Windows 2000.
I want to make a virtual host for my site, so that my pages can be accessed URLs like
The images are at URLs like
The servlet is a control servlet accessed at
<pre>http://my.virtual.host/servlet/MyServlet/..extra stuff..</pre>
I have built this all into a .war file, and deployed it. Everything works fine except
1) The welcome file (which is called Login.jsp) is not recognized. The request goes back to IIS, which gives a 'Under Construction' message. However, if you type the full URL as <pre>http://my.virtual.host/Login.jsp</pre> it works.
2) The images don't work. Again, the request goes back to IIS. So I can make the images work by setting up a virtual host in IIS called Images, and mapping it to d:\WebSphere\AppServer\installedApps\myApp.ear\myApp.war\Images (which I don't want to do)
What am I doing rong?
[ November 21, 2002: Message edited by: Michael Zalewski ]
[ November 21, 2002: Message edited by: Michael Zalewski ]
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to love this...
We just moved our first batch of J2EE code from WebSphere 3.5 to 4.0. As far as migrating the code, it went beautifully. As far as configuring WAS4.0, it didn't.
The problem? We discovered a "feature" of WAS 4.0.
It took 4+ hours to figure out what was going on, too, not including the isolation of "it's the virtual hosts." Google came up short. Sun.com and JavaRanch came up short. Public IBM pages? get real--have you tried finding stuff there?!?!
When I finally managed to get logged into their support section, I ran a number of searches and finally found the key.
You can't use a jsp as a welcome file if you have a virtual host configured with a context root of "/".
Heaven forbid a J2EE developer should ever want to run on a virtual host and have a JSP as the primary page. I can't imagine why I ever even tried it! Sheesh. To quote the IBM support page:

This is really "working as designed".
PQ54168.RN was created in addition to WAS V4.0.2 Release Notes.
The plugin is working as designed in the sense that the rule in the plugin-cfg.xml config file of "*.jsp" should match the request "/path/index.jsp".
Based on the logic defined of the config file, it is not hitting the "wrong" app. The plugin can't know that any specific request should be ignored, even though it is defined by the *.jsp rule. Customer should use the solution below to enable functionality they are requesting which his to enable WAS to serve all content, bypassing the webserver.

As designed. Pfeh. Why on Earth anyone would DESIGN this is beyond me.
Anyway, the fix is as follows:
1. Define a servlet via AAT using the following information, class name = com.ibm.servlet.engine.webapp.SimpleFileServlet uri = /
2. Redeploy the ear file
3. Regenerate the plugins
Note: This only needs to be done if want to use the file serving enabler for context root of "/". For example, http://www.mydomain.com/index.html

Oh, and for those of you with support contracts, the page is at
Heaven help you get a connection and get validated, but there ya go.
[ December 19, 2002: Message edited by: David Hibbs ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!