Run a simple servlet in WLS6.1

          Hi,
          I am new to WLS 6.1
          I have a simple servlet that outputs a string on webpage.
          I am trying to run this servlet using the WLS6.1
          I have compiled the source code and copied the class file (MyFirstServlet.class)
          into
          D:\BEA\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classes
          I have the web.xml file in web-inf directory as below
          <?xml version="1.0" ?>
          <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN"
          "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
          <web-app>
          <servlet>
               <servlet-name> HelloWorld </servlet-name>
               <servlet-class> HelloWorld</servlet-class>
          </servlet>
          <servlet-mapping>
               <servlet-name> HelloWorld </servlet-name>
               <url-pattern> HelloWorld </url-pattern>
          </servlet-mapping>
          <welcome-file-list>
          <welcome-file>index.html</welcome-file>
          </welcome-file-list>
          <servlet> <servlet-name> MyFirstServlet </servlet-name> <servlet-class> MyFirstServlet
          </servlet-class> </servlet>
          <servlet-mapping> <servlet-name> MyFirstServlet </servlet-name> <url-pattern>
          MyFirstServlet </url-pattern> </servlet-mapping>
          </web-app>
          HelloWorls is also another simple servlet.
          then in the browser I give
          http://localhost:7001/MyFirstServlet
          this is the error I get
          Error 404--Not Found
          From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
          10.4.5 404 Not Found
          The server has not found anything matching the Request-URI. No indication is given
          of whether the condition is temporary or permanent.
          If the server does not wish to make this information available to the client,
          the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code
          SHOULD be used if the server knows, through some internally configurable mechanism,
          that an old resource is permanently unavailable and has no forwarding address.
          what is the problem?
          Please anyone help me in this matter!
          Thanks in Advance
          SP
          

          Hi,
          I am new to WLS 6.1
          I have a simple servlet that outputs a string on webpage.
          I am trying to run this servlet using the WLS6.1
          I have compiled the source code and copied the class file (MyFirstServlet.class)
          into
          D:\BEA\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classes
          I have the web.xml file in web-inf directory as below
          <?xml version="1.0" ?>
          <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN"
          "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
          <web-app>
          <servlet>
               <servlet-name> HelloWorld </servlet-name>
               <servlet-class> HelloWorld</servlet-class>
          </servlet>
          <servlet-mapping>
               <servlet-name> HelloWorld </servlet-name>
               <url-pattern> HelloWorld </url-pattern>
          </servlet-mapping>
          <welcome-file-list>
          <welcome-file>index.html</welcome-file>
          </welcome-file-list>
          <servlet> <servlet-name> MyFirstServlet </servlet-name> <servlet-class> MyFirstServlet
          </servlet-class> </servlet>
          <servlet-mapping> <servlet-name> MyFirstServlet </servlet-name> <url-pattern>
          MyFirstServlet </url-pattern> </servlet-mapping>
          </web-app>
          HelloWorls is also another simple servlet.
          then in the browser I give
          http://localhost:7001/MyFirstServlet
          this is the error I get
          Error 404--Not Found
          From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
          10.4.5 404 Not Found
          The server has not found anything matching the Request-URI. No indication is given
          of whether the condition is temporary or permanent.
          If the server does not wish to make this information available to the client,
          the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code
          SHOULD be used if the server knows, through some internally configurable mechanism,
          that an old resource is permanently unavailable and has no forwarding address.
          what is the problem?
          Please anyone help me in this matter!
          Thanks in Advance
          SP
          

