You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by James Mitchell <jm...@apache.org> on 2003/03/10 16:01:16 UTC

RequestUtils.computeURL()

Is there any reason that any tag should NOT call computeURL when
evaluating a URL that needs a parameter of Map entries added?

It seems that ImgTag does it all by itself, and since it hard-codes '&'
instead of the standard '&amp;', my new tests (which I haven't even
committed yet) are failing.

Should we refactor this now?

I cannot setup tests for this tag with the current code that's there.

Thoughts?



--
James Mitchell
Software Developer/Struts Evangelist
http://jakarta.apache.org/struts

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
    - Soren Aabye Kierkegaard (1813-1855)




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


RE: RequestUtils.computeURL()

Posted by James Mitchell <jm...@apache.org>.
> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org] 
> Sent: Monday, March 10, 2003 12:24 PM
> To: Struts Developers List
> Subject: RE: RequestUtils.computeURL()
> 
> 
> 
> 
> On Mon, 10 Mar 2003, James Mitchell wrote:
> 
> > Date: Mon, 10 Mar 2003 11:44:01 -0500
> > From: James Mitchell <jm...@apache.org>
> > Reply-To: Struts Developers List <st...@jakarta.apache.org>
> > To: 'Struts Developers List' <st...@jakarta.apache.org>
> > Subject: RE: RequestUtils.computeURL()
> >
> > Sounds great.  I'll take care of that tonight.
> >
> > Can anyone run test.tomcat.all?  I guess I purchased some 
> bad memory for
> > my laptop or the OS/JVM is a piece of sh#t, because when I 
> try to run
> > them all, I get somewhere in the .40 tests and my laptop just shuts
> > down....no blue screen....no OutOfMemory errors....it just 
> stops....like
> > pulling the plug on a desktop.....very frustrating.
> >
> 
> The .40 tests do indeed work -- but only after a small change 
> to each of
> the pages (CVS commit forthcoming).  It's a bug in Tomcat 4.0 
> that we have
> to work around.

Yes, I can run test.tomcat.33, (or .40 or .41) 'one at a time', but it's
when I run test.tomcat.all that I get to take a break while the laptop
boots back up :(

> 
> At the bottom of many of the test pages, you've got a "throw new
> JspException()" statement if a test was misconfigured.  Unfortunately,
> Tomcat 4.0 does an implicit import of the 
> "org.apache.jasper.runtime.*"
> package into each page, and there's a
> "org.apache.jasper.runtime.JspException" class that causes 
> "JspException"
> to be ambiguous.  I changed it to use "javax.servlet.jsp.JspException"
> explicitly, which will still work on all the other containers, and am
> rerunning .41 right now to ensure that nothing got messed up.

Ah, see, I learn something new everyday.


> I'm going to have to go download Tomcat 3.3 to test those.  
> And shouldn't
> we rip out the Tomcat 3.2 tests since we are no longer supporting it?

Yes, I haven't been using those for a few months now (or least since we
last discussed doing that)


> >
> > --
> > James Mitchell
> 
> Craig
> 


--
James Mitchell
Software Developer/Struts Evangelist
http://jakarta.apache.org/struts

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
    - Soren Aabye Kierkegaard (1813-1855)



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


RE: RequestUtils.computeURL()

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 10 Mar 2003, James Mitchell wrote:

> Date: Mon, 10 Mar 2003 11:44:01 -0500
> From: James Mitchell <jm...@apache.org>
> Reply-To: Struts Developers List <st...@jakarta.apache.org>
> To: 'Struts Developers List' <st...@jakarta.apache.org>
> Subject: RE: RequestUtils.computeURL()
>
> Sounds great.  I'll take care of that tonight.
>
> Can anyone run test.tomcat.all?  I guess I purchased some bad memory for
> my laptop or the OS/JVM is a piece of sh#t, because when I try to run
> them all, I get somewhere in the .40 tests and my laptop just shuts
> down....no blue screen....no OutOfMemory errors....it just stops....like
> pulling the plug on a desktop.....very frustrating.
>

The .40 tests do indeed work -- but only after a small change to each of
the pages (CVS commit forthcoming).  It's a bug in Tomcat 4.0 that we have
to work around.

At the bottom of many of the test pages, you've got a "throw new
JspException()" statement if a test was misconfigured.  Unfortunately,
Tomcat 4.0 does an implicit import of the "org.apache.jasper.runtime.*"
package into each page, and there's a
"org.apache.jasper.runtime.JspException" class that causes "JspException"
to be ambiguous.  I changed it to use "javax.servlet.jsp.JspException"
explicitly, which will still work on all the other containers, and am
rerunning .41 right now to ensure that nothing got messed up.

