ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Gentle <>
Subject Re: HTTP 404
Date Fri, 18 Oct 2002 18:39:33 GMT
There still isn't enough information here to thoroughly diagnose the 
problem -- the snippet has at least one error:

         <test name=TestLinks'/>
                 missing a quote (and should be double quotes, right?)

What is in TestLinks?  What is it you're testing?  Does it behave properly 
(ie, how you expect it to) using one of junit's test runners?

This, at this point, appears to be a junit test coding issue, or an 
application issue.  Doesn't appear to be ANT.


At 07:18 PM 10/18/2002 +0100, you wrote:

>So do you mean that I should just catch the exceptions in my java classes 
>as I would have done normally.
>Please find the task snippet i am trying to run below. How do I catch an 
>exception here?
><target name="test">
>      <junit printsummary="yes" haltonfailure="no" haltonerror="no"
>         fork="yes">
>         <classpath>
>        <!-- Including the testing classes and the .properties files -->
>           <pathelement location="${my.classes}"/>
>          <!-- Including all the .jar files -->
>             <path refid="my.classpath"/>
>         </classpath>
>         <formatter type="plain" usefile="false"/>
>   <test name=TestLinks'/>
>   </junit>
>  Ken Gentle <> wrote:You probably need to 
> describe your ANT specific problem a little better --
>what task are you using, what is the environment and what is the output of
>the build for example.
>Not having that, and not know what task you're using, I will offer this:
>UrlConnection/HttpConnection from the stock Java JDK will, depending on
>what version you have, throw a FileNotFound exception for the 404 code, and
>a different exception on other error HTTP status codes. If the task you're
>using isn't catching the exceptions, it will most likely "fail".
>J2SE 1.4.1 is supposed to rationalize this behavior, but I've not had a
>chance to verify it.
>At 06:37 PM 10/18/2002 +0100, you wrote:
> >During testing response from links, I found that on a 404, the test simply
> >fails, whereas on a 200, everything works fine and I am able to use the
> >response object to get the responsecode. how can I do the same if the link
> >generates a 404 response without the test failing?
> >
> >thanks.
> >
> >
> >
> > Yahoo! Properties Special Buy, sell, rent...your flat, or even post an ad
>To unsubscribe, e-mail:
>For additional commands, e-mail:
>  Yahoo! Properties Special  Buy, sell, rent...your flat, or even post an ad

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message