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 Special redirection 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 "Special redirection" Watch "Special redirection" New topic
Author

Special redirection

Kacem Bel
Ranch Hand

Joined: Jan 26, 2011
Posts: 30

Hi everyone,


I'm running a JEE6 application on JBoss AS6, i need to do some URL redirection in such way if a user type : www.mydomaine.com/username, he will be redirected to the profile of the user with the given "username",

the problem is that when you type the username after the domaine name, JBoss AS is thinking about it as an application context and it gives me a 404 resource not found...

is there any solution in JEE6 to accomplish this need ?

thanks in advance


regards


OCP-JP 6 - OCE-JPAD - OCE-EJBD
Kacem Bel
Ranch Hand

Joined: Jan 26, 2011
Posts: 30



I can take any suggestions even if it's not in the JEE6
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Sounds like you need to run your web app as the ROOT web app.

Alternatively, if there's an Apache in front of JBoss, this is something that the mod_rewrite module is perfect for.


Ping & DNS - updated with new look and Ping home screen widget
Kacem Bel
Ranch Hand

Joined: Jan 26, 2011
Posts: 30

Hi Ulf Dittmer,


Hmm i see, i think i will go for mod_rewrite, thanks for the tips ;)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Special redirection
 
Similar Threads
How I can recoup an information of the one session web service ?
Problems with Runtime.exec()
Navigation problem
change password
Where to provide the username and password for connecting to Oracle data base using Jboss