• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Url to app server

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Define the context root of your web application (in the EAR depoyment descriptor) as "/".
Kyle
 
Davie Ali
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kyle - does that work for a WAR file as well ?
[ April 14, 2004: Message edited by: Davie Ali ]
 
Davie Ali
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the exact error message you get from the browser?
Kyle
 
Davie Ali
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get a 404 error (which is page not found) ?
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 think I'll just lie down here for a second. And ponder this tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!