Error in invoking servlet from JSP

Hi - again!
after being thoroughly reprimanded for posting on the wrong board, and hence seeing the error in my ways, all help greatly appreciated....
I have read elsewhere that it is possible to call a servlet (which produces HTML) from within a JSP, thus keeping a nice clean MVC paradigm and making it easier for non-java people to design the front-end.
I am having difficulty getting it to work and any help is much appreciated:
My servlet (Mole):
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        try {
            out.write("###some html stored in DB#####");
        } finally {
            out.close();
    }my JSP:
<jsp:include page="Mole" flush="false"></jsp:include>the error I get
Internal error flushing the buffer in release()
StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.io.IOException: Stream closed
        at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:257)
        at org.apache.jasper.runtime.JspWriterImpl.clearBuffer(JspWriterImpl.java:206)
        at org.apache.jsp.CMS.services_jsp._jspService(services_jsp.java from :176)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
        at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)Any pointer as to what I am donig wrong?
many thanks

in your web.xml
<servlet>
<servlet-name>Mole</servlet-name>
<servlet-class>srvlt.Mole</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Mole</servlet-name>
<url-pattern>/Mole</url-pattern>
</servlet-mapping>
package srvlt;
// Import servlet packages
import javax.servlet.*;
import javax.servlet.http.*;
// Import other Java packages
import java.io.*;
public class Mole extends HttpServlet {
        public void init() throws ServletException {}
        public void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try {
                out.write("###some html stored in DB#####");
            } finally {
                out.close();
}in your jsp
<jsp:include page="/Mole" flush="false"></jsp:include>

Similar Messages

  • Error in accessing servlet from JSP

    Hello everybody,
    When I access a servlet from a JSP page,I am getting the following error message :
    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.
    I am using Weblogic 7.0 and my web.xml code is as follows:
    <web-app>
    <servlet>
    <servlet-name>TestServlet</servlet-name>
    <servlet-class>TestServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>TestServlet</servlet-name>
    <url-pattern>/TestServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    I am accessing the servlet from a javascript function in my JSP page.
    I am quite new to the Java technology. So any help in this regard would be highly appreciated.
    Thanks in advance,

    The form action event is in a javascript function. I am sorry I mentioned that I am accessing this servlet from JSP. Actually,this servlet is accessed from an HTML document.
    The following is the javascript code:
    <script language="javascript">
    function lfnCallNext()
         alert("In the function");
         frmMain.method="POST";
         frmMain.action="/TestServlet";
         frmMain.hidChoice.value="GetList";
         frmMain.submit();
    </script>
    And this function is called from an hyperlink as follows:
    Work with Employee Database
    Thanks,

  • Cannot invoke servlet from JSP

    I am trying to invoke a servlet from my JSP file. At present I am getting the error:
    500 Internal Server Error
    java.lang.IllegalArgumentException: Resource /servlet/CreateSPSS not found
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindPageContext.forward
    I understand that my JSP cannot find my servlet but I cannot identify what the correct path or amendment is.
    My JSP file is located in:
    default-web-app/examples/jsp/com.xml2spss.jsp
    In the JSP my forward parameter is :
    <jsp:forward page="/servlet/CreateSPSS" />
    and my servlet (.java & .class) is located in
    default-web-app/WEB-INF/classes/com/pmstation/spss/site/servlet.CreateSPSS.java
    I have added the following line to Web.XML:
    <servlet-mapping>
    <servlet-name>CreateSPSS</servlet-name>
    <url-pattern>/servlet/CreateSPSS</url-pattern>
    </servlet-mapping>
    Where am I going wrong??
    Thankyou for any help at all on this one.

    Shaun,
    Nice to know that you find a way that works. However, what Zsolt suggests should work; otherwise, it is a bug. That is, put the servlet definition and servlet mapping in your web.xml and then you should be able to access http://host:port/myWebContext/servlet/CreateSPSS?myParmName=myParm without seeing a response like "No resource found". Please make sure that your servlet definition come before the corresponding servlet mapping.

