Re: encodeURL inside tag handler

2001-10-16 Thread Gennis Emerson
Alex Kachanov wrote: > > hello, guys! > > I'm finishing a small taglib and what to add a finishing touch. > Inside the tag hadler I wish to encodeURL a string (which is > a url constructed on the fly). > > I'm really lost: how should I do this? > could you give me two lines of code? > > I know how

Re: encodeURL inside tag handler

2001-10-16 Thread Mike McGuinness
I saw this code in the o'reilly servlet book and adapted it. /** * Convert a properties List into a URL query string * * @param props Properties list. * @return The URL-encoded properties list as a URL query string. */ public static String toEncodedString(Properties props) { String name, value; S

Re: encodeURL part 2 -Refutation

1999-10-26 Thread Randy Belknap
Craig McClanahan wrote: > > scan. When I write my servlet or JSP page, I know where the hyperlinks are > already, and can encode them suitably. I want my servlet container to send the > bytes of my response back to the client as fast as it possibly can. > I was reading a little deeper in the Dy

Re: encodeURL part 2 -Refutation

1999-10-26 Thread Randy Belknap
> For my apps, I would still choose not to pay the performance price of this extra > scan. When I write my servlet or JSP page, I know where the hyperlinks are > already, and can encode them suitably. I want my servlet container to send the > bytes of my response back to the client as fast as it

Re: encodeURL part 2 -Refutation

1999-10-26 Thread Danny Martens
Hi Nic, I'm not sure why you make so much fuzz about this. First of all, I'd like to point out that I did not make any claims about which product does or does not support URL rewriting. I did say that URL rewriting did not appear to be working on JSWDK, maybe because it wasn't implemented yet. I

Re: encodeURL part 2 -Refutation

1999-10-25 Thread Craig McClanahan
Randy Belknap wrote: > This is a general servlet api design question. The way servlets (and > ASP) are designed, the only url's that are rewritten are the ones that > you explicitly wrap in the encode method. Was there ever a discussion > about being able to parse all servlet output looking for

Re: encodeURL part 2 -Refutation

1999-10-25 Thread Charles Forsythe
> Was there ever a discussion > about being able to parse all servlet output looking for urls and > rewriting them? > This sounds like a job for Servlet chaining -- if your engine supports it. > A recent ZDNet Anchor Desk poll asked visitor's something like 'Are > cookies evil?'. A full 30% of t

Re: encodeURL part 2 -Refutation

1999-10-25 Thread Alex Smith
Netscape's app server (NAS 2.x and 4.x too, probably) does the rewriting part automatically as well, I believe. Alex. Original Message Follows From: Randy Belknap <[EMAIL PROTECTED]> Subject: Re: encodeURL part 2 -Refutation Date: Mon, 25 Oct 1999 12:26:21 -0700 This i

Re: encodeURL part 2 -Refutation

1999-10-25 Thread Randy Belknap
This is a general servlet api design question. The way servlets (and ASP) are designed, the only url's that are rewritten are the ones that you explicitly wrap in the encode method. Was there ever a discussion about being able to parse all servlet output looking for urls and rewriting them? >Fr

Re: encodeURL part 2 -Refutation

1999-10-25 Thread Craig McClanahan
Nic Ferrier wrote: > >>> Danny Martens <[EMAIL PROTECTED]> 10/25/99 5:22:12 > PM >>> > > >I consider URL rewriting a dirty trick (see the hotmail bug), > >with too much drawbacks to consider it any longer as a > >serious alternative. Browser persistence has become > >too crucial for a web-applica

Re: encodeURL part 2

1999-10-25 Thread Dr. Dragomir D. Dimitrijevic
Try to use java.net.URLEncoder. Be careful. JVM that goes with IE4 has a bug and encodes non-printable characters to '?'. Anyway, see docs for URLEncoder. I am not sure how servlet's encodeURL works but I believe that you should do something like: "http://myhost/foo/myservlet?param1=" + encodeUR

Re: encodeURL part 2 -Refutation

1999-10-25 Thread Nic Ferrier
>>> Danny Martens <[EMAIL PROTECTED]> 10/25/99 5:22:12 PM >>> >I consider URL rewriting a dirty trick (see the hotmail bug), >with too much drawbacks to consider it any longer as a >serious alternative. Browser persistence has become >too crucial for a web-application : 99% of your target audien

Re: encodeURL part 2

1999-10-25 Thread Danny Martens
Hi, ... I'm aware of this problem, but I didn't pursue it because I think it is mentioned somewhere that the JSWDK servlet host/ web server does not implement URL rewriting yet... you'll probably need to try it with a demo version of a commercial servlet host... but, I could be wrong... Anyway

