You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by An...@nokia.com on 2002/10/09 15:28:00 UTC
AxisServlet's init() overloading
Hi All,
There are some situations where one has to overload AxisServlet's init() method and sign somehow if there was a problem. This cannot be done because of the AxisServlet's init() doesn't define 'thorws' clause in its signature. Is there any reason to disallow throwing an exception in init ? Can be added it to AxisServlet ?
Signature of javax.servlet.GenericServlet:
public void init() throws ServletException
And the implemented one in org.apache.axis.transport.http.AxisServlet
public void init() {...}
Br,
Andras
andras.avar@nokia.com
Re: AxisServlet's init() overloading
Posted by Steve Loughran <st...@iseran.com>.
AxisServlet.init() is an implementation of HttpServlet.init(), and so you
cant change what gets thrown without changing the servlet spec and every
implementation thereof.
So, come up with a better solution. Either wrap your exception into a
ServletException, or a RuntimeException()
----- Original Message -----
From: <An...@nokia.com>
To: <ax...@xml.apache.org>
Sent: Wednesday, October 09, 2002 6:28 AM
Subject: AxisServlet's init() overloading
Hi All,
There are some situations where one has to overload AxisServlet's init()
method and sign somehow if there was a problem. This cannot be done because
of the AxisServlet's init() doesn't define 'thorws' clause in its signature.
Is there any reason to disallow throwing an exception in init ? Can be added
it to AxisServlet ?
Signature of javax.servlet.GenericServlet:
public void init() throws ServletException
And the implemented one in org.apache.axis.transport.http.AxisServlet
public void init() {...}
Br,
Andras
andras.avar@nokia.com