Search code examples
webspheredefaultear

Set WebSphere's default application


So instead of the url http://myserver.com/ returning me

SRVE0255E: A WebGroup/Virtual Host to handle /jsp/index.jsp has not been defined. SRVE0255E: A WebGroup/Virtual Host to handle myserver.com:80 has not been defined.

I want it to redirect to the application set at http://myserver.com/myapp

It seems to be trying to redirect to /jsp/index.jsp already, I just need to change that url...

I did this in WebLogic but having trouble figuring it out in WebSphere.

I tried setting the Context root of the application I want as default to '/'. Which worked in setting it as homepage -- but it's not precisely what I'm looking for and it broke the application in question (probably due to resources it uses).

There HAS to be a nicer way to set my homepage to redirect to the application... It seems like a gross oversight, if there isn't a nice way to set a default, but I can't seem to find it...


Solution

  • There is no such thing in WebSphere as default application redirection. In default installation you have Default Application which is mapped to / and provides way do validate installation e.g. snoop servlet.

    You can do one of the following:

    • Install YOUR application with the / as context root and uninstall or change context root in the Default Application
    • If you use HTTP server in front, define redirection there
    • If you don't have HTTP server or your application doesn't work with / context root, you could implement very simple application with one page doing redirect to your primary application
    • lastly, but I wouldn't recommend that, you could add that page with redirect to the provided Default Application installed.