Thanks a lot..
I was busy with some other assignment so couldn't try what you asked me to do earlier..
I removed jTidy.jar from my classpath still I get the error..
---- My Classpath Looks Like this now ---------
C:\tomcat\common\lib\servlet.jar;
c:\j2sdk1.4.0\src.jar;c:\j2sdk1.4.0\lib\dt.jar;
c:\j2sdk1.4.0\lib\tools.jar;
c:\j2sdk1.4.0\lib\j2sdk.jar;
C:\tomcat\webapps\NDIC\WEB-INF\lib\struts.jar;
C:\tomcat\common\lib\httpunit-1.5.3.jar;
C:\tomcat\common\lib\aspectjrt-1.1.1.jar;
C:\tomcat\common\lib\nekohtml.jar;
C:\tomcat\common\lib\servletapi-2.3.jar;
C:\tomcat\common\lib\junit-3.8.1.jar;
c:\tomcat\common\lib\commons-httpclient-2.0-rc2.jar;
C:\tomcat\common\lib\js.jar;
C:\tomcat\common\lib\xercesImpl.jar;
C:\tomcat\common\lib\xmlParserAPIs.jar;
C:\tomcat\common\lib\activation.jar;
C:\tomcat\common\lib\cactus-1.5-rc1.jar;
C:\tomcat\common\lib\cactus-ant-1.5-rc1.jar;
C:\tomcat\common\lib\commons-logging-1.0.3.jar;
-------Classpath ends here ----------
----Here is my login.htm ---
<html>
<head>
<title>eBAS-Banking Application Systems</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript1.2">
function onLogin()
{
window.open("main.htm","Main","menubar=0,toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,height=550,width=800,top=0,left=0" );
window.close();
}
</script>
</head>
<link href="cssStyle/Style.css" type="text/css" rel="stylesheet">
<body bgcolor="#F1F1F1" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="theForm">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="59" bgcolor="003399">
<tr>
<td width="180"><img src="images/logo_1.gif" width="139" height="59"></td>
<td>
<div align="center"><img src="images/ebas2.gif" width="211" height="59"></div>
</td>
<td width="190" align="right"> </td>
</tr>
</table>
</html>
--------- login.htm ends here..--------------------
---------- My Test Case ----------------
package test;
import org.apache.cactus.*;
import org.apache.cactus.ServletTestCase.*;
import junit.framework.*;
import com.meterware.httpunit.*;
public class TestSampleTag extends JspTestCase
{
public static void main( String[] params)
{
try
{
WebConversation wc = new WebConversation();
com.meterware.httpunit.WebResponse response = wc.getResponse("http://localhost:8080/NDIC/login.htm");
TestSampleTag testobj= new TestSampleTag();
testobj.endLogin(response);
}
catch (Exception e)
{
System.err.println( "Exception: " + e );
}
}
public void endLogin(com.meterware.httpunit.WebResponse
response) throws org.xml.sax.SAXException
{
WebTable table = response.getTables()[0];
assertEquals("rows", 1, table.getRowCount());
assertEquals("columns", 3, table.getColumnCount());
assertEquals("links", 1, table.getTableCell(0, 2).getLinks().length);
}
}
------------- Test case ends here-------------------
What could be the problem? It compiles fine.. but while running the test case I get the following error
-------Error---------
C:\tomcat\webapps\NDIC\WEB-INF\classes\test>java test.TestSampleTag
java.lang.reflect.InvocationTargetException
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at com.meterware.httpunit.parsing.NekoHTMLParser.parse(NekoHTMLParser.ja
va:41)
at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:244)
at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:9
75)
at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:5
77)
at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaSc
ript.java:419)
at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80)
at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(J
avaScriptEngineFactory.java:46)
at com.meterware.httpunit.FrameHolder.<init>(FrameHolder.java:44)
at com.meterware.httpunit.WebWindow.<init>(WebWindow.java:218)
at com.meterware.httpunit.WebClient.<init>(WebClient.java:51)
at com.meterware.httpunit.WebConversation.<init>(WebConversation.java:46
)
at test.TestSampleTag.main(TestSampleTag.java:15)
Exception: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
------------- End error -------
What could be the problem???