<cfscript>
urlObj = CreateObject("java", "java.net.URL");
urlObj.init("this is not a real url");
<cfscript>
-Matt
On Jan 20, 2004, at 4:42 PM, Deanna Schneider wrote:
> Interesting, but it doesn't work (says the selected method was not
> found).
>
> ----- Original Message -----
> From: "Matt Liotta" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 20, 2004 2:42 PM
> Subject: Re: Storing URL's
>
> > I would just create an instance of java.net.URL using the URL
> supplied
> > by the user. If the user supplied a malformed URL an exception would
> be
> > thrown, which of course can be caught and handled more gracefully.
> For
> > example...
> >
> > <cfscript>
> > url = "" "java.net.URL");
> > url.init("this is not a real url");
> > </cfscript>
> >
> > -Matt
> >
> >
> > On Jan 20, 2004, at 3:28 PM, Deanna Schneider wrote:
> >
> > > Hey all,
> > > So, I'm sure we've all dealt with storing URL's that users can
> enter.
> > > And,
> > > no matter how much you say, "Start the url withhttp://"or"start the
> > > URL
> > > with www" someone will do it the opposite way.
> > >
> > > So, the question is - do you check the format of the url on the
> insert
> > > and
> > > clean them so they're all the same? Or, do you do it on the output?
> > > Either
> > > way, are you just checking for the existence ofhttp://, or are you
> > > doing
> > > something else super fantabulistic with regex or something that
> I'm not
> > > thinking of?
> > >
> > > -d
> > >
> > >
> > > --
> > > Deanna Schneider
> > > UWEX-Cooperative Extension
> > > Interactive Media Developer
> > >
> >
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