  • Error when accessing Entity from JSP

    I'm trying to develop an application in Jboss AS.
    I have an Entity Class named Users and a stateful session named LoginActionBean which has the following method:
      public Users checkUser(String t1,String t2){
             Users test = (Users) em.createNamedQuery("Users.login").setParameter("userUsername",t1).setParameter("userPwd",t2).getSingleResult();
                return test;
        }In my jsp file, I try to do the following:
    Users a;
    public void jspInit() {
        try {
            InitialContext ic = new InitialContext();
            bci = (LoginActionLocal) ic.lookup("deytera_pasxa/LoginActionBean/local");
        } catch (Exception ex) {
            System.out.println("Error:"+
                    ex.getMessage());
    try {
        s2 = request.getParameter("username");
        s3 = request.getParameter("password");
        if (s2 != null && s3 != null) {
                a = bci.checkUser(s2,s3);
    .....I get no compilation error but when I try to run it I get:
    20:28:08,650 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.NoSuchMethodError: ejb.LoginActionLocal.checkUser(Ljava/lang/String;Ljava/lang/String;)Lejb/Users;
            at org.apache.jsp.isLogged_jsp._jspService(isLogged_jsp.java:90)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
            at java.lang.Thread.run(Thread.java:595)at the moment checkUser() is called. If I change the method's return type to let's say boolean and change the code, it works perfectly fine!
    I'm stuck here for 3 hours, any help much appreciated.
    Edited by: SyMpToM on May 5, 2008 11:03 AM
    Edited by: SyMpToM on May 5, 2008 11:04 AM

    The form action event is in a javascript function. I am sorry I mentioned that I am accessing this servlet from JSP. Actually,this servlet is accessed from an HTML document.
    The following is the javascript code:
    <script language="javascript">
    function lfnCallNext()
         alert("In the function");
         frmMain.method="POST";
         frmMain.action="/TestServlet";
         frmMain.hidChoice.value="GetList";
         frmMain.submit();
    </script>
    And this function is called from an hyperlink as follows:
    Work with Employee Database
    Thanks,

  • How to invoke bpel from jsp

    Hi,
    I created a bpel application helloword.bpel which has one assign activity it takes input as a name i want to invoke this from jsp i write a code in jsp as follows:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="com.oracle.bpel.client.Locator" %>
    <%@ page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@ page import="com.oracle.bpel.client.dispatch.IDeliveryService" %>
    <%@ page import="com.oracle.bpel.client.util.Parameters" %>
    <html>
    <head>
    <title>helloworld</title>
    </head>
    <%
    String name=request.getParameter("name");
    if(name==null)
    name="BPEL";
    String xml ="<name xmlns=\"http://xmlns.oracle.com/helloworld\">" + name + "</name>";
    Locator locator = new Locator("default","helloworld");
    com.oracle.bpel.client.dispatch.IDeliveryService deliveryService = (com.oracle.bpel.client.dispatch.IDeliveryService) locator.lookupService(com.oracle.bpel.client.dispatch.IDeliveryService.SERVICE_NAME);
    com.oracle.bpel.client.NormalizedMessage nm = new com.oracle.bpel.client.NormalizedMessage();
    nm.addPart("payload",xml);
    deliveryService.post("helloworld","intiate",nm);
    out.println("BPELprocess helloWorld intiated");
    %>
    </html>
    i compiled this it is error free but when i try to run this i got a 500 internal server error whats the problem i dont if any one knows pls help me out.
    im new to bpel.
    the error is
    500 Internal Server Error
    java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIServerContext.lookup(RMIServerContext.java:207)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:255)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationContext.lookup(ApplicationContext.java:195)     at javax.naming.InitialContext.lookup(InitialContext.java:351)     at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)     at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)     at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)     at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)     at _helloworld._jspService(_helloworld.java:63)     [helloworld.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)".     at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:82)     at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)     at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)     at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)     at helloworld.jspService(_helloworld.java:63)     [helloworld.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)Caused by: java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIServerContext.lookup(RMIServerContext.java:207)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:255)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationContext.lookup(ApplicationContext.java:195)     at javax.naming.InitialContext.lookup(InitialContext.java:351)     at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)     at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)     at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)     at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)     at _helloworld._jspService(_helloworld.java:63)     [helloworld.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)".     at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:293)     at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)     ... 21 more

    Looks like you are hitting some bug on 10.1.3.1.0, have you tried on a higher version and also referred SOA_ORACLE_HOME\bpel\samples\tutorials\102.InvokingProcesses\jsp sample ?

  • How to call Servlet from jsp page and how to run this app using tomcat..?

    Hi ,
    I wanted to call servlet from jsp action i.e. on submit button of JSP call LoginServlet.Java file.
    Please tell me how to do this into jsp page..?
    Also i wanted to execute this application using tomcat.
    Please tell me how to do this...? what setting are required for this...? what will be url ..??
    Thanks.

    well....my problem is as follows:
    whenever i type...... http://localhost:8080/appName/
    i am getting 404 error.....it is not calling to login.jsp (default jsp)
    but when i type......http://localhost:8080/appName/login.do........it executes servlet properly.
    Basically this 'login.do' is form action (form action='/login.do').....and i wanted to execute this from login jsp only.(from submit button)
    In short can anyone please tell me how to diaplay jsp page using tomcat 5.5
    plz help me.

  • How to get an ArrayList Object in servlet from JSP?

    How to get an ArrayList Object in servlet from JSP?
    hi all
    please give the solution for this without using session and application...
    In test1.jsp file
    i am setting values for my setter methods using <jsp:usebean> <jsp:setproperty> tags as shown below.
    After that i am adding the usebean object to array list, then using request.setAttribute("arraylist object")
    ---------Code----------
    <jsp:useBean id="payment" class="com.common.PaymentHandler" scope="request" />
    <jsp:setProperty name="payment" property="strCreditCardNo" param="creditCardNumber" />
    <%-- <jsp:setProperty name="payment" property="iCsc" param="securityCode" /> --%>
    <jsp:setProperty name="payment" property="strDate" param="expirationDate" />
    <jsp:setProperty name="payment" property="strCardType" param="creditCardType" />
    <%--<jsp:setProperty name="payment" property="cDeactivate" param="deactivateBox" />
    <jsp:setProperty name="payment" property="fAmount" param="depositAmt" />
    <jsp:setProperty name="payment" property="fAmount" param="totalAmtDue" /> --%>
    <jsp:useBean id="lis" class="java.util.ArrayList" scope="request">
    <%
    lis.add(payment);
    %>
    </jsp:useBean>
    <%
    request.setAttribute("lis1",lis);
    %>
    -----------Code in JSP-----------------
    In testServlet.java
    i tried to get the arraylist object in servlet using request.getAttribute
    But I unable to get that arrayObject in servlet.....
    So if any one help me out in this, it will be very helpfull to me..
    Thanks in Advance
    Edward

    Hi,
    Im also facing the similar problen
    pls anybody help..
    thax in advance....
    Litty

  • Wot all ways are there to call servlet from jsp

    hi all
    i want to know wot all methods are available
    so that i can call servlet from jsp
    the one which i know is using RequestDispatcher
    wot are others ?
    thanx

    hi all
    i want to know wot all methods are available
    so that i can call servlet from jsp
    the one which i know is using RequestDispatcher
    wot are others ?
    thanxhi here are few ways... to call servlet from jsp...
    these are just generic syntax.
    Form:     
    <form action="ServletPath">
    Link:     
    Directives & Action tags :
    <%@ page import="ServletPath" %>
         <%@ taglib uri="ServletPth" %>
         <jsp:include page="ServletPath">
         <jsp:forward page="ServletPath">
         <jsp:useBean class="ServletPath"> (Not sure about this useBean)
    hope you got your answer.
    regards,
    immu

  • 404 error while invoking servlet in weblogic 6.0

              Hi,
              When I try to invoke a servlet from weblogic 6.0, I am getting
              404 error. I have copied the HelloWorldServlet class into defaultWebAppl_Server/WEB_INF/CLASSES
              directory and when I invoke the HelloWorldservlet, its giving file
              not found(404) error. I am doing exactly what has been given in
              the "quick start to servlets" in weblogic 6.0. I am using Windows
              NT.
              I have also another problem when I use java utils.dbping to test
              the connection to my oracle8.1.8, its giving licence file not found.
              Could some one help me out from this.
              Thanks in advance,
              Ramu
              

              Hi kumar,
              I have been keep trying to solve that. After some time Suddenly
              "Error 404" disappeared and instead "Error 500" came. Okay kumar,
              here is what I am doing...
              I have installed weblogic6.0(eval), oracle 8.1.6 on Windows NT4.0.
              I have installed oracle Enterprise edition from CD "ORACLE 8.1.6
              for NT".
              I installed the weblogic under D: drive.
              I did class path settings as given in documentation. But Iam not
              sure whether I need to do any other class path settings.
              I was able to run pet store application given in weblogic server.
              I went to "quick start" section and ran HelloWorld.jsp page from
              "DefaultWebApp_myServer" directory.
              I was not able to run servlet program as per given in the "quick
              start". I am getting
              "Error 500---Internal server error"
              The server encountered an unexpected condition which prevented
              it from fulfilling the request"
              I have modified the web.xml under WEB-INF of DefaultWebApp_myServer
              as per given in the quick start.
              Here is the quick start link For you reference(as what I talking
              about)
              http://edocs.beasys.com/wls/docs60/quickstart/quick_start.html
              In the web.xml, I have given <servlet-class> as just HelloWorldServlet,
              since I directly copied the file from some other examples directory.
              But still I am getting 500 error.
              Here is the url that I am invoking...Http://ramup:7001/quickStartServlet
              Coming to your oracle connection test, I did exactly what you said.
              kumar, I have executed the command
              "D:\bea\wlserver6.0\config\mydomain>java -classpath %classpath%;D:\bea
              utils.dbping ORACLE
              >scott tiger TestDB"
              Where TestDB is the database that I have created while installing,
              but I am not aware of the instance you said.
              Here is what I got after executing the command.
              --------*******-------Pasting the ms-dos command results----**-
              // This mode is superior, especially in serverside classes because
              // it avoids DriverManager calls are class synchronized, and will
              // bottleneck any other JDBC in the server, even already-running
              // connections, because all JDBC drivers use DriverManager.println()
              // to log info and exceptions, and that call is also class synchronized.
              // For repeated connecting, a single driver instance can be re-used.
              **** or ****
              Class.forName("weblogic.jdbc.oci.Driver").newInstance();
              java.sql.Connection conn =
              DriverManager.getConnection("jdbc:weblogic:oracle:TestDB", "scott",
              "tiger")
              **** or ****
              java.util.Properties props = new java.util.Properties();
              props.put("user", "scott");
              props.put("password", "tiger");
              props.put("server", "TestDB");
              Class.forName("weblogic.jdbc.oci.Driver").newInstance();
              java.sql.Connection conn =
              DriverManager.getConnection("jdbc:weblogic:oracle", props);
              D:\bea\wlserver6.0\config\mydomain>
              --------*******-------Pasting the ms-dos command results----**-
              I think I have connection to database, thanks for your suggestion.
              Kumar, I have not seen weblogic.properties file any where in D:\bea
              directory.
              Kumar, if you have some time can you jot down the classpath settings
              and path settings for executing SERVLETS/EJB programs.
              Thanks for helping me out..,
              Ramu
              Kumar Allamraju <[email protected]> wrote:
              >Assuming you registered the helloworld servlet in web.xml,
              >could you show me the url
              >that you typed in the browser window? :)
              >
              >
              >Regarding the dbping problem, make sure license.bea is
              >in the classpath
              >
              >ie.. java -classpath %classpath%;D:\bea utils.dbping ORACLE
              >scott tiger [instance-name]
              >
              >PS: I'm assuming WLS is installed in D:\bea directory.
              >
              >--
              >Kumar
              >
              >
              >Ramu wrote:
              >
              >> Hi,
              >>
              >> When I try to invoke a servlet from weblogic 6.0, I
              >am getting
              >> 404 error. I have copied the HelloWorldServlet class
              >into defaultWebAppl_Server/WEB_INF/CLASSES
              >> directory and when I invoke the HelloWorldservlet, its
              >giving file
              >> not found(404) error. I am doing exactly what has been
              >given in
              >> the "quick start to servlets" in weblogic 6.0. I am
              >using Windows
              >> NT.
              >>
              >> I have also another problem when I use java utils.dbping
              >to test
              >> the connection to my oracle8.1.8, its giving licence
              >file not found.
              >>
              >> Could some one help me out from this.
              >>
              >> Thanks in advance,
              >> Ramu
              >
              

  • Very urgent: call servlet from JSP

    Hello,
    I'm facing a problem in invoking a servlet from a JSP having the JSF components.
    The application has a text field to implement ajax for search functionality in the database .I have written a servlet to make the database connection and fire the querry.
    Ajax implementation in a js file is called on every keyup event in the jsp file,and
    a call is given to the servlet from the ajax methode.
    The function in the js file is as follows:-
    function getPersonByFirstNameXML( firstName ) {
        if (!firstName) {
            clearPersonByFirstNameXML();
        } else {   
            var url = BASE_URL + "/servlet/get_PersonsXML";
            alert(url);
            return new AJAXRequest("post", url, "firstName=" + encode(firstName), processGetPersonByFirstNameXML);
    }Im getting the myAJAX.status value as 500.
    I think I'm not able to access the servlet properly.
    what changes do i need to make in the we.xml file ?
    and what should be the url to be passed.
    Please provide me a sloution to the above problem as it is very urgent else if anybody is aware of a readymade JSF componet with search functionality freely available please let me know.
    PS:
    The sample application named RedirectionExample which makes use of a servlet and would be of help to you. You can find the tutorial on the following page:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    is not available as stated in some of the suggestions by Author: mayagiri
    Thanks for any help.
    Abhi

    the status 500 generally means either HTTP server internal error or that execution of CGI script or servlet aborted with error.
    It can be reasonably supposed that the request reaches the servlet, ie. that "url" value points to some existing servlet, otherwise most probably the status value would be 404.
    To test that the servlet is working i'd try to access it using some simple html page with form like this (with {BASE_URL} replaced by real value):
    <form method=post action={BASE_URL}/servlet/get_PersonsXML>
    <input type=text name=firstName>
    <input type=Submit>
    </form>

  • How to call servlet from jsp

    i m trying to call it from jsp using
    <a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>
    but its giving error..
    type Status report
    message HTTP method GET is not supported by this URL
    description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).

    i m trying to call it from jsp using
    <a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>
    but its giving error..
    type Status report
    message HTTP method GET is not supported by this URL
    description The specified HTTP method is not allowed
    for the requested resource (HTTP method GET is not
    supported by this URL).Are you implementing the doGet or doPost method in your servlet? If you are calling from a hyperlink then it needs to be implementing the GET method. To access the POST method use a html form.

  • Encoding Error when invoking form from client application.

    I have an issue in retrieving the form data from the client application. Form (XDP File) is displayed in the browser as PDF through
    ServletOutputStream then i am trying to retrieve the data on click of the submit button. At that time the following exception is thrown:
    [8/17/07 9:20:18:212 EDT] 00000029 jsf E com.sun.faces.application.ViewHandlerImpl setRequestEncoding SRVE0254E: Failed to set request character encoding: ["utf-16"].
    java.io.UnsupportedEncodingException: SRVE0254E: Failed to set request character encoding: ["utf-16"].
    at com.ibm.ws.webcontainer.srt.SRTServletRequest.setCharacterEncoding(SRTServletRequest.java :231)
    at javax.servlet.ServletRequestWrapper.setCharacterEncoding(ServletRequestWrapper.java:158)
    at com.sun.faces.application.ViewHandlerImpl.setRequestEncoding(ViewHandlerImpl.java:364)
    at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:267)
    at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:158)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:239)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink .java:465)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink .java:394)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.jav a:102)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionLi stener.java:152)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
    at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    Note: I am able to retrieve the data, if I store the same PDF file in the local disk and invoke it from my JSP Faces file.
    i appreciate if any one can help me to resolve this issue.

    Please update me if any one have idea on this issue.

  • Error when invoking request from BPEL to SAP

    Hi
    I have problem when invoking request from BPEL project to SAP R/3.
    I use Oracle SOA Suite 10.1.3.1 and Oracle AS Adapter 10.1.3.1. I created BPEL project that call SAP service that I have created from Application Explorer. When I run The BPEL project, there is an error shown as below:
    <messages><input><Invoke_1_GetGLAccountBalance_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="input_GetGLAccountBalance"><GeneralLedger.GetGLAccountBalance xmlns="urn:sap-com:document:sap:business:Request">
    <COMPANYCODE>10</COMPANYCODE>
    <CURRENCYTYPE>10</CURRENCYTYPE>
    <FISCALYEAR>2007</FISCALYEAR>
    <GLACCT>61001010</GLACCT>
    </GeneralLedger.GetGLAccountBalance>
    </part></Invoke_1_GetGLAccountBalance_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>http://127.0.0.1:7777/orainfra/wsil/adapters/applications/GetGLAccountBalance.wsdl?wsdl [ GetGLAccountBalancePortType::GetGLAccountBalance(input_GetGLAccountBalance,output_GetGLAccountBalance) ] - WSIF JCA Execute of operation 'GetGLAccountBalance' failed due to: Error in processing the input document.; nested exception is:
         javax.resource.ResourceException: Error in processing the input document.</summary>
    </part><part name="detail"><detail>javax.resource.ResourceException: Error in processing the input document.</detail>
    </part></bindingFault></fault></messages>
    Anyone who know the reason, please give me some advice.
    Thank you in advance

    Hi,
    Please check the Logical system,Business system, configurations ,please see the below links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cdded790-0201-0010-6db8-beb9bb2b2660
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    /people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping
    Regards
    Chilla..

  • Import a servlet from JSP without the use of a .JAR

    Migrating web app from NT / iPlanet 4.1 to Solaris / iPlanet 4.1.
    I've created a Web app in which JSPs utilize Servlets stored in a JAR file. I am now moving the app to a server that I do not control. I wish to configure the app in such a way that I will be able to modify the servlets and not have to restart the Web server to see the changes. I assume the only way to do this is to remove them from the JAR file.
    I'm familiar with how to package servlets in JAR files and use them in JSPs, but can't figure out how to import (my own) servlets from outside the JAR file. Is there any way to do this without specifying the servlet in the CLASSPATH?
    ...sorry if it's a stupid question, I'm not a Java programmer. Thanks in advance. Please let me know if I have not given enough detail.

    I've created a Web app in which JSPs utilize Servlets
    stored in a JAR file. I am now moving the app to a
    server that I do not control. I wish to configure the
    app in such a way that I will be able to modify the
    servlets and not have to restart the Web server to see
    the changes. I assume the only way to do this is to
    remove them from the JAR file.Bad assumption! This will have no impact on reloading the servlets!
    What you are asking for is called 'hot deployment'. Not all servers do that.
    Tomcat 4 does for instance, but you have to configure it for your specific webapp to be able to use it.
    Hot deployment just reloads all the classes in its classpath, it doesn't matter if they're in jars or just .class

  • Invoking webflow from JSP

    Does anyone know if there is a method for programmatically invoking a webflow from
    a jsp? I have a jsp that has multiple "modes", for instance, it posts to itself
    and will do one of 3 things "action1", "action2", or "action3".
    I want the jsp to mimic a redirect and go to the page associated with action1,
    2 or 3.
    i saw the method invokePortletWebflow in PortalAppflowHelper but am not sure what
    it really does.
    thanks

    Hello,
    You should use the webflow JSP tag library to create webflow URLs that
    will forward the request to. Look at the <webflow:createWebflowURL> tag.
    If you want to do a redirect instead of a forward to the destination JSP,
    then set doRedirect="true".
    What you would do is set event="mystuff.action1" and you would create a
    webflow, using the EBCC, that links the "mystuff.action1" event from your
    origin JSP to your action1 JSP page. Similarly for action2, action3.
    If you are doing this in the context of a portlet that is in a portal,
    then you should look at the <portlet:createWebflowURL> tag. Because the
    portlet webflow is executed within the overall portal webflow, you must use
    this tag to set the portletId and a few other things. You would create a
    separate portlet webflow that would be very similar to the webflow I
    describe above.
    See the webflow taglib docs at
    http://edocs.bea.com/wlp/docs70/jsp/navigat.htm#998197
    See the portlet taglib docs at
    http://edocs.bea.com/wlp/docs70/jsp/mngprtal.htm#1001597
    I would also recommend the "Setting Up Portal Navigation" doc at
    http://edocs.bea.com/wlp/docs70/dev/navigate.htm
    Let me know if you have any trouble creating your webflow and using the
    createWebflowURL tag.
    "B Hogan" <[email protected]> wrote in message
    news:[email protected]..
    >
    Does anyone know if there is a method for programmatically invoking awebflow from
    a jsp? I have a jsp that has multiple "modes", for instance, it posts toitself
    and will do one of 3 things "action1", "action2", or "action3".
    I want the jsp to mimic a redirect and go to the page associated withaction1,
    2 or 3.
    i saw the method invokePortletWebflow in PortalAppflowHelper but am notsure what
    it really does.
    thanks

