Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » impossible to remove tomcat from classpath for test
impossible to remove tomcat from classpath for test [message #211612] Wed, 02 April 2008 21:44 Go to next message
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 21:54 Go to previous message
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
Previous Topic:problems with web project on wtp
Next Topic:Bean cannot be resolved to a type
Goto Forum:
  


Current Time: Sun Sep 21 02:23:02 GMT 2014

Powered by FUDForum. Page generated in 0.03047 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software