This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes redirects based on sub-hosts visited Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "redirects based on sub-hosts visited" Watch "redirects based on sub-hosts visited" New topic
Author

redirects based on sub-hosts visited

Francisco Hernandez
Greenhorn

Joined: Sep 07, 2003
Posts: 5
ok im not sure if this is something that can be done by servlets but what im trying to do is go from SuperGroup.Bar.com to Bar.com/webApp/groups/SuperGroup
I would like a dynamic way of being able to add hosts so i can have a backend that i can add these 'groups' and as soon as i click create group on my webapp I should be able to goto the newGroup.Bar.com
Sloan Bowman
Ranch Hand

Joined: Jan 21, 2003
Posts: 107
What you are looking for is more of a DNS issue than java in my opinion. But you can create a servlet (granted you are running as as superuser and have the permissions to do so) that creates the webapp directory and edits the server.xml file (Tomcat) or equiv in your app server and then restartes your server to allow this virtual host to be used. Depending on your application server or container though there is probably a tool already build for you to do this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: redirects based on sub-hosts visited
 
Similar Threads
Tomcat virtual hosting, does each host need it's own subdirectory off webapps?
Edit File
Upload succesful but cant reach from http
realm jndi active directory help
Multiple domain requests from single javascript.