Two Laptop Bag*
The moose likes Struts and the fly likes How to call struts action as Website default home page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to call struts action as Website default home page" Watch "How to call struts action as Website default home page" New topic
Author

How to call struts action as Website default home page

najmi thayyil
Greenhorn

Joined: Mar 27, 2001
Posts: 4
Hi friends
I have registered www.xyz.com and i want to call the www.xyz.com/xyz/prepareIt.do lin when the user types www.xyz.com, Any body knows how can i implement this without a index.jsp redirection?


Thanks in advance
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The best solution to this would be to place "prepareit.do" in the web.xml welcome file list.

Unfortunately, I can't do this, because I use WebSphere as my Application Server, and WebSphere only supports URIs in the welcome file list that are backed by physical files such as index.html, or index.jsp. It does not support virtual URIs such as "prepareit.do" that are only resolved at run-time.

I've been told that WebLogic does support virtual URIs in the welcome file list, but I haven't verified that first-hand.

All I can tell you is that if you use an Application Server other than WebSphere, try putting "prepareit.do" in the welcome file list. If it doesn't work I'm afraid you're stuck with redirecting from an index.jsp page.


Merrill
Consultant, Sima Solutions
najmi thayyil
Greenhorn

Joined: Mar 27, 2001
Posts: 4
I am using Resin and Tomcat and both doesn't support it in the welcome-list. Now from index.jsp i am redirecting the request to xyz/prepareIt.do. Expecting other suggestions.

And also Do you guys have any idea how the redirection affects the google ranking?
[ February 13, 2007: Message edited by: najmit ]
Kaustabh Singha Roy
Ranch Hand

Joined: Oct 04, 2005
Posts: 43
The HTTP 302 Temporary Redirect has negative impacts on the site ranking. However that should not happen if it is a HTTP 301 Permanent Redirect.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

"najmit",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call struts action as Website default home page