aspose file tools *
The moose likes Websphere and the fly likes Url to app server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Url to app server" Watch "Url to app server" New topic
Author

Url to app server

Davie Ali
Greenhorn

Joined: Apr 14, 2004
Posts: 15
I have installed an application onto Websphere application server 5.0 and I can access it through http://ip address/appname (IBM Http Server) and also through http://ip address:9080/appname (App Server).
I want to access this application through a url e.g. http://www.myapp.co.uk.
I have tried setting a virtual host in IBM Http Server but I still need to put in the application name e.g. http://www.myapp.co.uk/appname. I want to access the application by just using the url (without the appname).
Can anyone help me with this?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Define the context root of your web application (in the EAR depoyment descriptor) as "/".
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Davie Ali
Greenhorn

Joined: Apr 14, 2004
Posts: 15
Thanks Kyle - does that work for a WAR file as well ?
[ April 14, 2004: Message edited by: Davie Ali ]
Davie Ali
Greenhorn

Joined: Apr 14, 2004
Posts: 15
I gave this a try with the WAR application that I have and I still cannot get through to my application by just using the url
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Explain to me the exact steps that you took and I'll see if I can figure out why it didn't work for you. This IS the way to make this work -- I've done this dozens of times. There's probably a step you're missing.
Kyle
Davie Ali
Greenhorn

Joined: Apr 14, 2004
Posts: 15
Kyle
I setup my application with the context as "/"
I created a new virtual host within the application server
I mapped the application to the new virtual host
I then updated the http plug-in
It did not work even with a reboot of the whole server
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
What's the exact error message you get from the browser?
Kyle
Davie Ali
Greenhorn

Joined: Apr 14, 2004
Posts: 15
I get a 404 error (which is page not found) ?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
OK, do you see any output in the log files when this happens (e.g. is the plugin routing a request to the app server which the app server cannot then find?) (By the way another way to test this is to try "http://localhost:9080/" and see if the App Server responds correctly.)
Kyle
[ April 14, 2004: Message edited by: Kyle Brown ]
Davie Ali
Greenhorn

Joined: Apr 14, 2004
Posts: 15
I don't see anything in the logs and the application does work on http://localhost:9080.
Do you need to setup a virtual host in both the Http Server and the Application Server ? I thought the plug-in took care of this ?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
The plugin DOES take care of this. To convince myself I knew what I was doing I just sat down and wrote and installed an application with a context root of "/" myself and it works, even through the plugin.
Are you SURE you did a GenPluginCfg? Also, you've said you created a new virtual host on the app server but you've hinted that you didn't create one on the HTTP server -- yes, that could be the issue. The Plugin contains mappings between virtual hosts and URL's -- but if the HTTP server doesn't know about the virtual host it wouldn't be able to pass it on to the plugin.
However, given what you're doing, I don't understand why you're not just using the default_host. What's your reasoning for creating a new virtual host?
Kyle
Davie Ali
Greenhorn

Joined: Apr 14, 2004
Posts: 15
I do have a virtual host setup in the IBM HttpServer - however this might be where the problem is.
My IP Virtual host has a ServerName of www.test.co.uk (url which I am trying to access my application).
What should the DocumentRoot be set to ?
I tried a virtual host in the app server just to try to get it working - yes I have now kept my application under the default host in the app server.
I am updating the plug-in by using the websphere application console.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Url to app server