Re: encodeURL()

1999-10-17 Thread Craig R. McClanahan
Martin Kuba wrote: > Andy Bailey wrote: > > > > It is not guaranted that the session will be held as parameter. > > > Yes, Apache uses a parameter named "JServSessionId", > > > many other servlet engines do it also, but some servlet engines > > > keep the session in PATH_INFO part of the URL or s

Re: encodeURL()

1999-10-17 Thread Martin Kuba
Andy Bailey wrote: > > It is not guaranted that the session will be held as parameter. > > Yes, Apache uses a parameter named "JServSessionId", > > many other servlet engines do it also, but some servlet engines > > keep the session in PATH_INFO part of the URL or somewhere else. > > > > See www.

Re: encodeURL()

1999-10-15 Thread Andy Bailey
- Original Message - From: Martin Kuba <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 15, 1999 6:18 PM Subject: Re: encodeURL() > > Yes, you can recover the sessionid parameter value from the request headers > > if the session > > o

Re: encodeURL()

1999-10-15 Thread Martin Kuba
> Yes, you can recover the sessionid parameter value from the request headers > if the session > object reports that cookies are turned off and put it in a correctly named > hidden input > in the form. That may work ok :) > > Andy Bailey It is not guaranted that the session will be held as parame

Re: encodeURL()

1999-10-15 Thread Martin Kuba
Peter Nützel wrote: > I encode the URL in and have some other parameters inside > the HTML-FORM(specified with tags) which should be send with the GET > Request. > If the User submits the Request, the encoded SessionID is overwritten by the > Browser with the paremeters specified inside the FORM

Re: encodeURL()

1999-10-15 Thread Martin Kuba
You are mixing three thing together: 1) HTML encoding which replaces the character > with > It is used for special characters in HTML pages. 2) URL encoding which replaces the character > with %3E It is used for special characters in URLs 2) URL rewriting which keeps sessions It is used

Re: encodeURL()

1999-10-14 Thread Matteo Manzini
I thank all of u for your explanation >... > Therefore, you *must* use >encodeURL() on the argument if you want session identity >to be maintained when there are no cookies. >... Now I know exactly what encodeURL() is used for and when I can use it. One more things, if possible: can someone tel

Re: encodeURL()

1999-10-13 Thread Spencer Ridder
o:[EMAIL PROTECTED]]On Behalf Of Milt > Epstein > Sent: Wednesday, October 13, 1999 7:08 AM > To: [EMAIL PROTECTED] > Subject: Re: encodeURL() > > On Wed, 13 Oct 1999, Andy Bailey wrote: > > > > Hi, > > > > > > encodeURL() encodes the strings in such

Re: encodeURL()

1999-10-13 Thread Milt Epstein
ctober 13, 1999 7:08 AM > To: [EMAIL PROTECTED] > Subject: Re: encodeURL() > > On Wed, 13 Oct 1999, Andy Bailey wrote: > > > > Hi, > > > > > > encodeURL() encodes the strings in such a way that some > > > unacceptable characters in the URL are "e

Decode an encodeURL() (was: Re: Re: encodeURL())

1999-10-13 Thread Chris Pratt
javax.servlet.http.HttpUtils.parseQueryString() (*Chris*) - Original Message - From: Steve Goldberg <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 13, 1999 9:33 AM Subject: Re: encodeURL() > What can be used to decode a URL? > I know that w

Re: encodeURL()

1999-10-13 Thread Milt Epstein
On Wed, 13 Oct 1999, Andy Bailey wrote: > - Original Message - > From: Milt Epstein <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, October 13, 1999 4:08 PM > Subject: Re: encodeURL() > > > > The answer above describes an HTMLEncod

Re: encodeURL()

1999-10-13 Thread Steve Goldberg
t API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Milt Epstein Sent: Wednesday, October 13, 1999 7:08 AM To: [EMAIL PROTECTED] Subject: Re: encodeURL() On Wed, 13 Oct 1999, Andy Bailey wrote: > > Hi, > > > > encodeURL() encodes the strings in such a way that some > &g

Re: encodeURL()

1999-10-13 Thread Andy Bailey
- Original Message - From: Peter Nützel <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 13, 1999 4:50 PM Subject: Re: encodeURL() Hi, I have another Problem with the encodeUrl - method used with : Some Servlet Engines (e.g. Apache JServ and JRun) use

Re: encodeURL()

