This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Welcome file & resource constrained. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Welcome file & resource constrained." Watch "Welcome file & resource constrained." New topic
Author

Welcome file & resource constrained.

asce digia
Greenhorn

Joined: Nov 29, 2005
Posts: 2
Hallo folks.
I'd like to know whether is possible to constrain a welcome file.
More precisely: I constrained the welcome file ( index.jsp ). When type in the URL http:\\myHost:myPort\Webapp\ the resource isn't constrained, when I type the URL http:\\myHost:myPort\Webapp\index.jsp the resource is constrained.
I need to constrain the index.jsp and maintain it as welcome file.
Can you help me ?

Thanks a lot.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Ascenzo",
Please change your display name back.

We require display names to be two words: your forst name, a space then your last name. Accounts with invalid display names get deleted, often without warning.

thanks,
Dave.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

by 'constrained' I assume you men you want users to log in before accessing this page? You may want to make the welcome page to be not restricted, and have it redirect to a non-welcome page that is.

eg if the 'welcome' page is welcome.jsp but the actual secured page is index.jsp, and index.jsp is not in the weclome list, you just have welcome.jsp redirect to the index.jsp page and it doesn't matter how they refer to the welcome page.

Dave
asce digia
Greenhorn

Joined: Nov 29, 2005
Posts: 2
Thanks,
but is it possibile avoiding the redirect ? Only using declarative logic ( web.xml ) ?
I 'm working with a already-done web app so I'd like to modify the least possible.

thanks again.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You can configure the resource as secure via the DD and then require users to login before viewing. Search this forum or checkout the API for more info.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
Don't get me started about those stupid light bulbs.
 
subject: Welcome file & resource constrained.
 
Similar Threads
JSP/Servlet combination
Passing values in URL to Java Web application
welcome-file-list in web.xml
servlet deployment error in web.xml on WSAD 4.x
What's going on? Servlet mapped: "/" now can't find any images/stylesheets!