Similar Messages

  • How to Run a simple servlet "HelloWorld.java" in JBoss 3.0 ?

    Dear all,
    I am a beginner and I want to run a simple "HelloWorld.java" servlet .
    I need to use JBoss 3.0 .
    After I run this simple servlet, I need to use EJB-Servlet-JSP to implement MVC .
    I have the servlet code and I am able to compile it.
    But I dont know how to proceed as to where to put the class files , where do I specify an alias for my servlet and what modifications I need in Web.xml,Jboss.xml,Application.xml ?
    I do not anything about tools like Ant or Xdoclet so need to proceed without them.Please alos let me know where I can fond complete info about Ant and Xdoclet .
    Thanx in Advance,
    Sujith

    I am not sure of the JBoss package that you are using. If you are using the JBoss-Tomcat package, here's the solution. Create either a .war file or create a directory with the name <your-webapp>.war under <jboss-root>/server/default/deploy. If you are creating a war file, you have to place that war file in the same directory. JBoss-Tomcat will keep looking at this directory for new files or updates to files and deploys/re-deploys as required.
    The contents of the war file should be something like this.
    WEB-INF - directory
    WEB-INF/classes - your servlet classes
    WEB-INF.web.xml - your configuration. Here you can specify the servlet name, class and URI mapping.
    Now, you can call your servlet using the browser in this way: http://localhost:8080/<your-webapp>/servlet/<servlet-alias>. Here the <your-webapp> is the prefix of the .war file.
    Resources:
    Ant - http://jakarta.apache.org/ant/
    Xdoclet - http://xdoclet.sourceforge.net/

  • Problem running simple servlet on tomcat 4.0

    hi,
    i have setup tomcat4.0 on the server and i am trying to run a simple servlet but it is not working. here is what i have done:
    1. setting the CATALINA_HOME variable to the directory where tomcat is installed
    2. setting the classpath variable to servlet.jar
    3. i am putting the .class fille in tomcat-home-directory/webapps/ROOTS/WEB-INF/classes
    4. i am giving the url as http://localhost:8080/servlet/HelloServlet.class
    but error is given...could you please tell where could i have probably made a mistake
    regards
    preeti

    hi tnguyen1973
    now my servlets are running on the server provided they are kept under /examples/WEB-INF/classes. But now i have my own folder at the same level of examples called Lm which also has WEB-INF/classes. but if i put my servlets here it is giving exception.hope u got me. please, tell me where should i make necessary modifications to get the servlets run from my own folder instead of examples
    thank u

  • How to run a servlet in WLS6.0

    hi all,
              I had written a simple servlet. I would like to know the steps to
              be followed to run the servlet.
              What i did is i kept that servlet class file in the default directory
              and added the servlet path in the web.XML.
              but when i try to run the servlet its giing me 404 error.
              Can any one help me out by giving the detailed steps to be followed as I
              am new to Weblogic6.0
              Thanks in Advance,
              

    The steps required are documented at:
              http://e-docs.bea.com/wls/docs60/quickstart/quick_start.html
              mark
              narendra wrote:
              > hi all,
              > I had written a simple servlet. I would like to know the steps to
              > be followed to run the servlet.
              > What i did is i kept that servlet class file in the default directory
              > and added the servlet path in the web.XML.
              > but when i try to run the servlet its giing me 404 error.
              > Can any one help me out by giving the detailed steps to be followed as I
              > am new to Weblogic6.0
              >
              > Thanks in Advance,
              

  • How to authenticate user when accessing a servlet in WLS6.0

              In my current project , i need to authenticate user when accessing(executing) a
              servlet deployed in WLS6.0. I tried to add
              <auth-method>
              BASIC
              </auth-method>
              in the web.xml.
              Also in the default fileRealmProperties file, i set up the ACL for
              acl.execute.weblogic.Servlet.myServlet = the user
              also i have disabled guest access in my config.xml.
              after all these, the servlet can still be accessed freely.
              do i miss something ? what is the right way to set up it in wls6.0
              thanks a lot
              hyliu
              

    The steps required are documented at:
              http://e-docs.bea.com/wls/docs60/quickstart/quick_start.html
              mark
              narendra wrote:
              > hi all,
              > I had written a simple servlet. I would like to know the steps to
              > be followed to run the servlet.
              > What i did is i kept that servlet class file in the default directory
              > and added the servlet path in the web.XML.
              > but when i try to run the servlet its giing me 404 error.
              > Can any one help me out by giving the detailed steps to be followed as I
              > am new to Weblogic6.0
              >
              > Thanks in Advance,
              

  • Error 500--Internal Server Error when running a simple ADF application

    Hello,
    I installed Jdeveloper+ADF (jdevstudio11112install.exe) and i try to run a simple ADF app (which is already running for one of my colleagues) and it boms out with these errors:
    java.lang.NoSuchMethodError: oracle.jbo.SessionContextManager.removeCurrentSession()V
         at oracle.adf.model.BindingRequestHandler.endRequest(BindingRequestHandler.java:283)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:196)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    I ve installed the 10th time just to make sure i did not miss anything.
    Any ideas?
    fyi that while installing, the % complete jumps from 40% suddenly to 72% and then to 97% .. Till 40% complete, its slow and steady.
    I ve downloaded several times fresh and still the same issue.
    I am not sure how i m missing any missing any classpath or files.

    This is what is happening when i start the integrated weblogic server and run the adf application.
    [Waiting for the domain to finish building...]
    [02:36:31 PM] Creating Integrated Weblogic domain...
    [02:38:15 PM] Extending Integrated Weblogic domain...
    [02:38:49 PM] Integrated Weblogic domain processing completed successfully.
    *** Using port 7101 ***
    "C:\Documents and Settings\user\Application Data\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\bin\startWebLogic.cmd"
    [waiting for the server to complete its initialization...]
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m
    WLS Start Mode=Development
    CLASSPATH=C:\MIDDLE~1\patch_wls1032\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\MIDDLE~1\JDK160~1.5-3\lib\tools.jar;C:\MIDDLE~1\utils\config\10.3\config-launch.jar;C:\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\MIDDLE~1\modules\features\weblogic.server.modules_10.3.2.0.jar;C:\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;C:\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;c:\gallup\source10g\fmb\;c:\ora10gforms\forms\java\;C:\ora10gforms\j2ee\formsapp\formsweb\WEB-INF\lib\frmsrv.jar;C:\ora10gforms\jlib\repository.jar;C:\ora10gforms\jlib\ldapjclnt10.jar;C:\ora10gforms\jlib\debugger.jar;C:\ora10gforms\jlib\ewt3.jar;C:\ora10gforms\jlib\share.jar;C:\ora10gforms\jlib\utj.jar;C:\ora10gforms\jlib\zrclient.jar;C:\ora10gforms\reports\jlib\rwrun.jar;C:\ora10gforms\forms\java\frmwebutil.jar;
    PATH=C:\MIDDLE~1\patch_wls1032\profiles\default\native;C:\MIDDLE~1\patch_jdev1111\profiles\default\native;C:\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\MIDDLE~1\WLSERV~1.3\server\bin;C:\MIDDLE~1\modules\ORGAPA~1.0\bin;C:\MIDDLE~1\JDK160~1.5-3\jre\bin;C:\MIDDLE~1\JDK160~1.5-3\bin;C:\ora10gforms\jdk\jre\bin\classic;C:\ora10gforms\bin;C:\ora10gforms\jre\1.4.2\bin\client;c:\ora10gclient\bin;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\gallup\source10g;C:\Program Files\ImageConverter Plus;;C:\WINDOWS\system32\WindowsPowerShell\v1.0;;C:\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_14"
    Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
    Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode)
    Starting WLS with line:
    C:\MIDDLE~1\JDK160~1.5-3\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Djavax.net.ssl.trustStore=C:\Middleware\wlserver_10.3\server\lib\DemoTrust.jks -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -da -Dplatform.home=C:\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\MIDDLE~1\WLSERV~1.3\server -Djps.app.credential.overwrite.allowed=true -Ddomain.home=C:\DOCUME~1\JAYARA~1\APPLIC~1\JDEVEL~1\SYSTEM~1.36\DEFAUL~1 -Dcommon.components.home=C:\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=C:\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.domain.config.dir=C:\DOCUME~1\JAYARA~1\APPLIC~1\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1 -Doracle.server.config.dir=C:\DOCUME~1\JAYARA~1\APPLIC~1\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1\servers\DefaultServer -Doracle.security.jps.config=C:\DOCUME~1\JAYARA~1\APPLIC~1\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\fmwconfig\jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.carmlloc=C:\DOCUME~1\JAYARA~1\APPLIC~1\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1\carml -Digf.arisidstack.home=C:\DOCUME~1\JAYARA~1\APPLIC~1\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1\arisidprovider -Dweblogic.alternateTypesDirectory=\modules\oracle.ossoiap_11.1.1,\modules\oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=C:\DOCUME~1\JAYARA~1\APPLIC~1\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\oracle\store\gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\MIDDLE~1\patch_wls1032\profiles\default\sysext_manifest_classpath;C:\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath weblogic.Server
    <Nov 18, 2009 2:38:55 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 14.0-b16 from Sun Microsystems Inc.>
    <Nov 18, 2009 2:38:55 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PDT 2009 1267925 >
    <Nov 18, 2009 2:38:57 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Nov 18, 2009 2:38:57 PM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Nov 18, 2009 2:38:57 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file C:\Documents and Settings\user\Application Data\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log is opened. All server side log events will be written to this file.>
    <Nov 18, 2009 2:39:04 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Nov 18, 2009 2:39:12 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Nov 18, 2009 2:39:12 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Nov 18, 2009 2:40:00 PM CST> <Error> <HTTP> <BEA-101216> <Servlet: "Spy" failed to preload on startup in Web application: "dms.war".
    java.lang.NoSuchMethodError: oracle.dms.collector.Collector.<init>(Ljava/util/concurrent/ScheduledExecutorService;Loracle/dms/config/CollectorConfig;Loracle/dms/util/TopoNodeIDInfo;)V
         at oracle.dms.aggregator.AggreStorage.<init>(AggreStorage.java:61)
         at oracle.dms.app.DomainInitializer.init(DomainInitializer.java:100)
         at oracle.dms.app.BaseInitializer.getInitializer(BaseInitializer.java:278)
         at oracle.dms.app.DmsSpy.init(DmsSpy.java:129)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         Truncated. see log file for complete stacktrace
    >
    <Nov 18, 2009 2:40:00 PM CST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'DMS Application [Version=11.1.1.1.0]'.
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "Spy" failed to preload on startup in Web application: "dms.war".
    java.lang.NoSuchMethodError: oracle.dms.collector.Collector.<init>(Ljava/util/concurrent/ScheduledExecutorService;Loracle/dms/config/CollectorConfig;Loracle/dms/util/TopoNodeIDInfo;)V
         at oracle.dms.aggregator.AggreStorage.<init>(AggreStorage.java:61)
         at oracle.dms.app.DomainInitializer.init(DomainInitializer.java:100)
         at oracle.dms.app.BaseInitializer.getInitializer(BaseInitializer.java:278)
         at oracle.dms.app.DmsSpy.init(DmsSpy.java:129)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1915)
         at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1889)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1807)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:39)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1399)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.NoSuchMethodError: oracle.dms.collector.Collector.<init>(Ljava/util/concurrent/ScheduledExecutorService;Loracle/dms/config/CollectorConfig;Loracle/dms/util/TopoNodeIDInfo;)V
         at oracle.dms.aggregator.AggreStorage.<init>(AggreStorage.java:61)
         at oracle.dms.app.DomainInitializer.init(DomainInitializer.java:100)
         at oracle.dms.app.BaseInitializer.getInitializer(BaseInitializer.java:278)
         at oracle.dms.app.DmsSpy.init(DmsSpy.java:129)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         Truncated. see log file for complete stacktrace
    >
    <Nov 18, 2009 2:40:02 PM CST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <Nov 18, 2009 2:40:10 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <Nov 18, 2009 2:40:10 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <Nov 18, 2009 2:40:10 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <Nov 18, 2009 2:40:10 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 172.16.18.59:7101 for protocols iiop, t3, ldap, snmp, http.>
    <Nov 18, 2009 2:40:10 PM CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "DefaultServer" for domain "DefaultDomain" running in Development Mode>
    <Nov 18, 2009 2:40:10 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Nov 18, 2009 2:40:10 PM CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    IntegratedWebLogicServer startup time: 82253 ms.
    IntegratedWebLogicServer started.
    [Running application MDMD on Server Instance IntegratedWebLogicServer...]
    [02:44:03 PM] ---- Deployment started. ----
    [02:44:03 PM] Target platform is (Weblogic 10.3).
    [02:44:05 PM] Retrieving existing application information
    [02:44:06 PM] Running dependency analysis...
    [02:44:06 PM] Deploying 2 profiles...
    [02:44:09 PM] Wrote Web Application Module to C:\Documents and Settings\user\Application Data\JDeveloper\system11.1.1.2.36.55.36\o.j2ee\drs\MDMD\ViewControllerWebApp.war
    [02:44:10 PM] Wrote Enterprise Application Module to C:\Documents and Settings\user\Application Data\JDeveloper\system11.1.1.2.36.55.36\o.j2ee\drs\MDMD
    [02:44:10 PM] Deploying Application...
    <Nov 18, 2009 2:44:11 PM CST> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application MDMD is not versioned.>
    <FacesDatabindingConfigurator><_installFacesBindingDefFactory>
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.adfinternal.view.faces.config.rich.FacesDatabindingConfigurator._installFacesBindingDefFactory(FacesDatabindingConfigurator.java:306)
         at oracle.adfinternal.view.faces.config.rich.FacesDatabindingConfigurator._setupAdfDatabindingForJsf(FacesDatabindingConfigurator.java:110)
         at oracle.adfinternal.view.faces.config.rich.FacesDatabindingConfigurator.init(FacesDatabindingConfigurator.java:53)
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.init(GlobalConfiguratorImpl.java:400)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.init(RegistrationFilter.java:53)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.init(TrinidadFilterImpl.java:103)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.init(TrinidadFilter.java:54)
         at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:332)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.FilterManager.loadFilter(FilterManager.java:98)
         at weblogic.servlet.internal.FilterManager.preloadFilters(FilterManager.java:59)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1805)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
         at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:54)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
         at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NoSuchMethodError: oracle.jbo.uicli.mom.JUMetaObjectManager.insertDefinition(Ljava/lang/String;Ljava/lang/Object;Z)V
         at oracle.jbo.uicli.mom.JUMetaObjectManager.updateJUMomDef(JUMetaObjectManager.java:110)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.getJUMomDef(JUMetaObjectManager.java:102)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.getFactoryMap(JUMetaObjectManager.java:935)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.registerDefinitionFactory(JUMetaObjectManager.java:964)
         ... 49 more
    [02:44:32 PM] Application Deployed Successfully.
    [02:44:32 PM] The following URL context root(s) were defined and can be used as a starting point to test your application:
    [02:44:32 PM] http://ip:7101/Option1-ViewController-context-root
    [02:44:32 PM] Elapsed time for deployment: 28 seconds
    [02:44:32 PM] ---- Deployment finished. ----
    Run startup time: 28516 ms.
    [Application MDMD deployed to Server Instance IntegratedWebLogicServer]
    Target URL -- http://ip:7101/Option1-ViewController-context-root/faces/Option1
    <Nov 18, 2009 2:44:52 PM CST> <Error> <HTTP> <BEA-101020> <[ServletContext@13097048[app:MDMD module:Option1-ViewController-context-root path:/Option1-ViewController-context-root spec-version:2.5]] Servlet failed with Exception
    java.lang.NoSuchMethodError: oracle.jbo.SessionContextManager.removeCurrentSession()V
         at oracle.adf.model.BindingRequestHandler.endRequest(BindingRequestHandler.java:283)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:196)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         Truncated. see log file for complete stacktrace
    >
    <Nov 18, 2009 2:44:52 PM CST> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at Nov 18, 2009 2:44:52 PM CST. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = Nov 18, 2009 2:44:52 PM CST SERVER = DefaultServer MESSAGE = [ServletContext@13097048[app:MDMD module:Option1-ViewController-context-root path:/Option1-ViewController-context-root spec-version:2.5]] Servlet failed with Exception
    java.lang.NoSuchMethodError: oracle.jbo.SessionContextManager.removeCurrentSession()V
         at oracle.adf.model.BindingRequestHandler.endRequest(BindingRequestHandler.java:283)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:196)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = ORFNAGAJ470a TXID = CONTEXTID = TIMESTAMP = 1258577092563
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000
    >
    <JMXWatchNotificationListener><handleNotification> failure creating incident from WLDF notification
    oracle.dfw.incident.IncidentCreationException: DFW-40116: failure creating incident
    Cause: DFW-40112: There was an error executing adrci commands; the following errors have been found "DIA-48415: Syntax error found in string [create home base=C:\\Documents and Settings\\user\\Application] at column [75]
    DIA-48447: The input path [C:\\Documents and Settings\\user\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr] does not contain any ADR homes
    DIA-48447: The input path [diag\ofm\defaultdomain\defaultserver] does not contain any ADR homes
    DIA-48494: ADR home is not set, the corresponding operation cannot be done
    Action: Ensure that command line tool "adrci" can be executed from the command line.
         at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createADRIncident(DiagnosticsDataExtractorImpl.java:708)
         at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createIncident(DiagnosticsDataExtractorImpl.java:246)
         at oracle.dfw.spi.weblogic.JMXWatchNotificationListener.handleNotification(JMXWatchNotificationListener.java:195)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor$ListenerWrapper.handleNotification(DefaultMBeanServerInterceptor.java:1732)
         at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
         at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
         at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
         at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
         at weblogic.management.jmx.modelmbean.WLSModelMBean.sendNotification(WLSModelMBean.java:824)
         at weblogic.diagnostics.watch.JMXNotificationProducer.postJMXNotification(JMXNotificationProducer.java:79)
         at weblogic.diagnostics.watch.JMXNotificationProducer.sendNotification(JMXNotificationProducer.java:104)
         at com.bea.diagnostics.notifications.JMXNotificationService.send(JMXNotificationService.java:122)
         at weblogic.diagnostics.watch.JMXNotificationListener.processWatchNotification(JMXNotificationListener.java:103)
         at weblogic.diagnostics.watch.Watch.performNotifications(Watch.java:621)
         at weblogic.diagnostics.watch.Watch.evaluateLogRuleWatch(Watch.java:546)
         at weblogic.diagnostics.watch.WatchManager.evaluateLogEventRulesAsync(WatchManager.java:765)
         at weblogic.diagnostics.watch.WatchManager.run(WatchManager.java:525)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: oracle.dfw.common.DiagnosticsException: DFW-40112: failed to execute the adrci commands "create home base=C:\\Documents and Settings\\user\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr product_type=ofm product_id=defaultdomain instance_id=defaultserver
    set base C:\\Documents and Settings\\user\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr
    set homepath diag\ofm\defaultdomain\defaultserver
    create incident problem_key="BEA-101020 [HTTP]" error_facility="BEA" error_number=101020 error_message="null" create_time="2009-11-18 14:44:52.579 -06:00" ecid="0000IK92_zZ9pYG6yz6iMG1B15hi000005"
    Cause: There was an error executing adrci commands; the following errors have been found "DIA-48415: Syntax error found in string [create home base=C:\\Documents and Settings\\user\\Application] at column [75]
    DIA-48447: The input path [C:\\Documents and Settings\\user\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr] does not contain any ADR homes
    DIA-48447: The input path [diag\ofm\defaultdomain\defaultserver] does not contain any ADR homes
    DIA-48494: ADR home is not set, the corresponding operation cannot be done
    Action: Ensure that command line tool "adrci" can be executed from the command line.
         at oracle.dfw.impl.incident.ADRHelper.invoke(ADRHelper.java:1052)
         at oracle.dfw.impl.incident.ADRHelper.createIncident(ADRHelper.java:786)
         at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createADRIncident(DiagnosticsDataExtractorImpl.java:688)
         ... 19 more
    ERROR ON BROWSER
    Error 500--Internal Server Error

  • Problem compiling simple servlet

    I am trying to compile a very simple servlet.
    When I do, I get the following error message:
    Package javax.servlet does not exist
    I am using the Java 2 SDK, Standard Edition Version 1.3.1.
    I have downloaded the servlet api (zip file servletapi2_1_1win.zip)
    from Sun's site. I unzipped these files in my lib directory; there are two folders,
    one called api and the other called src. Api and Src directories have their own
    sub-folders, javax/servlet/http etc.
    I am using W2K ; I had to create a CLASSPATH system variable in the environment
    variables section of control panel since there was none defined.
    I added the following line:
    C:\jdk1.3.1_01\lib\api\javax\servlet;C:\jdk1.3.1_01\lib\api\javax\servlet\http;
    I also did this for the PATH statement..
    My servlet looks like this:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class howdy extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
    res.setContentType("text/html");
    PrintWriter out = res.getWriter();
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Hello World </TITLE></HEAD>");
    out.println("<BODY>");
    out.println("<BIG>Hello World </BIG>");
    out.println("</BODY></HTML>");

    Thanks. I was able to figure it out by specifying the
    full classpath
    at the command line, like this:
    C:> javac -classpath
    C:\jdk1.3.1_01\lib\servletapi2_1_1-win.zip\MyServlet.ja
    a
    Apparantly the system doesn't acknowledge the
    environmental variable that
    I created in the control panel; also I have no
    autoexec.bat file...so it
    looks like I have to write out the full path whenever
    I need to compile
    something. Kind of bothersome, but at least it
    works.
    You shouldn't have to do this. What operating system are you using?
    If you are using win2000, winNT or winxp, you should set the classpath in your system environment varialbes. You can also make a config.bat file and put everything in there. Then just run this config.bat file to set up your environment once for every session.
    Here's a file that I have set up on one of our NT machines. I just double click the icon for this file on my shortcut, and it gives me the window where I can compile my java programs.
    Hope this helps.
    Kamran
    =========== File SetJava.bat ============
    set PATH=%PATH%;m:\jdk1.3\bin
    set CLASSPATH=m:\jdk1.3\jre\lib;m:\jdk1.3\jaxp-1.1\jaxp.jar;m:\jdk1.3\jaxp-1.1\crimson.jar;m:\jdk1.3\jaxp-1.1\xalan.jar;.
    cd cis235
    %SystemRoot%\system32\cmd.exe

  • How to Run a simple program using JMS Queue.!!

    Hi All,
    I am trying to run simple program on JMS Queue.
    Using SOA Suite 10.1.3.2
    I created a connection factory and queue using EM.
    Connection Factory => Domain : Queue JNDI Location : jms/sidConnectionFactory
    Queue Name : SidQueue JNDI Location : jms/SidQueue
    Tried running a simple java class to send the messages to queue.[Pls find the file attached].
    Getting this error
    javax.naming.NamingException: META-INF/application-client.xml not found (see J2EE spec, application-client chapter for requirements and format of the file)
    at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getRequiredClasspathResource(ApplicationClientInitialContextFactory.java:239)
    at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getArchive(ApplicationClientInitialContextFactory.java:161)
    at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:111)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    Can some one tell me how i need to create this file and where to place this[i.e is this need to be placed in  my project or some directory structure of <SOA-HOME>
    Thx,
    Siddhardha.
    Code:
    package demo;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Properties;
    import javax.jms.*;
    import javax.naming.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class JMSQueue {
        public static void main(String args[])
    QueueConnection queueConnection;
    QueueSession queueSession;
    //private MessageProducer producer;
    QueueSender queueSender;
    try {          
    String message = "Test";
    String connectionFactoryName = "jms/sidConnectionFactory";
    String destinationName = "jms/SidQueue";
    /*Do i need to use this .......
    * If so where is the error in below statements...
    * Properties env = new Properties( );
    // ... specify the JNDI properties specific to the vendor
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.evermind.server.ApplicationClientInitialContextFactory");
    env.put(Context.PROVIDER_URL,
    "ormi://localhost:23791");
    Context ctx = new InitialContext();
    // Get the connection factory.
    QueueConnectionFactory cf = (QueueConnectionFactory)ctx.lookup(connectionFactoryName);
    // Get the destination.
    Queue destination = (Queue) ctx.lookup(destinationName);
    // Use the connection factory to create a connection.
    queueConnection = cf.createQueueConnection();
    // Start the connection.
    queueConnection.start();
    // Use the connection to create a session.
    queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    // Use the session and destination to create a message producer and a message consumer.
    //producer = queueSession.createProducer(destination);
    queueSender = queueSession.createSender(destination);
    TextMessage msg = queueSession.createTextMessage(message);
    queueSender.send(msg);
    queueSession.close();
    queueConnection.close();
    catch (Exception ex) {
    ex.printStackTrace();
    * Attached following libraries to the Project
    * jms.jar
    * optic.jar
    * oc4jclient.jar
    */

    Hi,
    You need to change the INITIAL_CONTEXT_FACTORY to com.evermind.server.RMIInitialContextFactory.
    Regards,
    Sandeep

  • PLEASE HELP:not able to load a simple servlet

    Hi,
    I'm new to weblogic server.I'm trying to setup weblogic 510.Everything was
    going fine until I got stuck to this small thing.I'm not able to load a
    simple servlet!.
    I would appreciate any pointers regarding this.Please Help me!!!
    Here is what I tried:
    I have installed weblogic510 plug-in for IIS.I could successfully run jsp
    files.However I am not able to load simple servlets;It gave an exception
    "java.lang.IllegalAccessError: try to access class
    weblogic/utils/classloaders/FileSource from class
    weblogic/servlet/internal/WarClassFinder"
    Details of my configuration:
    WebServer - IIS 4.0
    IIS port=80
    Weblogic port=7001
    I had set it in such a way that all the requests first go to IIS and then
    IIS redirects them to Weblogic.I've followed the steps according to the
    document "Installing the Weblogic ISAPI Plug-in".
    I've registered the servlet in weblogic.properties as following:
    weblogic.httpd.register.hello=examples.servlets.HelloWorld2
    I tested the servlet by URL http://localhost:7001/hello
    Following is the eact text for the exception I got in the WeblogicServer
    window:
    Mon Jul 24 12:13:13 PDT 2000:<E> <ServletContext-General> Error loading
    servlet:
    examples.servlets.HelloWorld2
    java.lang.IllegalAccessError: try to access class
    weblogic/utils/classloaders/Fi
    leSource from class weblogic/servlet/internal/WarClassFinder
    at
    weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.jav
    a, Compiled Code)
    at
    weblogic.servlet.internal.WarClassFinder.getClassSource(WarClassFinde
    r.java:110)
    at
    weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:381)
    at
    weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java, Compiled Code)
    at
    weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.
    loadClass(RecursiveReloadOnModifyClassLoader.java:234)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:146)
    at
    weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.findLo
    calClass(RecursiveReloadOnModifyClassLoader.java:109)
    at
    weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java, Compiled Code)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:172)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:146)
    at
    weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:291)
    at
    weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
    java:164)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:99)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:742)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:686)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
    ContextManager.java:247)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
    a:361)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Mon Jul 24 12:13:13 PDT 2000:<E> <ServletContext-General> Servlet failed
    with Ex
    ception
    I dont think there were any problems in the classpath or
    servletpath;Basically WeblogicServer was able to locate the servlet but when
    it tried to load the servlet it gave this exception.
    I would appreciate any ideas/suggestions.
    Thanks,
    Sravan

    Nice to hear it works!
    However, one mistake you have in the configuration you provided:
    You put D:\weblogic\BDL\servletclasses in both CLASSPATH and
    weblogic.class.path, remove it from CLASSPATH.
    Cheers - Wei
    Sravan Thella <[email protected]> wrote in message
    news:[email protected]...
    Hi Michael and Wei,
    Thank you very much for the response.
    My servlet details:
    Name - HelloWorld2.class
    package - examples.servlets
    Location - d:\weblogic\BDL\servletclasses ---- here BDL is my new folder
    where I want to keep my servlets
    My CLASSPATH(environment) settings:
    D:\weblogic\BDL\servletclasses;d:\weblogic\classes\boot;d:\weblogic\eval\clo
    >
    udscape\lib\cloudscape.jar;d:\weblogic\lib\poolorb.jar;D:\java\jre\lib\rt.ja
    r;
    my weblogic classpath settings(set it thru wlconfig)
    D:\weblogic\BDL\servletclasses;d:\weblogic\classes\boot;d:\weblogic\eval\clo
    >
    udscape\lib\cloudscape.jar;d:\weblogic\lib\poolorb.jar;D:\java\jre\lib\rt.ja
    r;
    My weblogic.policy:
    grant codeBase "file:d:/weblogic/-" {
    permission java.io.FilePermission "d:${/}weblogic${/}-",
    "read,write,delete,execute";
    permission java.net.SocketPermission "localhost:1-9000",
    "connect,accept,listen,resolve";
    permission java.awt.AWTPermission "accessClipboard";
    permission java.awt.AWTPermission "accessEventQueue";
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    permission java.io.SerializablePermission"enableSubclassImplementation";
    permission java.io.SerializablePermission "enableSubstitution";
    permission java.lang.RuntimePermission "accessClassInPackage.*";
    permission java.lang.RuntimePermission "accessDeclaredMembers.*";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "createSecurityManager";
    permission java.lang.RuntimePermission "defineClassInPackage.*";
    permission java.lang.RuntimePermission "exitVM";
    permission java.lang.RuntimePermission "getClassLoader";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "getProtectionDomain";
    permission java.lang.RuntimePermission "loadLibrary.*";
    permission java.lang.RuntimePermission "modifyThread";
    permission java.lang.RuntimePermission "modifyThreadGroup";
    permission java.lang.RuntimePermission "readFileDescriptor";
    permission java.lang.RuntimePermission "setContextClassLoader";
    permission java.lang.RuntimePermission "setFactory";
    permission java.lang.RuntimePermission "setIO";
    permission java.lang.RuntimePermission "setProtectionDomain";
    permission java.lang.RuntimePermission "setSecurityManager";
    permission java.lang.RuntimePermission "writeFileDescriptor";
    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
    permission java.net.NetPermission "requestPasswordAuthentication";
    permission java.net.NetPermission "setDefaultAuthenticator";
    permission java.security.SecurityPermission "getPolicy";
    permission java.security.SecurityPermission "setPolicy";
    permission java.util.PropertyPermission "*", "read,write";
    grant codeBase "file:d:/weblogic/BDL/servletclasses/-" {
    permission java.io.FilePermission
    "d:${/}weblogic${/}BDL{/}servletclasses{/}-", "read,write,delete,execute";
    permission java.net.SocketPermission "localhost:1-9000",
    "connect,accept,listen,resolve";
    permission java.awt.AWTPermission "accessClipboard";
    permission java.awt.AWTPermission "accessEventQueue";
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    permission java.io.SerializablePermission"enableSubclassImplementation";
    permission java.io.SerializablePermission "enableSubstitution";
    permission java.lang.RuntimePermission "accessClassInPackage.*";
    permission java.lang.RuntimePermission "accessDeclaredMembers.*";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "createSecurityManager";
    permission java.lang.RuntimePermission "defineClassInPackage.*";
    permission java.lang.RuntimePermission "exitVM";
    permission java.lang.RuntimePermission "getClassLoader";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "getProtectionDomain";
    permission java.lang.RuntimePermission "loadLibrary.*";
    permission java.lang.RuntimePermission "modifyThread";
    permission java.lang.RuntimePermission "modifyThreadGroup";
    permission java.lang.RuntimePermission "readFileDescriptor";
    permission java.lang.RuntimePermission "setContextClassLoader";
    permission java.lang.RuntimePermission "setFactory";
    permission java.lang.RuntimePermission "setIO";
    permission java.lang.RuntimePermission "setProtectionDomain";
    permission java.lang.RuntimePermission "setSecurityManager";
    permission java.lang.RuntimePermission "writeFileDescriptor";
    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
    permission java.net.NetPermission "requestPasswordAuthentication";
    permission java.net.NetPermission "setDefaultAuthenticator";
    permission java.security.SecurityPermission "getPolicy";
    permission java.security.SecurityPermission "setPolicy";
    permission java.util.PropertyPermission "*", "read,write";
    I dont know what is wrong here. In the weblogic.policy file,I tried
    differrent combinations but it never worked.
    I find weblogic documentation for troubleshooting to be pathetic.Notuseful
    at all.Documentation looks
    good to read ;not for practical purposes.I'm not sure whether others have
    similar opinion.
    I'm stuck at this thing for the past few days,I still have lot of work todo
    to purusue our management team to buy weblogic
    but I'm still stuck at this thing.
    Thank you very much for your time.
    Thanks,
    Sravan
    "Sravan Thella" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I'm new to weblogic server.I'm trying to setup weblogic 510.Everything
    was
    going fine until I got stuck to this small thing.I'm not able to load a
    simple servlet!.
    I would appreciate any pointers regarding this.Please Help me!!!
    Here is what I tried:
    I have installed weblogic510 plug-in for IIS.I could successfully runjsp
    files.However I am not able to load simple servlets;It gave an exception
    "java.lang.IllegalAccessError: try to access class
    weblogic/utils/classloaders/FileSource from class
    weblogic/servlet/internal/WarClassFinder"
    Details of my configuration:
    WebServer - IIS 4.0
    IIS port=80
    Weblogic port=7001
    I had set it in such a way that all the requests first go to IIS andthen
    IIS redirects them to Weblogic.I've followed the steps according to the
    document "Installing the Weblogic ISAPI Plug-in".
    I've registered the servlet in weblogic.properties as following:
    weblogic.httpd.register.hello=examples.servlets.HelloWorld2
    I tested the servlet by URL http://localhost:7001/hello
    Following is the eact text for the exception I got in the WeblogicServer
    window:
    Mon Jul 24 12:13:13 PDT 2000:<E> <ServletContext-General> Error loading
    servlet:
    examples.servlets.HelloWorld2
    java.lang.IllegalAccessError: try to access class
    weblogic/utils/classloaders/Fi
    leSource from class weblogic/servlet/internal/WarClassFinder
    at
    weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.jav
    a, Compiled Code)
    at
    weblogic.servlet.internal.WarClassFinder.getClassSource(WarClassFinde
    r.java:110)
    at
    weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:381)
    at
    weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java, Compiled Code)
    at
    weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.
    loadClass(RecursiveReloadOnModifyClassLoader.java:234)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:146)
    at
    weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.findLo
    calClass(RecursiveReloadOnModifyClassLoader.java:109)
    at
    weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java, Compiled Code)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:172)
    at
    weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:146)
    at
    weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:291)
    at
    weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
    java:164)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:99)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:742)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:686)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
    ContextManager.java:247)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
    a:361)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Mon Jul 24 12:13:13 PDT 2000:<E> <ServletContext-General> Servlet failed
    with Ex
    ception
    I dont think there were any problems in the classpath or
    servletpath;Basically WeblogicServer was able to locate the servlet butwhen
    it tried to load the servlet it gave this exception.
    I would appreciate any ideas/suggestions.
    Thanks,
    Sravan

  • Fail to run my first Servlet with Sun ONE Studio 4 Update 1 (+ bi Tomcat)

    Hello !
    I failed to run my first Servlet with Sun ONE Studio 4 update 1 ( with built in Tomcat)
    I think that I followed most of the online instructions,
    so I successfully run a JSP file,
    but I failed with my first servlet:
    The error message is:
    "Standard Wrapper[:MyServlet]: Marking servlet MyServlet as unavailable
    javax.servlet.ServletException: Wrapper cannot find servlet class com.hemmerling.myservlet.MyServlet
    or a class it depends on
    So please don�t ask me for the code of the servlett ( simply taken from a book),
    but tell me why the one-and-only servlett was not found. what might I have done wrong, if I did everything I did to run the JSP file, too ?
    Of couse I copied the file into the "Classes" directory of the Webmodule ( WEB-INF ) and "processed" it, so that I was able to execute it.
    Any suggestions ?
    Tia
    Sincerely
    Rolf

    Tough to say, but try:
    1. Put the servlet in a package. If you're using the default package (class file in WEB-INF/classes directory, then Tomcat may not find it.
    2. Check out web.xml to ensure the <servlet> and <servlet-mapping> entries are correct.
    3. Make the servlet as simple as possible so you're sure that it is the servlet itself that cannot be found and not some other class that it uses.
    Good Luck

  • Online tutorial,documentation to get simple servlet

    Hi,
    I am new to servlet.
    I have J2EE 1.4 SDK in my pc.
    I want to develop simple servlet,deploy and run.
    will you please give me some websites ,link of tutorial,documentation to write a simple servlet and deploy in j2EE 1.4?
    Thank you so much

    Hello David,
    The problem seems to be with,
    MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
    This does not get the MBeanServer that weblogic server uses. Try getting
    the MBeanServer from MBeanHome and register your MBean in this server.
    Check out
    http://e-docs.bea.com/wls/docs81/jmx/basics.html
    to lookup MBeanHome and getting the MBeanServer.
    Thanks,
    -satya
    David Karr wrote:
    Like other people reading this group, I'm trying to get started with JMX in WebLogic (8.1) despite the apparent lack of useful information.
    I'll eventually be writing an mbean which is intended to run on each managed server (registered by a servlet) which will read and write a particular file on each managed server (contention problems are unavoidable).
    In the beginning, however, I'm just trying to build a simple POC, with a servlet that creates and registers a simple mbean. That part was deceptively easy, but I'm not sure I did it right, as I'm not sure of the best way to look at the results of what I did.
    I found the "wlshell" tool, which is a jmx client for WebLogic. After my servlet registers the mbean, I tried reloading the wlshell display, but I don't see anything new. I'm sure I'm misunderstanding something (probably in the "ObjectName" constructor).
    The "init()" method of my servlet looks like this:
    public void init()
    MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
    Sample sample = new Sample();
    try
    ObjectName objectName = new ObjectName("Sample:name=sample");
    mbeanServer.registerMBean(sample, objectName);
    The Mbean and impl look like:
    public interface SampleMBean
    public void setFlag(boolean flag);
    public boolean getFlag();
    public class Sample implements SampleMBean
    private boolean flag;
    public void setFlag(boolean flag) { this.flag = flag; }
    public boolean getFlag() { return (flag); }

  • UnsupportedAudioFileException when applet runs served by servlet

    I have spent the better part of two days sorting through this. I developed an applet, using several examples found here and elsewhere, that will play, pause and stop playing an MP3 file. It is very simple and purposely designed that way. I use Eclipse as my development environment and when I run the applet directly from the IDE it runs fine. When I jar the files, sign the jar and deploy the applet through a servlet I get the following:
    javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input URL
         at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source)
         at org.myorg.applet.MP3JLayerApplet.playMP3(MP3JLayerApplet.java:158)
         at org.myorg.applet.MP3JLayerApplet$PlayerThread.run(MP3JLayerApplet.java:116)
    So I am assuming that there is something in the classpath missing that is causing the heartburn to the applet (running in FF5 in Windows 7). Where do I start unpacking the issue? I have the Java Control Panel Console in trace mode but it doesn't show which classes/jars are being accessed as the applet loads. Is there a way to see each class as it is loaded and where (like the -verbose switch) ?
    The segment of code that is running is as follows:
                   URL url = null;
                   if (classID!=null)
                        try
                             url = new URL(audioURL);          
                             System.out.println(url);     
                        catch (Exception ex)
                             System.err.println(ex);     
              try {
                   AudioInputStream in = AudioSystem.getAudioInputStream(url);
    The audioURL is a string with the following value:
    http://localhost:9080/BSFDocs/lectureFiles/717/lecture.mp3
    If the URL is used directly in the browser, the mp3 is downloaded and would play in Media player with no problems.
    Again, if the applet is run directly in from Eclipse using the Run as --> Java Applet option, it works perfectly. If run from the servlet it fails.
    Suggestions?
    Thanks

    FYI,
    I didn't have to download and install any plug-ins before to have this work. It would work with the Browser's VM but now doesn't seem to.

  • How to run and compile servlets using tomcat4.0.3

    Hello
    I have simple servlet "HelloWorld".I have doubts in compiling and running this servlet.I'm using server Tomcat 4.0.3 as and JDK1.3.
    1)where do i need to save this servlet?
    2)how to compile this servlet by setting a classpath?
    3)how do i run this after compilation?
    4)do i need any HTML page to run on browser?.if, so how do i have a reference of servlet in HTML page?
    HERE IS THE SIMPLE SERVLET
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<body>");
    out.println("<head>");
    out.println("<title>Hello World!</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Hello World!</h1>");
    out.println("</body>");
    out.println("</html>");
    Thanx for help

    put your helloworld servlet inside of webapps/example/WEB-INF/classes...
    and then start your tomcat..and type
    http://localhost:8080/webapps/servlet/HelloWorld
    S

  • Problem With Deploying a very simple Servlet

    HELP REQUIRED:
    Hi,
    I'm including code of a very simple Servlet application (I shd not call it an application):
    index.html
    ==========
    <html><body bgcolor="#FFFFFF">
         <head>
         <title> Rajeev Asthana </title>
    <form action = "/HelloWorldApp/HelloWorld" method = "POST" >
    Please press Submit
    <input type = "submit" value = "Press Me!">
    </form>
    </body></html>
    HelloWorld.java
    ===============
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
         public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
              throws ServletException, IOException {
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("<html><body bgcolor=\"#FFFFFF\">");
              out.println("<p>Hello World!</p>");
              out.println("</body></html>");
              out.close();
    web.xml
    ========
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>HelloWorldApp</display-name>
    <servlet>
    <display-name>HelloWorld</display-name>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
    </servlet>
    </web-app>
    sun-web.xml
    ===========
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd">
    <sun-web-app xmlns="http://java.sun.com/xml/ns/j2ee">
    <context-root>/HelloWorldApp</context-root>
    <session-config>
    <session-manager persistence-type="memory">
    <manager-properties/>
    <store-properties/>
    </session-manager>
    <session-properties/>
    <cookie-properties/>
    </session-config>
    <cache enabled="false" max-entries="4096" timeout-in-seconds="30">
    <default-helper/>
    </cache>
    <class-loader delegate="true"/>
    <jsp-config/>
    </sun-web-app>
    I have deployed it in following directory structure:
    C:\Sun\AppServer\domains\domain1\applications\j2ee-modules\HelloWorldApp\
    |
    |
    |               |               |               |
    |               |               |               |
    META-INF          WEB-INF          HelloWorld.java          index.html
                   |
                   |
              |          |          |          |
              |          |          |          |
         classes          sun-web.xml     web.xml          sun-j2ee-ri-project
         |
         |
         HelloWorld.class
    While generating HelloWorldApp.war (which is the war file for this app), I specifies /HelloWorldApp as context root (sun specific).
    Now, when I deployed it thru Admin Tool and then clicked on "Launch", it displays a page with :
    Please press Submit Press Me!
    But when I click the button "Press Me!", it says:
    "The requested resource (/HelloWorldApp/HelloWorld) is not available."
    What should I do to correct the problem?
    Thanks in advance.
         

    Yes, you need to add a servlet -mapping element and adjust your form to submit to the appropriate URL mapping.
    <servlet-mapping>
    <servlet-name>HelloWorldServlet</servlet-name>
    <url-pattern>/servlet/Hello</url-pattern>
    </servlet-mapping>

  • Weblogic error while deplying a simple servlet program

    Hi This is a very simple servlet program.
    I am trying to deploy it on the weblogic server but i get this error as follow
    Unable to access the selected application.
    *javax.enterprise.deploy.spi.exceptions.InvalidModuleException: [J2EE Deployment SPI:260105]Failed to create*
    DDBeanRoot for application, 'E:\AqanTech\WebApp1\myApp.war'.
    I have checked everything, right from my code to my web.xml file. I have used a build.bat file to build my war file.
    PLEASE HELP ME TO SOLVE THIS HUGE PROBLEM OF MINE ?
    Thanks,
    Shoeb

    Hi,
    The J2EE Error code siply suggest that there is something wrong in your Deployment Descriptors...
    Can u please post the XML files available inside your "WEB-INF" directory?
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

Maybe you are looking for

  • Release sales order credit block using VA02

    Dear experts, By any chance can we release the sales order from credit block using VA02 instead of VKM3? I could see an example wherein the change log shows that the Overall Credit Status has been changed to Approved using VA02. Could you please assi

  • -200 error message when trying to install itunes 7

    Whenever I agree to the user agreement, I get this message -200 The itunes application can not be opened. Unknown error occured. Any ideas?

  • Probloms with my zen nano shutting off randomly-please hel

    I just bought a GB Zen Nano Plus about a week ago. It worked fine until I had to change the battery. Now every time I play the mp3 music it automatically shuts down. I messed around with it and I figured out that every time the backlght shuts off, so

  • Desk jet 2540 not printing from iPad

    Hi , I've just bought a Desk jet 2540. It was printing from my iPad with no problems this morning but now does not. The iPad can see the printer and the printer is displaying a solid blue light on the wireless button. After printing a test page I can

  • Storing configuration in JSF - what is the best practice

    Hello, I would like to know how I should store my webapp configuration. At the time being I have the settings in a .properties file. The problem is that it is compiled in the war file. Thus, I do not know how I could edit the file via my application.