Hi All,
I am making Login Functionality using the JSP and Beans.I want that
no body can send blank fields,though that can be achieved using java script
but as i am new to JSP , i am much curious to implement the things with JSP.
I am proceeding like this.
I have made a Custom exception BlankFieldException.and have declared a
ErrorPage in the Page Directive,which is the ErrorHandler for all the Pages
in my application.what it does is that it just display the ErrorMessages in
more user friendly way.Now the problem is that I have written the statements
like this
<%
if( request.getParameter("username").equals(""))
throw new BlankFieldException();
%>
But i am getting the error that u should either declare that the method
throws a Exception or you should catch the Error.Now first thing is that i
donot want to catch the Error,because i want that to be done by my
erorhandler which is doing job very well.and second thing is that this code
i can not put inside a method,because then i will not be having the access
to internal objects like here i am using the request object.So please let me
know the way to come out of this problem.
thanks in advance.
Regards
Manoj Kumar.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets