Hello,
Someone had written an application in Tomcat and we were moving it
to WebLogic 5, sp 12 for Solaris (I know it's old, we'll upgrade one
day). For now, I was curious, if there is a call like
public final class InitServlet extends HttpServlet^M
{^M
/** Initializes the servlet.^M
* @param config of type ServletConfig^M
* @throws ServletException for any reason^M
*/^M
public void init(ServletConfig config) throws ServletException^M
{^M
super.init(config);^M
^M
//Used to log in the file^M
ServletContext context = getServletContext();^M
//Check if logging is necessary^M
String szLogLevel = context.getInitParameter("system.log");
...
1. Where would we define what the parameter "system.log" should be??
2. When and how would the "init" method of the "InitServlet" class get
called?
Thanks, - Dave
Raymond DeCampo - 06 Jul 2005 19:15 GMT
> Hello,
> Someone had written an application in Tomcat and we were moving it
[quoted text clipped - 22 lines]
> 2. When and how would the "init" method of the "InitServlet" class get
> called?
You should read over the servlet specification from Sun. It is really
not a difficult read. If you need something more digested, get a book
on servlets (the O'Rielly book is good).
The initialization parameters are defined in the web.xml file for the WAR.
The init() method of a servlet is invoked by the application server
before the servlet handles requests. There is also a destroy() method,
called when the application server has finished with the servlet.
HTH,
Ray

Signature
XML is the programmer's duct tape.
laredotornado@zipmail.com - 06 Jul 2005 19:21 GMT
Thanks for your response, but unfortunately WebLogic 5 predates the
concept of WAR/web.xml files.
Knowing this, do you have any other suggestions?
Thanks, -
Raymond DeCampo - 06 Jul 2005 20:26 GMT
> Thanks for your response, but unfortunately WebLogic 5 predates the
> concept of WAR/web.xml files.
I see.
> Knowing this, do you have any other suggestions?
I think you are into totally WebLogic-specific territory here if the
above is true. I think you will have to read the WebLogic 5 manual.
> Thanks, -
Ray

Signature
XML is the programmer's duct tape.