Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2005

Tip: Looking for answers? Try searching our database.

old school Weblogic 5 ServletContext question

Thread view: 
laredotornado@zipmail.com - 06 Jul 2005 14:33 GMT
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.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.