You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Purcell <sp...@vertisinc.com> on 2006/02/11 16:09:13 UTC

configure tomcat 5.x to see index without redirects?

I have created a site <http://www.theuniquepear.com> using struts over
the past couple of months. I am running Tomcat 5x and Struts 1.2x.

If you read below, I am doing a couple of redirects to get the user to
my real site.  I would like to know if I can configure Tomcat to just go
to that site? Or if I have to go through all these redirects.

 

But here is my huge problem. I have a html file in my tomcat root which
does a javascript function that directs the user to the site. Something
like this:

top.location.href="http://www.theuniquepear.com/unique/index.jsp"

 

This gets the browser into the proper webapp from the url entered, and
it calls the index.jsp page which then calls a

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

  <logic:forward name="welcome" />

 

The kind of defacto I see in all Struts books.The welcome finally calls
a welcome.do action, I go and get some buisness objects, then finally
... display the jsp page that the end user sees.

 

This all works, except any web crawlers and robots, cannot follow this
insane logic. And when I do  a curl on my url, it only shows the
index.jsp with the javascript:

 

Is there a cleaner way to get around all this redirecting, so that I can
get my business logic called up and go to a clean page, so when I do a
curl which I think the robots are using, they can actually index my
site? 

 

This is killing me. If anyone has ideas, suggestions, or could assist, I
would be appreciated.

 

Regards


Re: configure tomcat 5.x to see index without redirects?

Posted by Hassan Schroeder <ha...@gmail.com>.
On 2/11/06, Scott Purcell <sp...@vertisinc.com> wrote:

> If you read below, I am doing a couple of redirects to get the user to
> my real site.  I would like to know if I can configure Tomcat to just go
> to that site? Or if I have to go through all these redirects.

> This is killing me.

It's killing me listening to this. :-) Why is your desired default webapp
not simply *installed* as default, i.e. ROOT? End of problem.

If there's a valid reason you can't do that, set crossContext='"true"
for your two contexts and forward (*not* redirect) from /index.jsp
to /unique/index.jsp

HTH,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org