• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts URL mapping question

 
liang sun
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use struts to develop a web application.
Homepage's URL is http://www.aaaaa.com/web/aaa.do
But our client hope when they type www.aaaa.com, page that IE shows is same as page that is http://www.aaaaa.com/web/aaa.do
Please ask how to solve. Thank you reading and help!
 
Shed Hollaway
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
liang,
You should try two things to get the desired result. First, setup a welcome-file in your web.xml to remove the aaa.do. Then, configure jk2 (a webserver-to-webappserver connecter) to change http://www.aaaaa.com/web/ to http://www.aaaaa.com/.

I use struts to develop a web application.
Homepage's URL is http://www.aaaaa.com/web/aaa.do
But our client hope when they type www.aaaa.com, page that IE shows is same as page that is http://www.aaaaa.com/web/aaa.do


Hope this helps!
Shed.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may also configure a Filter to add the required parameters, when the request URL does not contain any query strings.

Nick
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shed's tip about configuring jk2 only works if you have an Apache HTTP server in front of your web container. Also, adding a welcome file into your application's web.xml or configuring a servlet filter doesn't help unless your application is mapped to the "default context" of your container.

Could you describe what kind of server setup you're using?
[ May 21, 2004: Message edited by: Lasse Koskela ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic