Hi servlet gurus,
I am trying to throw a Servlet exception when some problem occurs in the
program.
A typical case is:
-----------------------
import java.io.*;
import javax.servlet.*;
public class TPBean{
........
.......
public void setCreatedBy( String newCreatedBy )
{
if(newCreatedBy.length() <= 0)
{
throw new ServletException ("1106", new Exception ("
Exception forced by the program"));
} else
{
this.CreatedBy = newCreatedBy;
}
}
}
------------------------------------
When i compile this I get the following error:
C:\jswdk-1.0.1\examples\WEB-INF\jsp\beans\MyBeans\TPBean.java:149: Wrong
number of arguments in constructor.
throw new ServletException ("1106", new Exception ("
Exception forced by the program"));
^
---------------
Can any one of you throw some light on this.
Thanks in Advance,
Ritesh Sinha
[EMAIL PROTECTED]
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html