1999-10-13 Thread Andy Bailey
- Original Message - From: Milt Epstein <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 13, 1999 4:08 PM Subject: Re: encodeURL() > > > > The answer above describes an HTMLEncode method which I have been > > unable to find in any

Re: encodeURL()

1999-10-13 Thread Nic Ferrier
>>> Peter_Nützel <[EMAIL PROTECTED]> 10/13/99 3:50:00 PM >>> >I have another Problem with the encodeUrl - >method used with : >Some Servlet Engines (e.g. Apache JServ and JRun) >use the Http get-method to encode the session ID (url?sessionID). >I encode the URL in and have some >other parameter

Re: encodeURL()

1999-10-13 Thread Peter Nützel
Hi, I have another Problem with the encodeUrl - method used with : Some Servlet Engines (e.g. Apache JServ and JRun) use the Http get-method to encode the session ID (url?sessionID). I encode the URL in and have some other parameters inside the HTML-FORM(specified with tags) which should be sen

Re: encodeURL()

1999-10-13 Thread Milt Epstein
On Wed, 13 Oct 1999, Andy Bailey wrote: > > Hi, > > > > encodeURL() encodes the strings in such a way that some > > unacceptable characters in the URL are "encoded" to form a new > > modified string that can be interperted by the server. So, you > > obviously can't use it with . > > This has alr

Re: encodeURL()

1999-10-13 Thread Andy Bailey
> Hi, > > encodeURL() encodes the strings in such a way that some unacceptable > characters in the URL are "encoded" to form a new modified string that can > be interperted by the server. So, you obviously can't use it with action=...>. > This has already been answered but... The answer above

Re: encodeURL()

1999-10-12 Thread Craig R. McClanahan
Subrahmanyam KNVSK wrote: > Hi, > > encodeURL() encodes the strings in such a way that some unacceptable > characters in the URL are "encoded" to form a new modified string that can > be interperted by the server. So, you obviously can't use it with action=...>. > If you are talking about Http

Re: encodeURL()

1999-10-12 Thread Subrahmanyam KNVSK
Hi, encodeURL() encodes the strings in such a way that some unacceptable characters in the URL are "encoded" to form a new modified string that can be interperted by the server. So, you obviously can't use it with . Bye, Subrahmanyam KNVSK ITL-INFOSYS Banglore India -Original Message-

Re: encodeURL() not working

1999-08-23 Thread Shashank Phadke
Chris -- Irrespective of the browser having cookies on or off, if the servelt engine or the webserver is asked to always use URL rewriting and the URLs always pass thru the encoder, I think the generated URL must have the session id in it. Spencer, I would look into the webserver doc for the sam

Re: encodeURL() not working

1999-08-23 Thread Chris Pratt
It's probably using Cookies, and therefore doesn't need to add the SessionID to the URL. Try turning off Cookies in your browser and see what happens. (*Chris*) - Original Message - From: Spencer Ridder <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 23, 1999 2:34 PM

Re: encodeUrl problem with parameter

1999-03-26 Thread Weigen Jin
ECTED]] Sent: Friday, March 26, 1999 2:32 PM To: [EMAIL PROTECTED] Subject: Re: encodeUrl problem with parameter Hi, Not sure I'm right but some JDBC drivers become angry if you call twice resultset.getString(1) on the same row. Try to save the result on first getString(1) in a String variable

Re: encodeUrl problem with parameter

1999-03-26 Thread Cezar Totth
> out.println(""); > more = rs.next (); > } > } > catch(Exception e) > { > out.println ( "" ); > out.println ( "Error occured in database: " + e.getMessage() + > ""); &g

Re: encodeUrl problem with parameter

1999-03-26 Thread Chris Pratt
. (*Chris*) - Original Message - From: Weigen Jin <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 26, 1999 11:03 AM Subject: Re: encodeUrl problem with parameter > Cezar, > > You are right. I have getOutputStream() in the excepti

Re: encodeUrl problem with parameter

1999-03-26 Thread Weigen Jin
quot;" ); out.println ( "Error occured in database: " + e.getMessage() + ""); out.println ( "" ); } -----Original Message- From: Cezar Totth [mailto:[EMAIL PROTECTED]] Sent: Friday, March 26, 1999 10:14 AM To: [EMAIL PROTECTED] Subject: Re: encodeUrl probl

Re: encodeUrl problem with parameter

1999-03-26 Thread Cezar Totth
Hi, You probably call both getOutputStream() and getWriter() on the same request. The javax.servlet.ServletResponse API states that an IllegalStateException should be thrown if you try to use them both during the same request. Cezar On Thu, 25 Mar 1999, Weigen Jin wrote: > Hi, > > It s