RE: URLEncoding urls (hrefs) that are coming out of a database...
A complete html parser seems a bit over the top if you can ensure the html is validated before it goes into the database. If the html is validated you can perform a search and replace on known cases, however I had the same problem and encodeURL only worked on url's that could be resolved within your own context (?!). A javascript call for example which ends by calling document.location.href = args[0] (which you might call through javascript:myFunction('myurl')) is a nasty problem to get right I think. I solved my problem by including a cookie check ;-)). Not the solution you are looking for I think, but it is a solution. greetz Hans At 15:57 15/08/2003 +0200, Ralph Einfeldt wrote: That is how it works. AFAIK there is nothing you can configure to change this. This is a thing that requires some logic to implement a generic solution. It would require a complete html parser that parses each response (Quite challanging and time consuming). And what should this solution do with javascript ? Another solution would be a taglib that replaces with a tag that parses the output before it is given to the response. > -Original Message- > From: Kurt Overberg [mailto:[EMAIL PROTECTED] > Sent: Friday, August 15, 2003 3:45 PM > To: Tomcat Users List > Subject: Re: URLEncoding urls (hrefs) that are coming out of a > database... > > Well, yeah it should, but I get the impression (from testing > and seeing it not do it) that if the URL is coming from a > database and the URL (a href) is embedded in other text, that > it won't automagically work. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URLEncoding urls (hrefs) that are coming out of a database...
That is how it works. AFAIK there is nothing you can configure to change this. This is a thing that requires some logic to implement a generic solution. It would require a complete html parser that parses each response (Quite challanging and time consuming). And what should this solution do with javascript ? Another solution would be a taglib that replaces with a tag that parses the output before it is given to the response. > -Original Message- > From: Kurt Overberg [mailto:[EMAIL PROTECTED] > Sent: Friday, August 15, 2003 3:45 PM > To: Tomcat Users List > Subject: Re: URLEncoding urls (hrefs) that are coming out of a > database... > > Well, yeah it should, but I get the impression (from testing > and seeing it not do it) that if the URL is coming from a > database and the URL (a href) is embedded in other text, that > it won't automagically work. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URLEncoding urls (hrefs) that are coming out of a database...
Oh yes, I forgot, because the URL lives within a big block of normal text, I can't just call encodeURL on the whole thing. Seems like I need a method that will search out an /kurt Kurt Overberg wrote: Well, yeah it should, but I get the impression (from testing and seeing it not do it) that if the URL is coming from a database and the URL (a href) is embedded in other text, that it won't automagically work. Since the URL isn't in the JSP file at compile-time, it seems that it just gets passed over. Can anyone confirm/deny this? Maybe I've got things configured improperly? All my other links come out with jsessionid appended properly. Thanks again! /kurt Shapira, Yoav wrote: Howdy, Don't worry about it, the servlet container is required to do this for your automagically (if the client doesn't support cookies). Yoav Shapira Millennium ChemInformatics - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URLEncoding urls (hrefs) that are coming out of a database...
Well, yeah it should, but I get the impression (from testing and seeing it not do it) that if the URL is coming from a database and the URL (a href) is embedded in other text, that it won't automagically work. Since the URL isn't in the JSP file at compile-time, it seems that it just gets passed over. Can anyone confirm/deny this? Maybe I've got things configured improperly? All my other links come out with jsessionid appended properly. Thanks again! /kurt Shapira, Yoav wrote: Howdy, Don't worry about it, the servlet container is required to do this for your automagically (if the client doesn't support cookies). Yoav Shapira Millennium ChemInformatics -Original Message- From: Kurt Overberg [mailto:[EMAIL PROTECTED] Sent: Friday, August 15, 2003 9:29 AM To: Tomcat Users List Subject: URLEncoding urls (hrefs) that are coming out of a database... Gang, I store text in my database that contains: Hello there, user, please click this link. I output this text to the user with the tag (I'm using struts 1.0 & tomcat 4.1.27). Is there some way to make sure that my JSESSIONID will get appended to these links (for people w/out cookies), or do I need to make that happen myself with some regex magic? I've poked around all the struts libs and all that but it seems that by the time the text gets substituted on the output .jsp, its already been compiled and everything, which is too late. Thoughts, ideas, workarounds? Anyone? Anyone? Help! /kurt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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 individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URLEncoding urls (hrefs) that are coming out of a database...
Only if you call encodeUrl on the link. If you just write out some text it stays as it is no matter if it contains links. > -Original Message- > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Sent: Friday, August 15, 2003 3:35 PM > To: Tomcat Users List > Subject: RE: URLEncoding urls (hrefs) that are coming out of a > database... > >Hello there, user, please click this link. > >I output this text to the user with the tag (I'm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URLEncoding urls (hrefs) that are coming out of a database...
Howdy, Don't worry about it, the servlet container is required to do this for your automagically (if the client doesn't support cookies). Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Kurt Overberg [mailto:[EMAIL PROTECTED] >Sent: Friday, August 15, 2003 9:29 AM >To: Tomcat Users List >Subject: URLEncoding urls (hrefs) that are coming out of a database... > >Gang, > >I store text in my database that contains: > >Hello there, user, please click this link. > >I output this text to the user with the tag (I'm using >struts 1.0 & tomcat 4.1.27). Is there some way to make sure that my >JSESSIONID will get appended to these links (for people w/out cookies), >or do I need to make that happen myself with some regex magic? I've >poked around all the struts libs and all that but it seems that by the >time the text gets substituted on the output .jsp, its already been >compiled and everything, which is too late. Thoughts, ideas, >workarounds? Anyone? Anyone? Help! > >/kurt > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] 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 individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]