Initializing servlets in webapp

I've read in the Weblogic 5.1 docs that the <load-on-startup> tag is
          unsupported. However, I really
          need to be able to initialize my servlets (read in some properties and set
          some context values) Is there any way to work around this. Using the
          weblogic.properties method of weblogic.system.startupClass etc.. doesn't
          seem to work as it's only affecting the default web application. Has anyone
          worked around this problem?
          

The problem is to know when server startup is complete, because trigger executes right away:
          import javax.naming.*;
          import weblogic.time.common.*;
          import weblogic.common.*;
          public class TestStartup implements Schedulable, Triggerable {
          boolean done = false;
          public void trigger(Schedulable sched) {
          System.out.println("Triggered");
               done = true;
          public long schedule(long time) {
               return done ? 0 : time;
          public static void main(String[] args) {
          try {
          TestStartup test = new TestStartup();
          T3ServicesDef t3 = (T3ServicesDef)(new InitialContext()).lookup("weblogic.common.T3Services");
               ScheduledTriggerDef std = t3.time().getScheduledTrigger(test, test);
               std.schedule();
          System.out.println("Scheduled");
          Thread.sleep(60 * 1000); // simulate some other time-consuming startup tasks
          System.out.println("Startup done");
          } catch(Exception whatever) {
          whatever.printStackTrace();
          works like this:
          Mon Nov 27 22:36:40 PST 2000:<I> <WebLogicServer> Invoking main-style startup teststartup TestStartup
          Triggered
          Scheduled
          Startup done
          Mon Nov 27 22:37:41 PST 2000:<I> <ListenThread> Listening on port: 7001
          Mon Nov 27 22:37:41 PST 2000:<I> <SSLListenThread> Listening on port: 7002
          Cameron Purdy <[email protected]> wrote:
          > Hi Brian,
          > If your startup class schedules itself to be called after the server
          > completes its startup, then you are fine ;-) From a reply I sent:
          >>Have your startup class implement Schedulable and Triggerable and
          > StartupDef
          >>(or whatever the names are) and have it schedule itself when it gets
          > started
          >>up.
          > BTW - I've never done a URLConnection to "localhost" like that but it should
          > work fine since it resolves to 127.0.0.1 on most machines.
          > p.s. Thanks
          > --
          > Cameron Purdy
          > Tangosol, Inc.
          > http://www.tangosol.com
          > +1.617.623.5782
          > WebLogic Consulting Available
          > "Brian Murray" <[email protected]> wrote in message
          > news:[email protected]...
          >> Isn't it funny how the same day you want to do something you see a post on
          >> how to do it? At least that's how I thought it was going to be when I saw
          >> this reply on my way out the door for vacation. Now that I'm back, I
          > can't
          >> seem to make this work.
          >>
          >> We've created a startup class (our first, btw), implementing T3StartupDef.
          >> In the startup method, we try to "poke" the servlet URL:
          >>
          >> URL url = new URL(http://localhost:7001/xxxx/controller);
          >> InputStream is = url.openStream();
          >>
          >> Unfortunately, this results in connection exception "Connection refused:
          > no
          >> further information". It's as if we're trying to access the URL, before
          > the
          >> HTTP listener is ready to respond.
          >>
          >> Could anyone provide a working code sample, or some tips to make this
          >> technique work?
          >>
          >> P.S. Congrats on your mentor recognition Cameron, you earned it.
          >>
          >>
          >> "Cameron Purdy" <[email protected]> wrote in message
          >> news:[email protected]...
          >> > Generally, accomplish this in the init call.
          >> >
          >> > To force on startup, write a WebLogic startup class that pokes
          >> > http://localhost:7001/whateverapp/yourservlet
          >> >
          >> > (java.net.Url open connection)
          >> > --
          >> >
          >> >
          >> > "TK" <[email protected]> wrote in message
          >> > news:[email protected]...
          >> > > I've read in the Weblogic 5.1 docs that the <load-on-startup> tag is
          >> > > unsupported. However, I really
          >> > > need to be able to initialize my servlets (read in some properties and
          >> set
          >> > > some context values) Is there any way to work around this. Using the
          >> > > weblogic.properties method of weblogic.system.startupClass etc..
          > doesn't
          >> > > seem to work as it's only affecting the default web application. Has
          >> > anyone
          >> > > worked around this problem?
          >> > >
          >>
          >>
          >>
          Dimitri
          

Similar Messages

  • How do I set the initial servlet pool size in WL 5.1

              In WL 4.5, I can set the initial servlet pool size using the
              weblogic.httpd.servlet.SingleThreadedModelPoolSize. I tried to set this property in WL 5.1, and get an "Found undeclared property..." message when booting WL. Is this feature still supported in WL 5.1? If so, how do I set it?
              Thankx
              

    It appears that pool size of 5 is hardcoded somewhere - no matter where you specify
              weblogic.httpd.servlet.SingleThreadedModelPoolSize, the following test servlet:
              import javax.servlet.*;
              import javax.servlet.http.*;
              public class SingleT extends HttpServlet implements SingleThreadModel {
              static int instanceCount = 0;
              public SingleT() {
              super();
              System.out.println("Instance " + (++instanceCount) + " created");
              always produces:
              Instance 1 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Instance 2 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Instance 3 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Instance 4 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Instance 5 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Joe Trung <[email protected]> wrote:
              > Hi Huy,
              > There are lot of 'undeclared' stuffes if you move from 451 to 51.
              > However, if you run WLS with
              > '-Dweblogic.httpd.servlet.SingleThreadedModelPoolSize=10'
              > You will get what you want. I think BEA has moved this option to the <System props>, no more in its <config>
              > Joe
              > "Huy Pham" <[email protected]> wrote:
              >>
              >>In WL 4.5, I can set the initial servlet pool size using the
              >>weblogic.httpd.servlet.SingleThreadedModelPoolSize. I tried to set this property in WL 5.1, and get an "Found undeclared property..." message when booting WL. Is this feature still supported in WL 5.1? If so, how do I set it?
              >>
              >>Thankx
              Dimitri
              

  • Hot deploy Servlet in webapp

    Can I hot deploy a servlet within a web application ?How should I do it?
              (When I compile my servlet into MyApp/web-inf/classes,user this URI -
              http://localhost:7001/MyApp/mypackage.myclass to invocate it ,It does not
              work correctly(error 404))
              

    Hi,
              If I use weblogic.servlet.ServletServlet to try just the servlet , It
              works correctly.But When I develop it in a web application , there is a lot
              of hypelink to this servlet,thus I can't use the relative path reference to
              that servlet.I try to set the name of weblogic.servlet.ServletServlet same
              as the webapp,It doesn't work,how do I solve this problem?
              Thank you
              Pan
              Subject: Re: Hot deploy Servlet in webapp
              > http://www.weblogic.com/docs51/classdocs/API_servlet.html#134798
              >
              > It even explains why you shouldn't use it in production environment.
              >
              > Dimitri
              

  • Error Initializing Servlet

    We are getting this error on our Requisite Catalog server Error Initializing Servlet when trying to access our requisite URL.  Any ideas?

    Hi
    Please go through the pointers below ->
    Error writing to servlet
    Bugseye quick search does not function
    Re: CSV-File with eclass 4.1 oder 5.x
    Regards
    - Atul

  • Initiating servlet Tomcat 4.0

    Hi,
    I have servlet that worked fine when I was
    using tomcat 3.2.2 and 3.2.3 but now when
    I upgraded to tomcat 4.0 the entire server crashes
    while initiating my servlet.
    The servlet throws an exception when I call
    getServletConfig or getServletContext.
    Anybody had similar problems ?
    I am runninng Tomcat 4.0 on Windows 2000 with java 1.3.
    /guha

    Correction, the server does not crash, but the servlet throws an exception
    while executing the init section of the servlet. the error message from
    this exception is null. My init looks like this,
    the exception is thrown while executing the first two lines
    in the init method
    try
    props = new ServletProperties(getServletConfig());
    ServletContext context = this.getServletContext();
    errorHandler = new ErrorHandler(context,props);
    dbConn = new DBStateHolder(errorHandler,props);
    dbConn.createConnectionCache();
    catch (Exception ex)
    System.err.print("Error initiating servlet: " + ex.getMessage());

  • Extending file servlet for webapp resource

    weblogic tunnels all request for resources through fileservlet.
    It is possible to extend file servlet and replace
    new extended servlet with file servlet , So all requests tunnel through
    new servlet and I can do whatever I want(as an example authntication)
    with request.
    I have noticed that request for resources within webapps doesn't
    go through extended servlet.
    So I have following questions
    1) Does file servlet serve request of resources within webapp?
    2) If yes than How I can configure servlet that extends file servlet
    so that request of resource within webapp goes through new
    extended servlet?
    3) If no what servlet servs requests within a webapp , In this case
    I also want to know configuration details to acheive similiar effects
    as in previous question.
    Thanks,

    Hello Steve,
    I think this exception may explain what I'm seeing:
    java.lang.ClassNotFoundException: introduction.videos._tasks__welcome
         at oracle.jsp.runtimev2.JspClassLoader.loadClass(JspClassLoader.java:758)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at oracle.jsp.runtimev2.JspPageInfo.getInstFacade(JspPageInfo.java:167)
         at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:451)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:542)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:304)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    So, it looks like OC4J is using a JspServlet and JspClassLoader to try to load:
    _introduction._videos._tasks__welcome.class
    However, that "_tasks__welcome" is not a Java class - it is a regular .html file that lives in my WAR file as:
    tpri/introduction/videos/tasks_welcome.html
    So it looks like I have to tell OC4J not to try to load .html files as JSPs and treat them as plain HTML files that they are. Is there a way to do this with OC4J? (9.0.4.0.0)
    Thanks,
    Otis

  • Web.xml configuration for initial servlet load

    Hi all,
    I have heard of entering some tag into web.xml file (deployement descriptor) if we need some servlets to be loaded wheneve the app server starts or restarts. can some body help me regarding what to write in web.xml.
    thanks in advance

    I am having some problems with the same issue although specifying the load-on-startup param is not working for.
    Here is snipet of the web.xml:
    <servlet id="Servlet_1206024889339">
    <servlet-name>ContentServer</servlet-name>
    <servlet-class>COM.FutureTense.Servlet.SContentServer</servlet-class>
    <init-param id="InitParam_1206024988781">
    <param-name>inipath</param-name>
    <param-value>/data/WebSphere/ContentServer</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    This however doesn't init the contentServer servlet. Is there anythign else i need to check? I am using websphere5-1.
    I saw somewhere you might have to specify a loadonstartup=true? Where is this set?
    I know the app is reading the right web.xml because i put in a bad value and saw the error being outputted in the startup log.
    There are some servlets being initialised on startup but not the ones I want. These servlets don't seem to be in the web.xml.
    [10/10/08 11:53:30:265 IST] 1e06de8 WebContainer A SRVE0169I: Loading Web Module: cs.war.
    [10/10/08 11:53:33:330 IST] 1e06de8 WebGroup I SRVE0180I: [cs.war] [servlet] [Servlet.LOG]: JSP 1.2 Processor: init
    [10/10/08 11:53:34:098 IST] 1e06de8 WebGroup I SRVE0180I: [cs.war] [servlet] [Servlet.LOG]: SimpleFileServlet: init
    [10/10/08 11:53:34:117 IST] 1e06de8 WebGroup I SRVE0180I: [cs.war] [servlet] [Servlet.LOG]: DirectoryBrowsingServlet: init

  • Initializing Servlets after Weblogic starts

    I have 2 separate ears, one handling the security and the other
              handling the business applications. The business app, on servlet
              initialization, calls the security servlet on port 7001 to login the
              default user. However, while WL is still starting up, the servlet
              fails to recognize the listener port 7001 and fails with a
              java.net.ConnectException saying it could not connect. This when the
              applications have been deployed and the server is being restarted.
              Is there any way to automatically initialize the servlet while the
              server is being brought up so that it initializes after the ports
              become available?
              Thanks in advance.
              

    unfortunately no solution worked :-(
    I tried re-depolyment of "ServiceBus_Console" in Environment/Deployments of WebLogic admin but did not help. I think i should have killed all nohup instances of server though.
    I had to do the reinstall... :-(

  • Q: Forwarding from servlets within webapp

    Suppose I have a servlet mapping so that /guarded/* is mapped to servlet
              s1. If from within s1 I obtain a request dispatcher for
              "/guarded/page1.html" and call forward() (or include()) on it, I get
              into an infinite loop because that request is mapped back into s1.
              Any thoughts on how to escape this kind of loop?
              

    It sounds like what you want is a chance to interrupt the processing, not
              handle it completely yourself.
              One possibility is to forward to another path (/noaccess/page1.html) when
              someone requests something from your servlet-handled path
              (/guarded/page1.html).
              Cameron Purdy, LiveWater
              "Eugene Gross" <[email protected]> wrote in message
              news:[email protected]..
              > Suppose I have a servlet mapping so that /guarded/* is mapped to servlet
              > s1. If from within s1 I obtain a request dispatcher for
              > "/guarded/page1.html" and call forward() (or include()) on it, I get
              > into an infinite loop because that request is mapped back into s1.
              >
              > Any thoughts on how to escape this kind of loop?
              >
              >
              

  • Calling Stateless Session bean from Servlet

    Dear Friends,
    A help will be Appreciated...
    I created a EJB (Stateless Session Bean) using WebSphere Application Developer with its Business logic in Main bean. Its working perfectly fine using UTC (Standalone Test Client). But when i use a servlet to communicate with this EJB, its giving me error as follows:
    Error Stack:
    java.lang.NoClassDefFoundError: package name/DemoHome
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:254)
    at java.beans.Beans.instantiate(Beans.java:213)
    at java.beans.Beans.instantiate(Beans.java:57)
    at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:148)
    at com.ibm.servlet.engine.webapp.WebAppServletManager.getServletReference(WebAppServletManager.java:287)
    at com.ibm.servlet.engine.webapp.WebApp.getServletReference(WebApp.java:354)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcherInfo.calculateInfo(WebAppRequestDispatcherInfo.java:167)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcherInfo.<init>(WebAppRequestDispatcherInfo.java:51)
    at com.ibm.servlet.engine.webapp.WebApp.getRequestDispatcher(WebApp.java:1145)
    at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:179)
    at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
    at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
    at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
    at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
    at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
    For more Info let me provide the snipets of how i used the Sevlet:
    Client.java
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import packagename.*; //package name of imported ear file which is in
    //classpath
    public class Client extends HttpServlet {
    public void doGet(
    javax.servlet.http.HttpServletRequest request,
    javax.servlet.http.HttpServletResponse response)
    throws javax.servlet.ServletException, java.io.IOException {
    PrintWriter out=response.getWriter();
    Properties p = new Properties();
    p.put(javax.naming.Context.PROVIDER_URL, "iiop:///");
    p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
    try {
    InitialContext initial = new InitialContext(p);
    Object objref = initial.lookup("JDemo");
    DemoHome home = (DemoHome)PortableRemoteObject.narrow(objref,DemoHome.class);
    Demo demo = home.create();
    int r=demo.testBean(4);
    out.println("EJB RESULT= "+r);
    } catch (Exception ex) {
    System.err.println("Caught an unexpected exception!");
    ex.printStackTrace();
    Kindly provide ur solution to this problem. Urgent solution will be helpful as its a part of our present project.
    Thanking you for ur esteemed help.
    regards,
    Arun.

    Perhaps you webserver can't see your package jar file.
    Try putting it in WEB-INF\lib directory of your app and restart your server.

  • Not able to export file as .war to webapps in tomcat home

    Below is my first servlet program:
    FirstServlet.java:
    package edu.aspire;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.Servlet;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    public class FirstServlet implements Servlet {
      static {
      System.out.println("Loading Servlet");
      public FirstServlet() {
      System.out.println("Instantiating Servlet");
      public void init(ServletConfig config) throws ServletException {
      System.out.println("Initializing Servlet");
      public void destroy() {
      System.out.println("Removing Servlet from the Servlet container");
      public ServletConfig getServletConfig() {
      return null;
      public String getServletInfo() {
      return null;
      public void service(ServletRequest request, ServletResponse response)
      throws ServletException, IOException {
      System.out.println("service() method");
      PrintWriter out = response.getWriter();
      out.println("Hello World!");
    web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
      <servlet>
        <servlet-name>aspire</servlet-name>
        <servlet-class>edu.aspire.FirstServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>aspire</servlet-name>
        <url-pattern>/first</url-pattern>
      </servlet-mapping>
    </web-app>
    Deployement:
    To deploy my project into %TOMCAT_HOME%\webapps folder.
    Right click on Project ->Export-> War File
    Project Name: Hello
    Destination: D:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Hello.war
    Result found in web browser:
    HTTP Status 404 - /Hello/first
    And Hello.war file is not found in webapps folder too after exporting as .war.
    I am using Apache tomcat 6.0.37, eclipse 3.7.2 release, tomcat plugin :com.sysdeo.eclipse.tomcat_3.3.0
    Please let me know where i am going wrong.

    I have done all those settings but still read the 'Eclipse tomcat run time' and repeated the settings accordingly. Still not not getting output.
    -I exported the file to destination webapps folder and clicked 'finish'
    -when i select 'run on server'
    -the tomcat gets started and 'http status 404' page is displayed in browser
    I even tried this
    - manaully started server
    -exported as .war file to webapps but  does not get exported, doesnt get deployed and nothing gets displayed in the console
    -when provide the link the same page is displayed
    One alert message is displayed in the markers 'Classpath entry C:/Program Files/Apache Software Foundation/Tomcat 6.0/lib/servlet-api.jar will not be exported or published. Runtime ClassNotFoundExceptions may result.'
    I have added servlet-api.jar to the library but still getting this message so tried to adding in classpath (as provided in websites) that also didnt work.
    Next what to do i dont understand.

  • Tomcat unable to display my webapps

    Server: Apache - Tomcat
    For some reason some of initial servlets and html files are working and visible. But I am not able to access any html or servlet files in a new folder in the "webapps" folder.
    + is it because of some improper mapping of servlets? (but why shoudn't the html files be visible?)

    If you have an application called myapp, then myapp will go under the webapps folder. Your html and jsp files will reside under the webapps/myapp folder. Your class files will reside under webapps/myapp/WEB-INF/classes folder or under webapps/myapp/WEB-INF/lib folder if your class files are in a jar.
    So how exactly are you trying to access these files?
    Gabsaga

  • Failed to load servlet: java.lang.ClassNotFoundException

    I've been working on a project with other developers and we've all have our own sections of a large web application that we are working on. When we are each done working on our part we send our JSPs, Beans, and servlets to the lead developer that then deploys one EAR file on our Test/QA server. I now asked the tech lead if he could send me the EAR file so I can load the application in its entirety on my local machine. When I start up the server, I get the error "Failed to load servlet: java.lang.ClassNotFoundException" for each one of my servlets. Even if the servlet path is correct I still get that error. I also tried removing the servlet in the web.xml file and then adding it again, but I still get that error. Has anyone experienced anything like this before? Is this error appearing because I have two projects (my part of the application with only my code and the complete project from the EAR file) that point to the same servlets? I'm not sure how to resolve this. Any advice would be greatly appreciated. Thanks in advance!

    That's what I thought too. But I'm installing an EAR file exported directly from another persons computer and the application is working fine on his machine. So the EAR file will automatically place the servlets in their proper path and directory structure when I import it. In any case I checked the paths myself and they are correct (the servlet file does exist in the same path). I also removed the servlet from the web.xml file and added it again through the websphere UI so if there was any miss-type in the directory path it would have been corrected by websphere. I also tried making a minor change to the servlet file and resaving it thinking that it might correct something or do something that would allow my websphere environment to see/recognize the existance of the servlet, but that did not work. I'm out of ideas. Does anyone have any suggestions? Here is a part of my log file if it helps: Thanks!
    *** Starting the server ***
    IBM WebSphere Application Server, Release 4.0.4
    Advanced Single Server Edition for Multiplatforms
    Copyright IBM Corp., 1997-2001
    ************ Start Display Current Environment ************
    WebSphere AEs 4.0.4 ptf40230.02 running with process name localhost/Default Server and process id 3188
    Host Operating System is Windows 2000, version 5.0
    Java version = J2RE 1.3.1 IBM Windows 32 build cn131w-20020710 ORB130 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
    server.root = C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4
    Java Home = C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4\java\jre
    ws.ext.dirs = C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/java/lib;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/classes;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/lib;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/lib/ext;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/web/help;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.0.1/runtime/wasListener.jar;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.webservice_5.0.1/runtime/worf.jar
    Classpath = C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/properties;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/lib/bootstrap.jar;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.0.1/runtime/wteServers.jar;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.0.1/runtime/wasToolsCommon.jar
    Java Library path = C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/bin;C:\Program Files\IBM\WebSphere Studio\eclipse\jre\bin;.;C:\WINNT\system32;C:\WINNT;C:\Program Files\CA\Dcs\DMScripting\;C:\Program Files\CA\DCS\CAWIN\;C:\oracle\ora81\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\CA_APPSW;C:\TNGSD\BIN;C:\Program Files\QuickTime\QTSystem\;C:\PROGRA~1\MICROS~2\Office;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
    Current trace specification = *=all=disabled
    ************* End Display Current Environment *************
    [9/13/06 9:25:18:620 EDT] 64a937ec Server U Version : 4.0.4
    [9/13/06 9:25:18:636 EDT] 64a937ec Server U Edition: Advanced Single Server Edition for Multiplatforms
    [9/13/06 9:25:18:636 EDT] 64a937ec Server U Build date: Thu Sep 05 00:00:00 EDT 2002
    [9/13/06 9:25:18:636 EDT] 64a937ec Server U Build number: ptf40230.02
    [9/13/06 9:25:21:933 EDT] 64a937ec DrAdminServer I WSVR0053I: DrAdmin available on port 7000
    [9/13/06 9:25:21:995 EDT] 64a937ec ResourceBinde I WSVR0049I: Binding Session Persistence datasource as jdbc/Session
    [9/13/06 9:25:22:136 EDT] 64a937ec ResourceBinde I WSVR0049I: Binding IDS as jdbc/IDS
    [9/13/06 9:25:23:120 EDT] 64a937ec ServletEngine A SRVE0161I: IBM WebSphere Application Server - Web Container. Copyright IBM Corp. 1998-2001
    [9/13/06 9:25:23:183 EDT] 64a937ec ServletEngine A SRVE0162I: Servlet Specification Level: 2.2
    [9/13/06 9:25:23:183 EDT] 64a937ec ServletEngine A SRVE0163I: Supported JSP Specification Level: 1.1
    [9/13/06 9:25:23:292 EDT] 64a937ec ServletEngine A SRVE0167I: Session Manager is Configured - Initializing...
    [9/13/06 9:25:23:401 EDT] 64a937ec CacheManager A DYNA0011E: Servlet cache file dynacache.xml not found; caching is disabled
    [9/13/06 9:25:23:417 EDT] 64a937ec ServletEngine A SRVE0169I: Loading Web Module: IBM Universal Test Client.
    [9/13/06 9:25:23:761 EDT] 64a937ec WebGroup I SRVE0091I: [Servlet LOG]: JSP 1.1 Processor: init
    [9/13/06 9:25:23:792 EDT] 64a937ec WebGroup I SRVE0091I: [Servlet LOG]: SimpleFileServlet: init
    [9/13/06 9:25:24:511 EDT] 64a937ec ServletEngine A SRVE0169I: Loading Web Module: IDS.
    [9/13/06 9:25:24:683 EDT] 64a937ec WebGroup I SRVE0091I: [Servlet LOG]: JSP 1.1 Processor: init
    [9/13/06 9:25:24:683 EDT] 64a937ec WebGroup I SRVE0091I: [Servlet LOG]: SimpleFileServlet: init
    [9/13/06 9:25:24:698 EDT] 64a937ec WebGroup I SRVE0091I: [Servlet LOG]: InvokerServlet: init
    [9/13/06 9:25:24:714 EDT] 64a937ec WebGroup X Servlet Error-[SettingsServlet]: Failed to load servlet: java.lang.ClassNotFoundException: com.comp.ids.admin.servlet.SettingsServlet
         at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:382)
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:248)
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:79)
         at java.beans.Beans.instantiate(Beans.java:216)
         at java.beans.Beans.instantiate(Beans.java:77)
         at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:141)
         at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:325)
         at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1218)
         at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:145)
         at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:259)
         at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:168)
         at com.ibm.servlet.engine.ServletEngine.addWebApplication(ServletEngine.java:652)
         at com.ibm.ws.runtime.WebContainer.install(WebContainer.java:36)
         at com.ibm.ws.runtime.Server.startModule(Server.java:617)
         at com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:333)
         at com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java:349)
         at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:884)
         at com.ibm.ws.runtime.StandardServer.main(StandardServer.java:519)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
         at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV4$1.run(ServerRunnerV4.java:56)
    Message was edited by:
    MCJasper

  • Can't Get My Servlets to Run in Tomcat. Please help...

    Hi!
    I've been banging my head against the same brick wall for a day and a half now and am getting pretty desperate...
    I installed Tomcat 4.1.24 with no problem and successfully ran one or two of the example servlets. However, I can't get my own (working) servlets to run in either ROOT or any other folder that I create under webapps. If I move my servlets into webapps\WEB-INF\classes, though, they run fine!
    Using 'x' represent the folder I've created, I have placed a servlet called FirstServlet in x\WEB-INF\classes. I have also placed the following web.xml file inside x\WEB-INF:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>FirstServlet</servlet-name>
    <servlet-class>FirstServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>FirstServlet</servlet-name>
    <url-pattern>/servlet/FirstServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    [I have also tried omitting '/servlet' above and tried changing the name of the url-pattern.]
    In addition to this, I have tried editing the server.xml file by adding the following context:
    <Context path="/x" docBase="webapps/x" debug="0"
    reloadable="true">
    </Context>
    Despite all of this, I still continue to get the error message 404: The requested resource is not available.
    Can anybody please give me some idea of what I'm doing wrong or am failing to do??
    Many thanks in anticipation.
    Cheers.
    Jan

    Hi, Sharnee.
    Thanks for taking the time to email me. However, I really don't need to test my servlets, since (a) they all work under the JSWDK Web server and (b) the one that I am attempting to test ('FirstServlet') works fine when I place it in webapps\examples\WEB-INF\classes.
    In answer to your previous email, the URL I have used in attempting to run my servlet (with the servlet in ...\webapps\x\WEB-INF\classes, of course) is:
    http://localhost:8080/x/servlet/FirstServlet
    In desperation, I have also tried each of the following (with similar lack of success):
    http://localhost:8080/webapps/x/servlet/FirstServlet
    http://localhost:8080/ROOT/servlet/FirstServlet (after copying the servlet into ...\webapps\ROOT\WEB-INF\classes)
    http://localhost:8080/webapps/ROOT/servlet/FirstServlet
    Any suggestions?? I'm really frustrated, since the basic process that is required seems so straightforward, but simply isn't working for me!
    Thanks in anticipation.
    Jan

  • How to publish a servlet class to web server?

    background:
    web server: tomcat apache 4
    context path: webapp\test\
    servlet path: webapp\test\WEB-INF
    servlet name: HelloWorld.class
    i tried to placed the servlet class file to above servlet path,
    but i can't invoke the servlet by http://localhost:8080/test/HelloWorld
    what should i do in order to invoke the servlet at browser?
    Is a web.xml necessary a must to provided a mapping between request name and actual class name?

    First of all you need a *.war structure which look like this
    /app-name
    /app-name/WEB-INF/
    /app-name/WEB-INF/lib
    /app-name/WEB-INF/classes
    When you have created this structure you add your servlet (HelloWorld.class) in the classes directory (Create the package structure first).
    When this is done you need to map the servlet to a given uri which is done in the web.xml. An example is found below:
    <servlet>
    <servlet-name>hello</servlet-name>
    <servlet-class>package.HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>hello</servlet-name>
    <url-pattern>/hello/*</url-pattern>
    </servlet-mapping>
    Hopefully this will help :-)
    best regards
    Stig

Maybe you are looking for

  • How do I make an XY-Graph plot points over time?

    I am building a program to plot and take data of a relationship between two voltages.  One is voltage is uniquely dependent on the other.  So far I have successfully built an XY-Graph to plot the voltages against each other (Voltage1 along the x-axis

  • Error message: "iTunes cannot read the contents of the iPod."

    I wanted to get my dad a new iPod for Xmas and transfer all his music from his ancient Classic. But when I connect to my MacBookPro, I get the error message: "iTunes cannot read the contents of the iPod." I see that 90% of the ipod drive is used, but

  • [JS CS3] How to reach a item in a collection of pageitems whom label is the same ?

    Hi, I had a look through the forum and I didn't find any topic on it. I have several pageitems whom label is the same : "LogoBox" I can have interesting info such as b app.activeDocument.pageItems.count("LogoBox") So I can know how many iterations I

  • Scaling Data on report BPC 10.0

    Hi All, I would like to know if anyone had solve the problem on ScalingData. On our latest version (7.5) we had a drop-down list (€, K€, M€) which changed my entire report. In the new version I can't find a similar way, the ScalingData function doesn

  • Details on dependencies of Software components(Sc's)

    Hi Gurus, Can you explain me indetail what are dependencies and what is the function of each of them: sap-jee sap_built sap_jtech and sappcui_gp and what are .sca files, i am totally confused. one more issue is in my track the above dependencies(sap-