String in ="http://www.mywebapp.de/servletname?br=8#BR3"; int brIndex = in.lastIndexOf("br=")+3; String val = in.substring(brIndex, java.util.Math.max(in.indexOf("&", brIndex),in.length()));
----- Original Message ----- From: "Gast, Thorsten" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 26, 2001 12:05 PM Subject: Accesing the Reference of an URL Hello, in my application I want to access the reference (anchor) of an URL. http://www.mywebapp.de/servletname?br=8#BR3 In this example I want to get '#BR3' I know that the method getQueryString() only returns the part preceding the anchor, i.e. '?br=8' I appreciate any help to get the reference from a request. Greetings Thorsten > -------------------- > Thorsten Gast > Junior Software Engineer > > COI GmbH, Erlanger Stra�e 62, D-91074 Herzogenaurach > Phone +49 (0) 9132 82 1297, Fax +49 (0) 9132 82 4959, > http://www.coi.de, mailto:[EMAIL PROTECTED] > COI - Solutions for Documents > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
