impossible to remove tomcat from classpath for test [message #211612] |
Wed, 02 April 2008 17:44  |
Eclipse User |
|
|
|
Originally posted by: adam.hardy.no.spam.cyberspaceroad.spam
I've got a problem running a JUnit test with HttpUnit, which mimics the servlet
container. It's looking for tomcat's org.apache.jasper.servlet.JspServlet,
probably due to something I need to fix on my classpath to do with the tomcat
plugin.
I have configured the build path to contain no references to the tomcat Web App
libraries, yet HttpUnit insists on trying to load tomcat.
The test works in the maven environment externally from Eclipse.
I'm not sure where is HttpUnit picking up JspServlet. I did have a
look at the source but it seemed it would be a lengthy investigation. But for
some reason that shouldn't be the case, in Eclipse, tomcat's classes are still
on the classpath when running junit.
com.meterware.httpunit.HttpInternalErrorException: Error on HTTP request: 500
javax.servlet.ServletException: com.meterware.httpunit.HttpNotFoundException:
Error on HTTP request: 404 java.lang.ClassNotFoundException:
org.apache.jasper.servlet.JspServlet
Any help appreciated!
Thanks
Adam
|
|
|
Re: impossible to remove tomcat from classpath for test [message #211620 is a reply to message #211612] |
Wed, 02 April 2008 17:54  |
Eclipse User |
|
|
|
Originally posted by: adam.hardy.no.spam.cyberspaceroad.spam
Sorry, forget that, I'm seeing it in maven now too.
adam hardy on 02/04/08 22:44, wrote:
> I've got a problem running a JUnit test with HttpUnit, which mimics the
> servlet container. It's looking for tomcat's
> org.apache.jasper.servlet.JspServlet, probably due to something I need
> to fix on my classpath to do with the tomcat plugin.
>
> I have configured the build path to contain no references to the tomcat
> Web App libraries, yet HttpUnit insists on trying to load tomcat.
>
> The test works in the maven environment externally from Eclipse.
>
> I'm not sure where is HttpUnit picking up JspServlet. I did have a
> look at the source but it seemed it would be a lengthy investigation.
> But for some reason that shouldn't be the case, in Eclipse, tomcat's
> classes are still on the classpath when running junit.
>
> com.meterware.httpunit.HttpInternalErrorException: Error on HTTP
> request: 500
> javax.servlet.ServletException:
> com.meterware.httpunit.HttpNotFoundException:
> Error on HTTP request: 404 java.lang.ClassNotFoundException:
> org.apache.jasper.servlet.JspServlet
>
> Any help appreciated!
> Thanks
> Adam
|
|
|
Powered by
FUDForum. Page generated in 0.24986 seconds