Maybe you are looking for

  • File Import Bookmarks is not working

    I have latest version of Firefox 5.0 I click File > Import > Opera (or any other selection) click Next and nothing happens.

  • Vendor performance

    Have you done any vendor performance evaluation report? So we can see if the vendor delivery performance based on the following measure: PO QTY delivered on time and in full The material delivered is in good condition I am trying to build the data mo

  • IPod Dock Won't Charge iPod Classic 3rd Gen

    Hi, I have an iPod Classic 3rd generation that is running Version 2.3 with the Capacity of 13.9 GB. Model: M946OCH It looks like this: http://profile.ultimate-guitar.com/profilemojo_data/5/8/5/1/585103/pics/_c297123_image0.png The problem: this iPod

  • Auto Refresh a cfform

    I have a page with flash cfforms and I was wondering if there was any command to auto-refresh the screen say every 30 seconds or so? Is the "timeout" cmd somehow related? Sorry, I am a cf noob. Thanks, Nick Butler

  • Missing toolbars in PDFs when using old (5.0) Reader

    One of our clients is still on Reader 5.0 and we are unable to convince him to upgrade. Our PDFs are produced from FrameMaker 7.2 and although they look beautiful in Reader 7.0 and 8.0, our client can't see a toolbar in his version of Reader. F8 does