old school Weblogic 5 ServletContext question

L

laredotornado

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
 
R

Raymond DeCampo

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?

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
 
L

laredotornado

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, -
 
R

Raymond DeCampo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top