tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hume, John - NA US HQ Delray" <john.h...@cruisesonly.com>
Subject RE: Need an Idea - appending #tag after someurl.jsp ?
Date Mon, 19 Jan 2004 13:35:05 GMT
Mufaddal,
You can set location.hash='myNamedTarget' once the page has finished loading
into the browser.  See attached.

-john.


-----Original Message-----
From: Mufaddal Khumri [mailto:mufaddal@wmotion.com]
Sent: Friday, January 16, 2004 6:07 PM
To: Tomcat Users List
Subject: Re: Need an Idea - appending #tag after someurl.jsp ?


I set a request attribute before forwarding the request to JSP.  Does 
anybody have some javascript that would allow me to jump to a an anchor 
within that page ?

On Jan 15, 2004, at 3:55 PM, Hume, John - NA US HQ Delray wrote:

> Is the servlet doing a RequestDispatcher.forward or HTTP redirecting?  
> It
> seems a response.sendRedirect (HTTP redirect) would work, assuming 
> your JSP
> doesn't need the data from the form POST request.  If it DOES need to 
> share
> the request with the servlet, then I believe the HTML form action will 
> have
> to include the #tag.
>
> The other way to go would be JavaScript in the JSP that looks at a 
> request
> parameter or something else in the URI, which doesn't strike me as 
> pretty,
> but others may like.  Note that JavaScript won't see request 
> parameters that
> you add in a RequestDispatcher.forward, so here again the form (if 
> it's a
> GET) or form action (if it's a POST) would have to include something 
> for the
> JS to see.
>
> -john.
>
>
> -----Original Message-----
> From: Mufaddal Khumri [mailto:mufaddal@wmotion.com]
> Sent: Thursday, January 15, 2004 5:45 PM
> To: Tomcat Users List
> Subject: Need an Idea - appending #tag after someurl.jsp ?
>
>
> hi,
>
> I have a page called First.jsp. I have a <a name='tag'> on it. When i
> submit a form to a servlet, the servlet needs to forward me to
> First.jsp#tag. Problem is i get the following message when i try to do
> this:
>
> type: Status report
> message: /First.jsp#tag
> description: The requested resource (/First.jsp#tag) is not available.
>
> if it were: First.html#tag it would have worked, but for a jsp .. Any
> Ideas to get the same effect?
>
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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