Servlet to servlet help

I've searched the archive and read through tons of older posts but I'm still struggling. I think what I'm trying to do is fairly easy, but I'm having trouble setting it up correctly.
There's an existing servlet that could be called from a link like this:
href="https://servername/servlet/LoginServlet?LoginName=xyzname&password=xyzpassword
I would like to call this servlet from my servlet(on the same server) and I need to grab the response from the servlet I call. Assuming I get the calling part fixed, how do I see what the response is?
Can anyone help me set this up? Right now I get errors on the request line when I try to compile it. Here's what I'm trying so far, I assume I'm not setting it up correctly:
import javax.servlet.*;
import javax.servlet.http.*;
public class StoneURLLoginS2S extends HttpServlet {
     public void doGet (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException
          String username = request.getParameter("username");
          String password = request.getParameter("password");
          request.getRequestDispatcher("/servlet/LoginServlet?loginName=" + username + "&password=" + password).forward(request,response);
}All help is greatly appreciated.
James

I know I've jumped all over the place on this post, and I'm about to do it again. Sorry.
I have the following code:
mport java.util.*;
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.stoneware.servlets.*;
import com.stoneware.beans.*;
public class StoneURLLogin extends StonewareServlet {
     private StonewareBean swBean = new StonewareBean();
     public void init( ServletConfig config ) throws ServletException {
          super.init( config );
     public void service( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
          String username = request.getParameter("username");
          String password = request.getParameter("password");
          //String link = request.getParameter("link");
          //String key = request.getParameter("key");
          String sessionID = swBean.authenticateUserNoContext(username, password);
          if( swBean.isAuthenticated( sessionID ) == false ) {
               System.out.println( "User not authenticated." );
               return;
          if( swBean.isAccountDisabled( sessionID ) == true ) {
               System.out.println( "User account is disabled." );
               return;
          System.out.println( "The user is authenticated." );
     public String getServletInfo() {
          return "Simple authentication servlet.";
}I get the following error when I compile.
C:\Temp\Java>javac StoneURLLogin.java
StoneURLLogin.java:34: isAccountDisabled(javax.servlet.http.HttpServletRequest) in com.stoneware.beans.StonewareBean cannot be applied to (java.lang.String)
if( swBean.isAccountDisabled( sessionID ) == true ) {
^
1 error
If I comment out that section I then get the following error:
C:\Temp\Java>javac StoneURLLogin.java
StoneURLLogin.java:14: unreported exception com.stoneware.StonewareException; must be caught or declared to be thrown
private StonewareBean swBean = new StonewareBean();
^
1 error
Obviously you don't have the docs for these classes, but it seems like something different than that. Like I'm missing something more fundamental here. Can anyone see it? Is there something wrong with how I declared swBean?
Thanks,
James

Similar Messages

  • Simple Servlet question, pls help

    This is my form submission part in my jsp page
    <form name="updateForm" method="POST" action="/Update"> This is my web.xml
    <?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>/Update</servlet-name>
        <servlet-class>UpdateMap</servlet-class>
      </servlet>
    </web-app>This is my UpdateMap.java
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    public class UpdateMap extends HttpServlet
        public UpdateMap()
    }I put my UpdateMap.class in WEB-INF/classes/ directory but when I clicked the submit button in my jsp page, I got The requested resource (/Update) is not available error

    Found my own error. The jsp submission code should be
    <form name="updateForm" method="POST" action="Update"> But I still got error when submit
    The specified HTTP method is not allowed for the requested resource ( POST method of HTTP is not supported by this URL.)Pls help.
    Thanks

  • Basic servlet problem plz help me

    HI all,
    I have installed apache tomcat 5.5 server and set the class path to servlet-api.jar. in environment variable in Edit user variables ----->
    .;C:\Program Files\Java\jdk1.5.0_01\jre\lib\rt.jar;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar
    and i have created a helloworld program :-" FirstSer.java"
    import javax.servlet.;*
    import java.io.*;*
    public class FirstSer extends GenericServlet+
    +*{*+
    *     public void service(ServletRequest req, ServletResponse res) throws ServletException,IOException*
    +*     {*+
    PrintWriter pw=res.getWriter();+
    *      res.setContentType("text/html");*
    *      pw.println("<html><body bgcolor=red>");*
    pw.println("<font size=6 color=white >");+
    *      pw.println("hello good morning");*
    *      pw.println("</font></body></html>");*
    and i've throwed the DOTCLASS in classes folder
    and the WEB.XML in WEB-INF folder
    +<servlet>+
    +*<servlet-name>FirstSer</servlet-name>*+
    +*<servlet-class>FirstSer.class</servlet-class>*+
    +*</servlet>*+
    +*<servlet-mapping>*+
    +*<servlet-name>FirstSer</servlet-name>*+
    +*<url-pattern>bunny/FirstSer</url-pattern>*+
    +*</servlet-mapping>*+
    every thing i have done is that correct .. ?????
    BUT still m unable to deploy the servlet prog . Browser is posting 404 error
    http://localhost:8080/contextroot/FirstSer
    // PLEASE HELP //
    and please explain the procedure and architecture of tomcat context root (its a humble request).
    THANKS IN ADVANCE .

    bunny_aug15 wrote:
    BUT still m unable to deploy the servlet prog . Browser is posting 404 error 404 simply means "Page not found". With other words, the URL used is wrong.
    Let's take a look to your servlet mapping:
    <url-pattern>bunny/FirstSer</url-pattern>So your servlet will only be invoked if your URL matches "bunny/FirstSer".
    Let's take a look how you composed the URL:
    http://localhost:8080/contextroot/FirstSerThat indeed doesn't match. Therefore the 404.
    Solution? Obviously change the url-pattern or invoke it the right way.

  • Exception thrown by servlet Faces Servlet in WAS ND 6.1.0.13

    Hi,<br>
    I'm using WebSphere Application Server Network Deployment (WAS ND) v. 6.1.0.13.<br><br>
    I'm getting this error when I try to launch my application:<br><br>
    [1/24/08 11:41:44:100 WET] 0000003c ServletWrappe E SRVE0100E: Did not realize init() exception thrown by servlet Faces Servlet: java.lang.NullPointerException<br>
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)<br>
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:190)<br>
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:317)<br>
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:346)<br>
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)<br>
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)<br>
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)<br>
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)<br>
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)<br>
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)<br>
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)<br>
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)<br>
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)<br>
    at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)<br>
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:556)<br>
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:606)<br>
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:979)<br>
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1064)<br>
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)<br>
    <br><br><br>
    After doing a search I tried this following steps:<br>
    � Delete the entry in web.xml:<br>
    <listener><br>
    <listener-class><br>
    com.sun.faces.config.ConfigureListener<br>
    </listener-class><br>
    </listener><br><br>
    � Update my log4j version<br><br>
    � Delete the commons-logging.jar from WEB-INF directory<br>
    These are the jar files included in WEB-INF directory:<br>
    commons-beanutils.jar<br>
    commons-collections.jar<br>
    commons-digester.jar<br>
    commons-javaflow-20060411.jar<br>
    commons-logging.jar<br>
    FglConnectorClient.jar<br>
    itext-1.4.2.jar<br>
    jasperreports-1.2.3.jar<br>
    jcommon-1.0.0.jar<br>
    jfreechart-1.0.1.jar<br>
    jsf-api.jar<br>
    jsf-ibm.jar<br>
    jsf-impl.jar<br>
    jstl.jar<br>
    log4j-1.2.14.jar<br>
    standard.jar<br>
    struts.jar<br>
    <br><br>
    <br>
    None of the suggestions worked.<br><br>
    Then I tried to deploy my application in another WAS ND 6.1.0.13 and it worked!!! <br>
    What can I do so solve this problem in my WAS ND 6.1.0.13? What could be the problem?<br><br>
    Thanks,<br>
    Nuno

    Did you find a solution to this problem
    please help
    Thanks & Regards
    Nasir

  • Cannot process an HTTP request to servlet [Faces Servlet] in [wcb] web application

    Hi All
    l am working on a Wcem 3.0 with Trex with ERP and WAS 7.3.
    When I logon to http://<host>:<port>/wcb/index.html url I am able to see wcbuilder_erp & wcbuilder_erp_ume application ids.
    But suddenly I am getting The website cannot display the page error message when I access the above mentioned URL.
    When I verify the developer log trace it showing as 500 Internal sever error issue.[EXCEPTION] java.lang.VerifyError: Bad return type
    In defaultTrace.trc file it is showing as Cannot process an HTTP request to servlet [Faces Servlet] in [wcb] web application exception.
    09 10 18:08:56:098#+0530#Error#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#
    com.sap.ASJ.web.000137#WEC-APP-BF#sap.com/wec~comm~wcb~leanapp#C0000A229CA7094A0000000000001188#2392750000000004#sap.com/wec~comm~wcb~leanapp#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#Guest#0##CFAFBF4C38E411E4B4750000002482AE#ffbcbcdd38e611e49d020000002482ae#ffbcbcdd38e611e49d020000002482ae#0#Thread[HTTP Worker [@455349581],5,Dedicated_Application_Thread]#Plain##
    Cannot process an HTTP request to servlet [Faces Servlet] in [wcb] web application.
    [EXCEPTION] java.lang.VerifyError: Bad return type
    Exception Details:
    Location: com/sap/wec/tc/core/runtime/jsf/resource/WecExternalContextFactory.getExternalContext(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljavax/faces/context/ExternalContext; @17: areturn
    Reason: Type 'com/sap/wec/tc/core/runtime/jsf/resource/WecExternalContext' (current frame, stack[0]) is not assignable to 'javax/faces/context/ExternalContext' (from method signature)
    Current Frame:
        locals: { 'com/sap/wec/tc/core/runtime/jsf/resource/WecExternalContextFactory', 'java/lang/Object', 'java/lang/Object', 'java/lang/Object' }
        stack: { 'com/sap/wec/tc/core/runtime/jsf/resource/WecExternalContext' }
      Bytecode:
        0000000: bb00 0359 2ab6 0004 2b2c 2db6 0005 b700
        0000010: 06b0                                
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2446)
        at java.lang.Class.getConstructor0(Class.java:2756)
        at java.lang.Class.getConstructor(Class.java:1693)
    Any help?
    Regards
    Rami Reddy

    Hi Steffen,
    Thanks for promt response.
    But when I checked with Basis team as of now there are not yet configured TREX, only WCEM components has been configured in WAS 7.3. When they are configuring WCEM components HTTPS protocol not configured.
    But for past 2 weeks I am able to see the below screen using http://<host>:<port>/wcb/index.html url.
    But now I am getting The website cannot display the page error.
    Please clarify me if anything is wrong from my side. And also pl let us know which configurations I have to check for fixing the issue.
    Regards,
    Rami Reddy

  • Servlet Faces Servlet is currently unavailable

    Hi,
    I get the following error when deploying my webapp to Tomcat 4.0:
    [Thu Dec 18 12:03:16 EST 2003] stdout: StandardWrapper[DeployApp:Faces Servlet]: Marking servlet Faces Servlet as unavailable
    [Thu Dec 18 12:03:16 EST 2003] stdout: StandardContext[DeployApp]: Servlet /BULDeployApp threw load() exception: javax.servlet.ServletException: Wrapper cannot find servlet class javax.faces.webapp.FacesServlet or a class it depends on
    [Thu Dec 18 12:03:16 EST 2003] stdout: javax.servlet.ServletException: Wrapper cannot find servlet class javax.faces.webapp.FacesServlet or a class it depends on
    The jsf-ri.jar is copied in $tomcat_home/common/lib (to solve the ConfigListener error) and following libraries are a part of web-inf/lib:
    commons-beanutils.jar, commons-collections.jar, commons-digester.jar, commons-logging.jar, jsf-api.jar, jstl.jar, standard.jar.
    Please help.

    The jsf-ri.jar is copied in $tomcat_home/common/lib
    (to solve the ConfigListener error) and following
    libraries are a part of web-inf/lib:
    commons-beanutils.jar, commons-collections.jar,
    commons-digester.jar, commons-logging.jar,
    jsf-api.jar, jstl.jar, standard.jar.
    If you copy jsf-ri.jar into common/lib, you should copy all of the others as well (and remove them from your web application). However, you should also know that if you are really using Tomcat 4.0.x there are several class loader problems that will make it virtually impossible for this to run correctly. I would strongly recommend updating to Tomcat 5.0.16 (recently released stable implementation of Servlet 2.4 and JSP 2.0).
    It's also possible to get the beta release of JSF to work on Tomcat 4.1.29 (see the release notes for details) but you will need to be sure you're using JSTL 1.0 instead of 1.1.
    >
    Please help.Craig

  • Javax.servlet.ServletException: Servlet execution threw an

    Hi All,
    First time posting, I'm hoping I'm in the right section. The above overflow appears to be caused by something having to do with certs or security. The basic app (its an online file storage, web accessible) continues to function after this, but uploads break and are unusable. We use tomcat/Apache, and our Apache ssl certs are valid. Below is the stack trace (at least a portion), I've done a few google searches, but I'm boondoggled. Any advice would really be appreciated - Chris
    root cause
    java.lang.StackOverflowError
    java.lang.ClassLoader.findBootstrapClass(Native
    Method)
    java.lang.ClassLoader.findBootstrapClass0
    (ClassLoader.java:723)
    java.lang.ClassLoader.loadClass(ClassLoader.java:294)
    java.lang.ClassLoader.loadClass(ClassLoader.java:292)
    sun.misc.Launcher$AppClassLoader.loadClass
    (Launcher.java:265)
    java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    org.apache.catalina.loader.WebappClassLoader.loadClas
    s(WebappClassLoader.java:1255)
    org.apache.catalina.loader.WebappClassLoader.loadClas
    s(WebappClassLoader.java:1189)
    java.security.Security.doGetImpl(Security.java:1122)
    java.security.Security.doGetImpl(Security.java:1083)
    java.security.Security.getImpl(Security.java:1044)
    java.security.KeyFactory.getInstance
    (KeyFactory.java:108)
    sun.security.x509.X509Key.buildX509Key
    (X509Key.java:200)
    sun.security.x509.X509Key.parse(X509Key.java:150)
    sun.security.x509.CertificateX509Key.<init>
    (CertificateX509Key.java:58)
    sun.security.x509.X509CertInfo.parse
    (X509CertInfo.java:692)
    sun.security.x509.X509CertInfo.<init>
    (X509CertInfo.java:155)
    sun.security.x509.X509CertImpl.parse
    (X509CertImpl.java:1630)
    sun.security.x509.X509CertImpl.<init>
    (X509CertImpl.java:286)
    sun.security.provider.X509Factory.engineGenerateCerti
    ficate(X509Factory.java:94)
    java.security.cert.CertificateFactory.generateCertifi
    cate(CertificateFactory.java:389)
    sun.security.pkcs.PKCS7.parseSignedData
    (PKCS7.java:267)
    sun.security.pkcs.PKCS7.parse(PKCS7.java:141)
    sun.security.pkcs.PKCS7.parse(PKCS7.java:110)
    sun.security.pkcs.PKCS7.<init>(PKCS7.java:92)
    sun.security.util.SignatureFileVerifier.<init>
    (SignatureFileVerifier.java:64)
    java.util.jar.JarVerifier.processEntry
    (JarVerifier.java:261)
    java.util.jar.JarVerifier.update
    (JarVerifier.java:194)
    java.util.jar.JarFile.initializeVerifier
    (JarFile.java:251)
    java.util.jar.JarFile.getInputStream
    (JarFile.java:313)
    org.apache.catalina.loader.WebappClassLoader.findReso
    urceInternal(WebappClassLoader.java:1791)
    org.apache.catalina.loader.WebappClassLoader.findClas
    sInternal(WebappClassLoader.java:1575)
    org.apache.catalina.loader.WebappClassLoader.findClas
    s(WebappClassLoader.java:860)
    org.apache.catalina.loader.WebappClassLoader.loadClas
    s(WebappClassLoader.java:1307)
    org.apache.catalina.loader.WebappClassLoader.loadClas
    s(WebappClassLoader.java:1189)
    java.security.Security.doGetImpl(Security.java:1122)
    java.security.Security.doGetImpl(Security.java:1083)
    java.security.Security.getImpl(Security.java:1044)
    java.security.KeyFactory.getInstance
    (KeyFactory.java:108)
    sun.security.x509.X509Key.buildX509Key
    (X509Key.java:200)
    sun.security.x509.X509Key.parse(X509Key.java:150)
    sun.security.x509.CertificateX509Key.<init>
    (CertificateX509Key.java:58)
    sun.security.x509.X509CertInfo.parse
    (X509CertInfo.java:692)
    sun.security.x509.X509CertInfo.<init>
    (X509CertInfo.java:155)
    sun.security.x509.X509CertImpl.parse
    (X509CertImpl.java:1630)
    sun.security.x509.X509CertImpl.<init>
    (X509CertImpl.java:286)
    sun.security.provider.X509Factory.engineGenerateCerti
    ficate(X509Factory.java:94)
    java.security.cert.CertificateFactory.generateCertifi
    cate(CertificateFactory.java:389)
    sun.security.pkcs.PKCS7.parseSignedData
    (PKCS7.java:267)
    sun.security.pkcs.PKCS7.parse(PKCS7.java:141)
    sun.security.pkcs.PKCS7.parse(PKCS7.java:110)
    sun.security.pkcs.PKCS7.<init>(PKCS7.java:92)
    sun.security.util.SignatureFileVerifier.<init>
    (SignatureFileVerifier.java:64)
    java.util.jar.JarVerifier.processEntry
    (JarVerifier.java:261)
    java.util.jar.JarVerifier.update
    (JarVerifier.java:194)
    java.util.jar.JarFile.initializeVerifier
    (JarFile.java:251)
    java.util.jar.JarFile.getInputStream
    (JarFile.java:313)
    org.apache.catalina.loader.WebappClassLoader.findReso
    urceInternal(WebappClassLoader.java:1791)
    org.apache.catalina.loader.WebappClassLoader.findClas
    sInternal(WebappClassLoader.java:1575)
    org.apache.catalina.loader.WebappClassLoader.findClas
    s(WebappClassLoader.java:860)
    org.apache.catalina.loader.WebappClassLoader.loadClas
    s(WebappClassLoader.java:1307)
    org.apache.catalina.loader.WebappClassLoader.loadClas
    s(WebappClassLoader.java:1189)
    java.security.Security.doGetImpl(Security.java:1122)
    java.security.Security.doGetImpl(Security.java:1083)
    java.security.Security.getImpl(Security.java:1044)
    java.security.KeyFactory.getInstance
    (KeyFactory.java:108)
    sun.security.x509.X509Key.buildX50
    --- message truncated ---

    Dear All,
    I am facing the same kind of problem.
    Here are the exception details
    StandardWrapperValve[TAPSendMsg]: Servlet.service() for servlet TAPSendMsg threw exception
    javax.servlet.ServletException: Servlet execution threw an exception
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:534)
    ----- Root Cause -----
    java.lang.OutOfMemoryError
    Please help me to solve the same.
    Thanks in advance
    Cham

  • Servlet to servlet communication in the same server

    Hi everybody!
    I have two .wars in the same JBoss + Tomcat web server. Both .war have their own login system throught j_security_check. I'm using Struts for development and Win 2003 for OS.
    I want to login into .war 1 and "use" Action class of .war 2. Is there any way I can do this? I found piece of code to put response and request to other servlet (from servlet 1) with RequestDispatcher, but how can i catch this new response and request in .war 2 (servlet 2)? And how to fix login in servlet 2?
    Piece of code that i found:
    ServletContext context = session.getServletContext();
    RequestDispatcher rd = context.getRequestDispatcher("/ServletName/Action.do");
    rd.include(request, response);          Tnx,
    Stanislav

    Not realy...
    The way I do it is that I put the data I need in webapp2/Servlet2 in the session >in the webapp1/Servlet1 and then redirects. The session should be managed >over the different web-applications.
    Have to check the documentation if you need to set something to have >cross-application session...How can you share session between two different .war files (i presume different context and diferent session)? In mine situation i have two different realm, also...

  • The servlet weblogic.servlet.AsyncInitServlet init method failed

    I installed WLS 9.2.2 recently with my app being on 8.1.5 for a long time.
    I chose to create a new domain instead of upgrading my existing one.
    I use the eclipse 3.2.2 with the WL plugin.
    When I start the server and login to the console not using eclipse it works fine.
    Trying to start the server and login to the console gives a internal server error.
    Any idea what could be wrong? I bolded the parts where I have looked into.
    Here is the console output:
    <Nov 19, 2008 3:13:02 PM CST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    C:\bea92\weblogic92\platform\lib\p13n\p13n-schemas.jar;C:\bea92\weblogic92\platform\lib\p13n\p13n_common.jar;*C:\bea92\weblogic92\platform\lib\p13n\p13n_system.jar*;C:\bea92\weblogic92\platform\lib\wlp\netuix_common.jar;C:\bea92\weblogic92\platform\lib\wlp\netuix_schemas.jar;C:\bea92\weblogic92\platform\lib\wlp\netuix_system.jar;C:\bea92\weblogic92\platform\lib\wlp\wsrp-common.jar>
    <Nov 19, 2008 3:13:03 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.5.0_10-b03 from Sun Microsystems Inc.>
    <Nov 19, 2008 3:13:05 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 MP2 Mon Jun 25 01:32:01 EDT 2007 952826 >
    <Nov 19, 2008 3:13:10 PM CST> <Info> <WebLogicServer> <BEA-000215> <Loaded License : C:\bea92\license.bea>
    <Nov 19, 2008 3:13:10 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Nov 19, 2008 3:13:10 PM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Nov 19, 2008 3:13:11 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file C:\bea92\user_projects\domains\domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
    <Nov 19, 2008 3:13:15 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Nov 19, 2008 3:13:22 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Nov 19, 2008 3:13:22 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Nov 19, 2008 3:13:30 PM CST> <Error> <HTTP> <BEA-101359> <The servlet weblogic.servlet.AsyncInitServlet init method failed while it was run in the background. The exception was: java.lang.NoClassDefFoundError: com/bea/p13n/management/ApplicationFilePoller$Handler.
    java.lang.NoClassDefFoundError: com/bea/p13n/management/ApplicationFilePoller$Handler
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         Truncated. see log file for complete stacktrace
    >
    <Nov 19, 2008 3:13:37 PM CST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.>
    <Nov 19, 2008 3:13:37 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <Nov 19, 2008 3:13:37 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <Nov 19, 2008 3:13:39 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 127.0.0.1:7005 for protocols iiop, t3, ldap, http.>
    <Nov 19, 2008 3:13:39 PM CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "domain" running in Development Mode>
    <Nov 19, 2008 3:13:40 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Nov 19, 2008 3:13:40 PM CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    <Nov 19, 2008 3:22:04 PM CST> <Error> <HTTP> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@d6c6a0 - appName: 'consoleapp', name: 'console', context-path: '/console'] Servlet failed with Exception
    java.lang.NullPointerException
         at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:124)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         Truncated. see log file for complete stacktrace
    Edited by: user5384782 on Nov 19, 2008 1:42 PM
    Edited by: user5384782 on Nov 19, 2008 3:59 PM

    Thanks for your replies adrian and david.
    The only thing I see different is that eclipse has different arguments when calling the jvm at the top.
    startWebLogic.cmd:
    C:\bea92\JDK150~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000
    -XX:PermSize=48m -XX:MaxPermSize=128m -Xverify:none -da -Dplatform.home=C:\b
    ea92\WEBLOG~1 -Dwls.home=C:\bea92\WEBLOG~1\server -Dwli.home=C:\bea92\WEBLOG~1\i
    ntegration -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testC
    onsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\bea92\patch_weblogic922
    \profiles\default\sysext_manifest_classpath -Dweblogic.Name=AdminServer -Djava.s
    ecurity.policy=C:\bea92\WEBLOG~1\server\lib\weblogic.policy weblogic.Server
    eclipse:
    -hotspot -Xms32m -Xmx200m -Dweblogic.ProductionModeEnabled=
    Eclipse may be calling the cmd I dont know.
    I will try upgrading my eclipse like adrian said, but in the meantime I appreciate any further advice/tips.

  • Javax.servlet.ServletException: Servlet execution threw an exception

    Hi guys...
    I got an error message after I click a button on my page. Before my action class called, servlet throw an exception.
    this is the error message from my eclipse console.
    15:31:31,062 INFO  [STDOUT] javax.servlet.ServletException: Servlet execution threw an exception
    15:31:31,062 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
    15:31:31,062 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:31:31,156 INFO  [STDOUT]      at roll.mov.j2ee.common.filters.AuthenticationFilter.doFilter(AuthenticationFilter.java:167)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:31:31,156 INFO  [STDOUT]      at roll.mov.j2ee.common.filters.PersistFilter.doFilter(PersistenceFilter.java:160)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:31:31,156 INFO  [STDOUT]      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    15:31:31,156 INFO  [STDOUT]      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
    15:31:31,156 INFO  [STDOUT]      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
    15:31:31,156 INFO  [STDOUT]      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
    15:31:31,156 INFO  [STDOUT]      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    15:31:31,156 INFO  [STDOUT]      at java.lang.Thread.run(Thread.java:595)
    15:31:31,156 ERROR [PersistFilter] Exception object caught by servlet persist filter.
    15:31:31,171 ERROR [[action]] Servlet.service() for servlet action threw exception
    roll.mov.j2ee.common.exceptions.RollMovException: Error caught
    begin nested exception:
    javax.servlet.ServletException: Servlet execution threw an exception
    end nested exception:
    javax.servlet.ServletException: Servlet execution threw an exception
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at roll.mov.j2ee.common.filters.AuthenticationFilter.doFilter(AuthenticationFilter.java:167)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at roll.mov.j2ee.common.filters.PersistenceFilter.doFilter(PersistenceFilter.java:160)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
         at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
         at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Note:
    - roll.mov.j2ee.common.exceptions.RollMovException is my custom exception.
    - roll.mov.j2ee.common.filters.AuthenticationFilter, implement javax.servlet.Filter
    - roll.mov.j2ee.common.filters.PersistFilter, implement javax.servlet.Filter
    this persistFilter work as proxy hibernate filterFrom my experience, Normally the root cause will be display in the exception. but this error message doesn't provide any information about what's wrong with my code.
    Anyone have an idea?
    Thanks in advamce
    pdt

    Thanks for replying gimbal2.
    in that line, " AuthenticationFilter.java:167" i called the
    filterChain.doFilter(request, response);where filterChain is object of javax.servlet.FilterChain
    I run my jboss with debug mode and i got abit more information about the error.
    the error message:
    2006-07-20 12:56:48,437 WARN  [org.apache.struts.action.RequestProcessor] Unhandled Exception thrown: class java.lang.NullPointerException
    2006-07-20 12:56:48,437 INFO  [STDOUT] ServletException thrown
    2006-07-20 12:56:48,437 INFO  [STDOUT] javax.servlet.ServletException
    2006-07-20 12:56:48,437 INFO  [STDOUT]      at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
    2006-07-20 12:56:48,437 INFO  [STDOUT]      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
    2006-07-20 12:56:48,437 INFO  [STDOUT]      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    2006-07-20 12:56:48,437 INFO  [STDOUT]      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
    2006-07-20 12:56:48,437 INFO  [STDOUT]      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    2006-07-20 12:56:48,437 INFO  [STDOUT]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    2006-07-20 12:56:48,437 INFO  [STDOUT]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    15:31:31,062 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
    15:31:31,062 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:31:31,156 INFO  [STDOUT]      at roll.mov.j2ee.common.filters.AuthenticationFilter.doFilter(AuthenticationFilter.java:167)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:31:31,156 INFO  [STDOUT]      at roll.mov.j2ee.common.filters.PersistFilter.doFilter(PersistenceFilter.java:160)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:31:31,156 INFO  [STDOUT]      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    15:31:31,156 INFO  [STDOUT]      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
    15:31:31,156 INFO  [STDOUT]      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
    15:31:31,156 INFO  [STDOUT]      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    15:31:31,156 INFO  [STDOUT]      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
    15:31:31,156 INFO  [STDOUT]      at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
    15:31:31,156 INFO  [STDOUT]      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    15:31:31,156 INFO  [STDOUT]      at java.lang.Thread.run(Thread.java:595)
    15:31:31,156 ERROR [PersistFilter] Exception object caught by servlet persist filter.
    15:31:31,171 ERROR [[action]] Servlet.service() for servlet action threw exception
    roll.mov.j2ee.common.exceptions.RollMovException: Error caught
    begin nested exception:
    javax.servlet.ServletException: Servlet execution threw an exception
    end nested exception:
    javax.servlet.ServletException: Servlet execution threw an exception
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at roll.mov.j2ee.common.filters.AuthenticationFilter.doFilter(AuthenticationFilter.java:167)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at roll.mov.j2ee.common.filters.PersistenceFilter.doFilter(PersistenceFilter.java:160)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
         at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
         at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)I check in docjar.com, seems like the the line in requestprocessor.java that thrown this exception is
    return (handler.execute(exception, config, mapping, form, request, response));     where handler is org.apache.struts.action.ExceptionHandler
    any idea guys..
    Thanks in advance
    pdt

  • Error loading servlet: weblogic.servlet.FileServlet with v. 4.0.3

    Servlets have been working for months. Suddenly, I'm getting
              this error (see below) as soon as I try to hit a servlet.
              The startup process looks normal. I've re-installed WL v 4.0.3
              several time, gotten the license in place, so on and so forth,
              but cannot get around this problem. "weblogic.properties" file
              still reads:
              weblogic.httpd.register.file=weblogic.servlet.FileServlet
              All my servlets and EJBs have been registered, and db connection and
              pool made, as usual. As I said above, everything looks normal until
              I try to hit a servlet.
              [... startup output tidied up a bit ...]
              Thu Jan 27 14:46:05 MST 2000:<I> <ListenThread> Listening on port: 80
              Thu Jan 27 14:46:06 MST 2000:<I> <SSLListenThread> Listening on port: 7002
              Thu Jan 27 14:47:32 MST 2000:<E> <ServletContext-Servlets> Error loading servlet: weblogic.servlet.FileServlet
              Thu Jan 27 14:47:32 MST 2000:<E> <ServletContext-Servlets> java.lang.IncompatibleClassChangeError: class
              weblogic.utils.classloaders.ClasspathClassFinder does not implement interface weblogic.utils.classloaders.ClassFinder
              at weblogic.utils.classloaders.GenericClassloader.findLocalClass(GenericClassloader.java:196)
              at weblogic.utils.classloaders.GenericClassloader.reallyLoadClass(Compiled Code)
              at weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.loadClass(RecursiveReloadOnModifyClassLoader.java:221
              at weblogic.utils.classloaders.GenericClassloader.loadClass(GenericClassloader.java:66)
              at weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.findLocalClass(RecursiveReloadOnModifyClassLoader.java:96)
              at weblogic.utils.classloaders.GenericClassloader.reallyLoadClass(Compiled Code)
              at weblogic.utils.classloaders.GenericClassloader.loadClass(GenericClassloader.java:82)
              at weblogic.utils.classloaders.GenericClassloader.loadClass(GenericClassloader.java:66)
              at weblogic.servlet.internal.ServletContextImpl.loadClass(ServletContextImpl.java:440)
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:121)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:85)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:67)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:203)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:505)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
              Thu Jan 27 14:47:32 MST 2000:<E> <ServletContext-Servlets> Servlet failed with ServletException ...
              ... and so on with multiple cascading failures.
              Does anyone have any idea as to what could cause this?
              Thanks.
              Paul Furbacher
              [email protected]
              

    Did you register your servlets after reinstalling. FileServlet is only for handling html pages. It has no role in loading servlets.
              "Paul Furbacher [TeamB]" wrote:
              > Servlets have been working for months. Suddenly, I'm getting
              > this error (see below) as soon as I try to hit a servlet.
              > The startup process looks normal. I've re-installed WL v 4.0.3
              > several time, gotten the license in place, so on and so forth,
              > but cannot get around this problem. "weblogic.properties" file
              > still reads:
              >
              > weblogic.httpd.register.file=weblogic.servlet.FileServlet
              >
              > All my servlets and EJBs have been registered, and db connection and
              > pool made, as usual. As I said above, everything looks normal until
              > I try to hit a servlet.
              >
              > ****
              >
              > [... startup output tidied up a bit ...]
              > Thu Jan 27 14:46:05 MST 2000:<I> <ListenThread> Listening on port: 80
              > Thu Jan 27 14:46:06 MST 2000:<I> <SSLListenThread> Listening on port: 7002
              > Thu Jan 27 14:47:32 MST 2000:<E> <ServletContext-Servlets> Error loading servlet: weblogic.servlet.FileServlet
              > Thu Jan 27 14:47:32 MST 2000:<E> <ServletContext-Servlets> java.lang.IncompatibleClassChangeError: class
              > weblogic.utils.classloaders.ClasspathClassFinder does not implement interface weblogic.utils.classloaders.ClassFinder
              > at weblogic.utils.classloaders.GenericClassloader.findLocalClass(GenericClassloader.java:196)
              > at weblogic.utils.classloaders.GenericClassloader.reallyLoadClass(Compiled Code)
              > at weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.loadClass(RecursiveReloadOnModifyClassLoader.java:221
              > at weblogic.utils.classloaders.GenericClassloader.loadClass(GenericClassloader.java:66)
              > at weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.findLocalClass(RecursiveReloadOnModifyClassLoader.java:96)
              > at weblogic.utils.classloaders.GenericClassloader.reallyLoadClass(Compiled Code)
              > at weblogic.utils.classloaders.GenericClassloader.loadClass(GenericClassloader.java:82)
              > at weblogic.utils.classloaders.GenericClassloader.loadClass(GenericClassloader.java:66)
              > at weblogic.servlet.internal.ServletContextImpl.loadClass(ServletContextImpl.java:440)
              > at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:121)
              > at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:85)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:67)
              > at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:203)
              > at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:505)
              > at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              > at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
              >
              > Thu Jan 27 14:47:32 MST 2000:<E> <ServletContext-Servlets> Servlet failed with ServletException ...
              >
              > ... and so on with multiple cascading failures.
              >
              > ****
              >
              > Does anyone have any idea as to what could cause this?
              >
              > Thanks.
              >
              > Paul Furbacher
              > [email protected]
              

  • Error preloading servlet - javax.servlet.UnavailableException

    Hello All,
    I'm getting below message while running application on Oracle Application Server 10g. I have struts.jar under WEB-INF/lib folder in EAR file. Really appreciate any suggestions. Thanks
    REPORTAPP: Error preloading servlet
    javax.servlet.UnavailableException
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368)
    at javax.servlet.GenericServlet.init(GenericServlet.java:256)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpApplication.loadServlet(HttpApplication.java:2361
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpApplication.findServlet(HttpApplication.java:4810
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpApplication.findServlet(HttpApplication.java:4734
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpApplication.initPreloadServlets(HttpApplication
    .java:4922)

    Just an idea.....
    Have you bundled the Xerces XML parser .jar file in your project somewhere. I had similar errors once (cannot remember those stacktraces 100% :-) ), and I just removed the XML parser from my project and it worked fine.
    (There's already some XML stuff in OC4J, and I believe it's conflicting if you add another version of the same .jar files.)
    Cheers,
    ~Morten :-)

  • Should I use a servlet? - please help

    Hi,
    This is my problem:
    I have a class (say, DBClass) that connects to the database - it has general functions for insertion, updation, and deletion.
    I have some other classes that use the DBClass to perform insert, update, delete operations on different tables.(e.g., User.java is the class that uses DBClass to add users to the UserMaster table)
    Now, I have a JSP that has a form (to accept user information). Is it right in instaniate a User object in the jsp itself, and call the addUser method (which will use the 'insert' method in DBClass and add it to the database), or will it be right to post the data to a servlet, and do the whole thing there?
    Which is the right way to do it?
    Please help. I am new to the JSP technology..
    Thank you,
    sangita

    Hi sangita,
    It is always recommended that for insertion in the database, u should use a Servlet and for retrieval of data, u should use a Java bean. U can write a DBClass, where u will write one method for returning the database connection and another for closing the connection. These methods u can access from your servlet as well as your bean.
    Hope it will help. Let me know.
    atanu

  • Reference EJB from servlet's action/helper classes

    Hello
    How to make a reference to stateless session bean from one of the helper classes of a servlet WITHOUT using any of these:
    * dependency injection (like @EJB) - I think this is not supported in this kind of class, EJB references can be injected only to servlets themselves or some other things (but not objects of classes "accompanying" a servlet)
    * home or local home interfaces (I would like to avoid writing them)
    * using mappedName (either in @Stateless or in ejb-jar) - since meaning of this is application-server dependent and thus not portable.
    By a "class accompanying a servlet" / "helper class" I mean utility or action classes, like MyActionClass, which would be instantiated and then used by a aforementioned servlet.
    Thanks.

    The EJB dependency must be looked up via the java:comp/env namespace since as you point out
    Java EE 5 environment annotations are not supported on POJOs. However, the dependency itself
    can either be defined using @EJB on some other managed class in the .war or within the
    web.xml. We have an entry in our EJB FAQ that has the details :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB
    Also, whenever the client component resides in the same application as the target EJB (which is
    required for Local access but not for Remote access) there is no need to use mappedName to
    resolve the EJB dependency. It is either automatically resolved if the business interface type of
    the EJB dependency is only exposed by a single EJB in the application, OR the beanName()
    / ejb-link attributes can be used to unambiguously identify the target EJB using ejb-name.
    You can find more about this in the FAQ as well.

  • Class/member variables usage in servlets and/or helper classes

    I just started on a new dev team and I saw in some of their code where the HttpSession is stored as a class/member variable of a servlet helper class, and I was not sure if this was ok to do or not? Will there be problems when multiple users are accessing the same code?
    To give some more detail, we are using WebLogic and using their Controller (.jpf) files as our servlet/action. Several helper files were created for the Controller file. In the Controller, the helper file (MyHelper.java) is instantiated, and then has a method invoked on it. One of the parameters to the method of the helper class is the HttpServletRequest object. In the method of the helper file, the very first line gets the session from the request object and assigns it to a class variable. Is this ok? If so, would it be better to pass in the instance of the HttpServletRequest object as a parameter to the constructor, which would set the class variable, or does it even matter? The class variable holding the session is used in several other methods, which are all invoked from the method that was invoked from the Controller.
    In the Controller file:
    MyHelper help = new MyHelper();
    help.doIt(request);MyHelper.java
    public class MyHelper {
        private HttpSession session;
        public void doIt(HttpServletRequest request) {
            session = request.getSession();
            String temp = test();
        private String test() {
            String s = session.getAttribute("test");
            return s; 
    }In the past when I have coded servlets, I just passed the request and/or session around to the other methods or classes that may have needed it. However, maybe I did not need to do that. I want to know if what is being done above will have any issues with the data getting "crossed" between users or anything of that sort.
    If anyone has any thoughts/comments/ideas about this I would greatly appreciate it.

    No thoughts from anyone?

  • Servlet cannot find helper class

    Hello
    Under WEB-INF/classes I put ServletExample and SingletonExample. Compiling ServletExample, that makes use of SingletonExample, works.
    In the directory WEB-INF/classes I also have another direcotry, test. And in WEB-INF/classes/test I put again ServletExample and SingletonExample.
    Here I have tried in several ways to compile the servlet, but I always get an:
    Cannot find symbol class SingletonExample.
    I tried writing package test at the top of both files, and even at the top of only one of these two.
    I even tried to make WEB-INF/classes/test/ServletExample make use of SingletonExample residing in WEB-INF/classes, but I didnt succeded.
    What happens when you have subdirectory in WEB-INF/classes/? I think this is a MUST, to have subdirectory in large webapplication, so I really dont want to put everything in the classes directory.
    Do you how to resolve this prolem? And: if Im in WEB-INF/classes/test and want to referr from a servlet residing in this direcory to a Singleton/helper class residing in WEB-INF/classes/, which approach do I have to use?
    Thanks
    Paolo

    Jeez, you aren't gonna get very far in Java like this.
    CLASSPATH is wrong - again. You're supposed to give JARs and paths where the class loader is supposed to look, not the actual .class file.
    Also, you're not telling the compiler to put the .class file in the package directory structure.
    Your example is pretty awful. Try this:
    Put this code into c:\common
    package common;
    import common.test.TestDown;  // What the hell is this?  There is no package test, but there is a package named common.test
    public class TestUp
       public void sayHello()
          System.out.println("Hello.....");
    }Put this code into c:\common\test
    package common.test;
    import common.TestUp;
    public class  TestDown
       public TestDown()
            TestUp testUp = new TestUp();
            testUp.sayHello();
       public static void main(String[] args)
            new TestDown();
    }Open a command shell and navigate to c:\, then do the following:
    Directory of c:
    07/01/2005  03:43 PM    <DIR>          .
    07/01/2005  03:43 PM    <DIR>          ..
    07/01/2005  03:45 PM    <DIR>          common
                   0 File(s)              0 bytes
                   3 Dir(s)  74,909,675,520 bytes free
    C:\>javac -d . common\*.java
    C:\>javac -d . common\test\*.java
    C:\>java -classpath . common.test.TestDown
    Hello.....Once you've got your head around this, go learn Ant and have it compile your projects properly.
    %

Maybe you are looking for