tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krip pane <jkrp...@yahoo.com>
Subject Re: URL Redirect
Date Thu, 10 Apr 2003 17:08:13 GMT

Thank you Ramsay....any suggestions on good technical
java books for a beginner like me.


--- Ramsay Domloge <rdomloge@arkemedia.com> wrote:
> By default, Tomcat will serve "index.jsp" for a
> given directory, if no 
> file is specified.
> 
> When you surf to www.google.com you are not
> specifying what file you 
> want and therefore get the default.
> 
> You need to create a JSP/HTML page in the root
> directory called 
> index.jsp (if you are only using Tomcat) or
> index.html if you are using 
> Tomcat with Apache. The page will only contain the
> following:
> 
> <html>
> 	<head>
> 		<META http-equiv="refresh" content="0;
> URL=zyx/abc/index.jsp">
> 	</head>
> </html>
> 
> This will be returned to the browser which will then
> automagically 
> request the correct page.
> 
> If you care, this is the crap way to do it. It is
> slow and requires a 
> second request from the browser, so for a single
> page request 2 
> round-trips are required. A better solution is to
> create a servlet that 
> serves the correct page without redirecting the
> browser. It will just 
> perform a server-side redirect, which is far faster
> and leaner.
> 
> If you want a quick and dirty solution, go for the
> meta tag, if you want 
> to do it properly it's time to learn Java and make a
> servlet.
> 
> Ramsay
> 
> 
> 
> krip pane wrote:
> > Hi All,
> > 
> > First my thanks to all who have responded to my
> > question - especially to Daniel Graham for
> providing a
> > detailed explaination.  
> > 
> > To clarify on the "newbie" part, I've a sys admin
> > (HP&Sun) experience, with no jsp background. I've
> been
> > thrown supporting tomcat role at my job & to learn
>  on
> > the fly.  Thus, I would like to first apologize
> for
> > asking the obvious (trivial) questions, second I
> would
> > appreciate any help I can garner from this group
> to
> > learn the technology faster.
> > 
> > Thanks
> > 
> > 
> > 
> > --- Micael <caraunltd@harbornet.com> wrote:
> > 
> >>Hi, KRIP,
> >>
> >>If you do  not understand those answers, you
> >>probably need to be a little 
> >>more explicit about how "newbie" you are, so that
> >>someone can tell how to 
> >>help you.  Those are pretty basic answers for most
> >>people on this 
> >>site.  Are you brand new?  Do you know jsp at all?
> 
> >>Let us know, then we 
> >>can be more helpful.
> >>
> >>At 12:44 PM 4/9/03 -0700, krip pane wrote:
> >>
> >>>Hi Yoa,
> >>>
> >>>I'm a newbie...Can you please expand on the
> >>
> >>solution
> >>
> >>>Thanks
> >>>
> >>>
> >>>--- "Shapira, Yoav" <Yoav.Shapira@mpi.com> wrote:
> >>>
> >>>>Howdy,
> >>>>Or a simple HTML file sitting at the root with a
> >>>><META REFRESH...> tag
> >>>>pointing to your index.jsp URL.
> >>>>
> >>>>Yoav Shapira
> >>>>Millennium ChemInformatics
> >>>>
> >>>>
> >>>>
> >>>>>-----Original Message-----
> >>>>>From: Daniel Graham
> >>>>
> >>>>[mailto:danny@sound.ee.umist.ac.uk]
> >>>>
> >>>>>Sent: Wednesday, April 09, 2003 3:12 PM
> >>>>>To: Tomcat Users List
> >>>>>Subject: Re: URL Redirect
> >>>>>
> >>>>>try
> >>>>>
> >>>>>response.sendRedirect( ".... your url " );
> >>>>>
> >>>>>DG
> >>>>>----- Original Message -----
> >>>>>From: "krip pane" <jkrp123@yahoo.com>
> >>>>>To: "tomcat" <tomcat-user@jakarta.apache.org>
> >>>>>Sent: Wednesday, April 09, 2003 8:09 PM
> >>>>>Subject: URL Redirect
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Hi,
> >>>>>>
> >>>>>>Can someone please help in redirecting url's
> >>
> >>with
> >>
> >>>>>>tomcat as standalone server.
> >>>>>>
> >>>>>>I would like to redirect all requests for
> >>>>>>http://www.abc.com/xyz/abc/index.jsp
> >>>>>>
> >>>>>>so that when a user types
> >>>>>>http://www.abc.com
> >>>>>>
> >>>>>>they'll be redirected to the first URL.
> >>>>>>
> >>>>>>TIA
> >>>>>>
> >>>>>>
> >>>>
> >>__________________________________________________
> >>
> >>>>>>Do you Yahoo!?
> >>>>>>Yahoo! Platinum - Watch CBS' NCAA March
> >>
> >>Madness,
> >>
> >>>>live on your
> >>>>desktop!
> >>>>
> >>>>>>http://platinum.yahoo.com
> >>>>>>
> >>>>>>
> >>>>
>
>>---------------------------------------------------------------------
> >>
> >>>>>>To unsubscribe, e-mail:
> >>>>
> >>>>tomcat-user-unsubscribe@jakarta.apache.org
> >>>>
> >>>>>>For additional commands, e-mail:
> >>>>
> >>>>tomcat-user-help@jakarta.apache.org
> >>>>
>
>>---------------------------------------------------------------------
> >>
> >>>>>To unsubscribe, e-mail:
> >>>>
> >>>>tomcat-user-unsubscribe@jakarta.apache.org
> >>>>
> >>>>>For additional commands, e-mail:
> >>>>
> >>>>tomcat-user-help@jakarta.apache.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>This e-mail, including any attachments, is a
> >>>>confidential business communication, and may
> >>
> >>contain
> >>
> >>>>information that is confidential, proprietary
> >>
> >>and/or
> >>
> >>>>privileged.  This e-mail is intended only for
> >>
> >>the
> >>
> 
=== message truncated ===


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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


Mime
View raw message