I'm going to have to go download Tomcat 3.3 to test those.  And shouldn't
we rip out the Tomcat 3.2 tests since we are no longer supporting it?

>
> --
> James Mitchell

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


RE: RequestUtils.computeURL()

Posted by James Mitchell <jm...@apache.org>.
Sounds great.  I'll take care of that tonight.

Can anyone run test.tomcat.all?  I guess I purchased some bad memory for
my laptop or the OS/JVM is a piece of sh#t, because when I try to run
them all, I get somewhere in the .40 tests and my laptop just shuts
down....no blue screen....no OutOfMemory errors....it just stops....like
pulling the plug on a desktop.....very frustrating.


--
James Mitchell
Software Developer/Struts Evangelist
http://jakarta.apache.org/struts

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
    - Soren Aabye Kierkegaard (1813-1855)


> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org] 
> Sent: Monday, March 10, 2003 11:35 AM
> To: Struts Developers List
> Subject: Re: RequestUtils.computeURL()
> 
> 
> 
> 
> On Mon, 10 Mar 2003, James Mitchell wrote:
> 
> > Date: Mon, 10 Mar 2003 10:01:16 -0500
> > From: James Mitchell <jm...@apache.org>
> > Reply-To: Struts Developers List <st...@jakarta.apache.org>
> > To: Struts Developers List <st...@jakarta.apache.org>
> > Subject: RequestUtils.computeURL()
> >
> >
> > Is there any reason that any tag should NOT call computeURL when
> > evaluating a URL that needs a parameter of Map entries added?
> >
> > It seems that ImgTag does it all by itself, and since it 
> hard-codes '&'
> > instead of the standard '&amp;', my new tests (which I haven't even
> > committed yet) are failing.
> >
> > Should we refactor this now?
> >
> > I cannot setup tests for this tag with the current code 
> that's there.
> >
> 
> Sounds like we missed refactoring this when computeURL() was 
> created in
> the first place, so +1 for refactoring it now.
> 
> As of last night, I got all the "test.tomcat.41" tests to run 
> on my Linux
> box (yah :-) -- thanks for all the hard work on creating 
> these tests.  I
> ran into line-end problems on the code we generate for <html:form> and
> <html:errors>, so I tweaked them a bit.  I hope that didn't mess up
> running the tests on Windows, and would be interested to find 
> out if it
> did.
> 
> > Thoughts?
> >
> 
> Craig
> 
> 
> >
> >
> > --
> > James Mitchell
> > Software Developer/Struts Evangelist
> > http://jakarta.apache.org/struts
> >
> > "People demand freedom of speech to make up for the freedom 
> of thought
> > which they avoid."
> >     - Soren Aabye Kierkegaard (1813-1855)
> >
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: RequestUtils.computeURL()

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 10 Mar 2003, James Mitchell wrote:

> Date: Mon, 10 Mar 2003 10:01:16 -0500
> From: James Mitchell <jm...@apache.org>
> Reply-To: Struts Developers List <st...@jakarta.apache.org>
> To: Struts Developers List <st...@jakarta.apache.org>
> Subject: RequestUtils.computeURL()
>
>
> Is there any reason that any tag should NOT call computeURL when
> evaluating a URL that needs a parameter of Map entries added?
>
> It seems that ImgTag does it all by itself, and since it hard-codes '&'
> instead of the standard '&amp;', my new tests (which I haven't even
> committed yet) are failing.
>
> Should we refactor this now?
>
> I cannot setup tests for this tag with the current code that's there.
>

Sounds like we missed refactoring this when computeURL() was created in
the first place, so +1 for refactoring it now.

As of last night, I got all the "test.tomcat.41" tests to run on my Linux
box (yah :-) -- thanks for all the hard work on creating these tests.  I
ran into line-end problems on the code we generate for <html:form> and
<html:errors>, so I tweaked them a bit.  I hope that didn't mess up
running the tests on Windows, and would be interested to find out if it
did.

> Thoughts?
>

Craig


>
>
> --
> James Mitchell
> Software Developer/Struts Evangelist
> http://jakarta.apache.org/struts
>
> "People demand freedom of speech to make up for the freedom of thought
> which they avoid."
>     - Soren Aabye Kierkegaard (1813-1855)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org