Problem catching handle ejb session in jsp pages

Hello,
i'm trying to develop an ejb application.
I have created an ejb session stateful in a second ejb stateless :
InitialContext ic = new InitialContext();
UserSessionHome home = (UserSessionHome)ic.lookup("UserSessionHome");
UserSession conn = home.create(login,mdp);
Then I have to retrieve this ejb session stateful in a jsp page in order to remove it or to call some others functions developped in the bean interface.
I think that the solution for this problem are the ejb handles.
But i don't know how and where I can store them.
Can you help me?
Thanx
Sophie

You put them in the HttpSession. For "how," read the API docs.

Similar Messages

  • How to Handle user Session in JSP

    Help me,
    How to handle user session in JSP.......

    Prakash_Pune wrote:
    tell me some Debugging tech. so i can overcome from my problem.....Do you use an IDE? Any IDE ships with a decent debugger where in you can just execute the code step by step, explore the current variable values and check what exactly is happening. For example Eclipse or IntelliJ. If you don´t use an IDE, then just place some System.out.println() or Logger.debug() statements at strategic locations printing the variables of relevance so that you can track in logs what exactly is happening.
    or tell any other way to find is my page is thread safe or not...Just write correct code and narrow the scope of the variables as much as possible. If you for example assigned the user object to a static variable or as a servlet´s instance variable, then exactly the same user object would be used everywhere in the application. That kind of logical things.

  • Problem in passing data from one .jsp page to another .jsp page

    i have a problem here
    Actually i have 2 jsp pages. What im trying to do here is actually i want to pass data from the first jsp page to the second for updating
    The first jsp page contains data that user wants to update in the form of table.
    <td><img src = "edit.gif" alt = "edit" border="0" ><td>
    <TD><%= Name %></td>
    <TD><%= rs.getInt("Age") %></td>
    <TD><%= rs.getString("Gender") %></td>
    So this page displays the data that users wants to update plus one image button (edit button). So when user clicks this button, all the data in this page will be brought to the second .jsp page called updatePersonal for updating.
    The problem here is that it is not displaying the existing data in the second .jsp page.
    The second page basically contains forms
    <INPUT TYPE="text" NAME="FirstName" maxlength="30" value = "<%=FirstName%>">
    Can someone please help me. I really dont know what to do..How do i get the data displayed in the text field that is passed from the first .jsp page..thankx in advance

    Please modify below code to:
    td><img src = "edit.gif" alt = "edit" border="0" ><td>
    -----------------modified code
    td><a href="updatePersonal.jsp?FirstName=<%=rs.getString(FirstName")%">&LastName=<%=rs.getString("LastName")%>&Age=<%=rs.getInt("Age")%>&Gender=<%=rs.getString("Gender")%>"><img src = "edit.gif" alt = "edit" border="0" ></a><td>
    I'm sure it works</a>

  • Session in JSP page

    Hi all,
    i built a web application now i want to use session in JSP pages to remember some variable such as password and entered date because i need them in later pages and i also don't want to send them via HTML hidden field. I actually don't know how to use session. Can anyone please just tell me how to create a session and store a variable and also how to retrieve the data from the session.
    Another thing is guys can anyone tell me please that say i am user and i selected some items from a HTML select list and i submitted that and logged off the system now when i login later again i want to see those choices selected by default , i know it might have been done by sessions can anyone please tell me.
    THANKS VERY MUCH

    This is the way u can set and retrieve values from session
    <% session.setAttribute("key","value"); %>
    <% String user=(String)session.getAttribute("user");
    %>
    regards
    Shanu

  • Session Timout JSP Page Forward

    Hi All,
    I am currently working on a JSP site and want to add a JSP page forward that takes place when the user's session times out after a period of inactivity.
    I have created a servlet that implements HttpSessionBindingListener and has methods in place for valueBound and valueUnboud. The methods are getting called as they should, however because there isn't an HttpResponse object I cannot do a response.forward....
    So my question: Is the HttpSessionBindingListener the correct interface to be implementing to accomplish my goal? If so, how do I forward the user to the login page? If not, what should I use and how do I forward the user to the login page?
    Thanks for your time and help.
    Aaron

    valueUnbound method? Arent you using a Model
    View Controller type architecture? The servlet
    is mainly used to to handle logic and navigate
    to the appropriate view(your java server pages).
    The code I supplied should be placed in the service
    method of your servlet.. then it can handle the
    request and determine where to go from there. Your
    servlet should have three methods, the doPost, the
    doGet, and the service method. The doPost and Get
    should pass the request and response objects on to
    the service method. Any other logic should be handled
    in other classes that you create. The service method
    basically decides what the next page should be.
    Hope this helps..

  • Problem with access to SipFactory from jsp-pages in JBoss environment

    Hello!
    I have an installation of the OCMS 10.1.3.3. deployed into a JBoss (jboss-4.0.5.GA) environment. Unfortunately I have a problem with accessing the SipFactory from a jps-page. Encouraged by the "messagesender" example I tried to get an instance of SipFactory from my jsp-page simply by calling:
    SipFactory sipFactory = (SipFactory) application.getAttribute(SipServlet.SIP_FACTORY);
    But unfortunately there seems to be no attribute "SipServlet.SIP_FACTORY" and I only get a null pointer. I have also tried running that code in the orignal messagesender example but it didn't work either. So I wonder if this should definetely work in a JBoss environment or if this might be a known problem. Is there anything that I could check/do regarding this problem? I suppose there must be an oracle module which should take care of making the SipFactory availabe after it is deployed. Perhaps something went wrong during the deployment?!
    Best regards,
    Tim

    Hi
    On JBoss, OCMS does not support converge applications.
    I.e the SipFactory can be retrieved from the servlet context when running on OC4J.
    Instead the SipFactory can be found in JNDI as described in the Developer's Guide:
    "External Access to SIP Servlets
    To enable convergent applications between SIP and HTTP, the OCMS Container allows you to get access to the javax.servlet.sip.SipFactory by looking it up through JNDI. The SIP Factory will be registered under the same name as the display name of your SIP servlet as illustrated in Example 2–12. The <display-name> in the sip.xml in this case must be "My sip app".
    Example 2–12 Accessing the Data for a SIP Session through JNDI
    InitialContext ic = new InitialContext();
    SipFactory sipFactory = (SipFactory)ic.lookup("sip/My sip app");"
    Cheers
    Lucas Persson

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
    Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
    here is one of my image servlet's working versions (the essential part of it) :
                   BLOB blob=null;
              rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
              while (rset.next())
                   blob=((OracleResultSet)rset).getBLOB(2);
              response.reset();
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition","filename=42.jpeg");
                    ServletOutputStream ostr=response.getOutputStream();
                   InputStream istr=blob.getBinaryStream(1L);
                    int size=blob.getBufferSize();
              int len=-1;
                    byte[] buff = new byte[size];
                         while ((len=istr.read( buff ))!=-1 ) {
                   ostr.write(buff,0,len);
             response.flushBuffer();
             ostr.close(); and my JSP page code :
    <img src="/ImageServlet" border="0"  > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.

    I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
    here's the magic tag : <img src="ImageJSP.jsp" border="0"  > enjoy : )

  • Problem in sending Input to next JSP page

    Hi all,
    i am having problem with some JSP code. I have a JSP page that take some user input and send it to the next page. Now in those inputs there are some input fileds that needs to be added by the user if he wants to submit those input otherwise he can send the other default inputs. Now the problem is i have some String Array variable for those optional inputs in the next JSP page where they will be redirected. Now if i want to send input other than those optional ones then i get errors saying:
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:367)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause
    java.lang.NullPointerException
         org.apache.jsp.store_jsp._jspService(store_jsp.java:85)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:320)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)I tried to test the empty string on that page as well but it failed. Please help me

    if (request.getParameter("yourParameter") != null)
    use the variable
    else
    ignore the variable or assign a default value
    Also be careful with
    String yourSingular = request.getParameter("yourParameter");
    String[] yourArray = request.getParameterValues("yourArray")
    String newSingular = yourSingular;
    String fromYourArray = yourArray[0];

  • Problem in getting an object in JSP page.

    Hi experts,
    I am forming a javabean object in the controller(servlet) and passing the object to a JSP page by setting that object as an attribute. But in that jsp page, when i compile, its not able to locate the class. At the beginning itself while typecasting the attribute as that bean object, i get an error. All the servlet, bean files are in the default package only.
    This is how i used..
    <%
    String m = (String) request.getAttribute("mode");
    //My bean object below.
    adjuster_bean res=(adjuster_bean)request.getAttribute("data");
    %>
    And i am using like, calling the bean object's get method to set values of the text boxes in the JSP page. I need help please....

    Vigsen wrote:
    Hi experts,
    I am forming a javabean object in the controller(servlet) and passing the object to a JSP page by setting that object as an attribute. But in that jsp page, when i compile, its not able to locate the class. At the beginning itself while typecasting the attribute as that bean object, i get an error. All the servlet, bean files are in the default package only.
    This is how i used..
    <%
    String m = (String) request.getAttribute("mode");
    //My bean object below.
    adjuster_bean res=(adjuster_bean)request.getAttribute("data");
    %>
    And i am using like, calling the bean object's get method to set values of the text boxes in the JSP page. I need help please....Are you importing the bean class in your jsp? Something like this...
    <%@ page import="java.util.*, yourpackage.YourBeanClass" %> Secondly, I see standards not followed in your code...
    a) Firstly, as someone else pointed out in this same post. Avoid as much as possible using java scriplets in JSPs. Instead try use JSTL and EL expressions.
    b) A java class name should always start with capital letter for every word in the class name and with no underscores. Your bean class name (adjuster_bean) should be changed to something like AdjusterBean
    If you want to become a good Java programmer then standards are essential. But, again, it is totally up to you to follow.

  • Problem with printing debug statements in JSP page

    Hi all,
    I am debugging an application with System.out.println() statements - my debug statements in the *.java class printed just fine, but when I do the same thing in my JSP page, nothing gets printed out.
    I am already wrapping my System.out.println() statements inside the <% %> tag.
    Does anyone know what may be causing this? Any help will be greatly appreciated!
    - JL

    Where do you expect to see the output?
    System.out.println will write to the console/logs
    They WON'T write to the JSP page.
    If you check your error/output logs you will probably find the statements there.
    If you want to print things into the JSP page, just use out.println.
    "out" is an implicit reference to the current JSPWriter.
    Cheers,
    evnafets

  • Handling SOAP Message in JSP page

    Hi ALL,
    im using SOAP message to build MM7 message,
    i have a soap connection that create a connection to a servlet tp process request,
    the response is a soap message with attachment.....
    the SOAP is 1.1.
    SOAPConnectionFactory connf = SOAPConnectionFactory.newInstance();
    SOAPConnection conn = connf.createConnection();
    SOAPMessage sMessage= conn.call (soapMessage, "http://190.0.0.16:8988/mmsc/httpReceiver");
    sMessage.writeTo(output);
    when running the request for a java class it works fine, but when running same class from JSP page, i have error in SOAP response.....
    im using jdev1013, the application is working fine with another IDE but with Jdev 1013 i have exception
    --------------------Exception---------------------------
    06/10/29 12:33:24 javax.xml.soap.SOAPException: Unable to get header stream in saveChanges
    06/10/29 12:33:24 at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:576)
    06/10/29 12:33:24 at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:622)
    06/10/29 12:33:24 at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:686)
    06/10/29 12:33:24 at oracle.j2ee.ws.saaj.soap.MessageImpl.writeTo(MessageImpl.java:702)
    06/10/29 12:33:24 at com.eska.emmc.relay.vas.MM7Message.sendMessage(MM7Message.java:966)
    06/10/29 12:33:24 at com.eska.emmc.util.VASWrapper.retrieveNotifications(VASWrapper.java:383)
    06/10/29 12:33:24 at com.eska.emmc.subscriber.tags.ManageMessagesTag.doStartTag(ManageMessagesTag.java:67)
    06/10/29 12:33:24 at sub.mmessages._myMessages._jspService(_myMessages.java:70)
    06/10/29 12:33:24 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    06/10/29 12:33:24 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416)
    06/10/29 12:33:24 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
    06/10/29 12:33:24 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
    06/10/29 12:33:24 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    06/10/29 12:33:24 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
    06/10/29 12:33:24 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    06/10/29 12:33:24 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    06/10/29 12:33:24 at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
    06/10/29 12:33:24 at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
    06/10/29 12:33:24 at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
    06/10/29 12:33:24 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    06/10/29 12:33:24 at java.lang.Thread.run(Thread.java:595)
    Message was edited by:
    samer khawaja

    Hello,
    The easiest way to call a Web Service is to use a Client Library instead of calling the SOAP call yourself.
    Can you for your project use a Web Service client stack (JAX-RPC, Axis, XFire, ...) this will create from the WSDL file a set of class and give you a very simple caller class that you can then integrate to your JSP.
    I am pointing you to the OracleAS Web Service Documentation section about Web Service proxy.
    And some simple how-tos that have specific tasks to create client:
    - Web Servics How Tos
    So you can see this specific ant target to create a WS proxy:
    <oracle:genProxy wsdl="[your URL to a WSDL]"
    output="${src.cli.dir}"
    packageName="bottomup.client.proxy"
    >
    <classpath>
    <pathelement path="${bld.cli.dir}"/>
    <pathelement location="${ORACLE_HOME}/webservices/lib/wsa.jar"/>
    </classpath>
    </oracle:genProxy>
    Regards
    Tugdual Grall

  • Problem in import ejb package in jsp

    Hi friends
    I am doing one small project with Eclipse Europa,jsp , EJB. with XDoclet, weblogic server
    I first created all my jsp files as one project.Then i created one enterprise application project with XDocklet , after that i imported all the jsp files using import option in eclipse.
    at development time i am not getting any problem.after deployment when i try to run the jsp files i am getting error of
    Compilation of 'C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java' failed:
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:20: package order.headsess does not exist
    probably occurred due to an error in /jspPages/testing.jsp line 8:
    <%@page import = "order.headsess.*" %>
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:51: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 21:
    HeadHome home = null;
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:52: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 22:
    Head remote =null;
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:226: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 96:
    home =HeadUtil.getHome(env);
    Full compiler error(s):
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:20: package order.headsess does not exist
    import order.headsess.*; //[ /jspPages/testing.jsp; Line: 8]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:51: cannot resolve symbol
    symbol : class HeadHome
    location: class jsp_servlet._jsppages.__testing
    HeadHome home = null; //[ /jspPages/testing.jsp; Line: 21]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:52: cannot resolve symbol
    symbol : class Head
    location: class jsp_servlet._jsppages.__testing
    Head remote =null; //[ /jspPages/testing.jsp; Line: 22]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:226: cannot resolve symbol
    symbol : variable HeadUtil
    location: class jsp_servlet._jsppages.__testing
    home =HeadUtil.getHome(env); //[ /jspPages/testing.jsp; Line: 96]
    ^
    4 errors
    Fri Oct 26 01:40:14 GMT+08:00 2007

    Hi friends
    I am doing one small project with Eclipse Europa,jsp , EJB. with XDoclet, weblogic server
    I first created all my jsp files as one project.Then i created one enterprise application project with XDocklet , after that i imported all the jsp files using import option in eclipse.
    at development time i am not getting any problem.after deployment when i try to run the jsp files i am getting error of
    Compilation of 'C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java' failed:
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:20: package order.headsess does not exist
    probably occurred due to an error in /jspPages/testing.jsp line 8:
    <%@page import = "order.headsess.*" %>
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:51: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 21:
    HeadHome home = null;
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:52: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 22:
    Head remote =null;
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:226: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 96:
    home =HeadUtil.getHome(env);
    Full compiler error(s):
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:20: package order.headsess does not exist
    import order.headsess.*; //[ /jspPages/testing.jsp; Line: 8]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:51: cannot resolve symbol
    symbol : class HeadHome
    location: class jsp_servlet._jsppages.__testing
    HeadHome home = null; //[ /jspPages/testing.jsp; Line: 21]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:52: cannot resolve symbol
    symbol : class Head
    location: class jsp_servlet._jsppages.__testing
    Head remote =null; //[ /jspPages/testing.jsp; Line: 22]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:226: cannot resolve symbol
    symbol : variable HeadUtil
    location: class jsp_servlet._jsppages.__testing
    home =HeadUtil.getHome(env); //[ /jspPages/testing.jsp; Line: 96]
    ^
    4 errors
    Fri Oct 26 01:40:14 GMT+08:00 2007

  • Problem in executing PHP from a JSP page

    Thank u " gimbal2 " for ur reply.
    I have already configured those things(connecting Apache and Tomcat with Tomcat connector mod_jk).
    Now i have written a .jsp file which includes a .php file.
    The server script in the .jsp file is getting executed but the server script in .jsp file not getting executed.
    i think mod_jk connector is nor forwarding the PHP request to Apache.
    How to find where the problem is and how to solve that.
    somebody help me.
    Subbu,
    [email protected]

    So in reality your HTML looks like this:
    <form name="formq">
      <form name="form1">
      </form>
    </form>And your function that gives you problems is written like this:
      document.form1.action="../dashboard/projects.jsp"
      document.form1.submit();While the function written like this works (but not the way you want...)
      document.formq.action="../dashboard/projects.jsp"
      document.formq.submit();Maybe try something like this in the JS function:
      document.formq.form1.action="../dashboard/projects.jsp"
      document.formq.form1.submit();But I would think this is a poor design. Better to have one form, and different submit buttons to perfom different functions:
    <form name="formq" action="../dashboard/project" method="post">
      <input type="submit" name="submit" value="Complete"/>
      <input type="submit" name="submit" value="Partial"/>
    </form>the URL ../dashboard/project points to would be a mapping to a Servlet, which would check on the value of the submit parameter and do the appropriate action:
    public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
      String command = request.getParameter("submit");
      String projectid = request.getParameter("projectid");
      if ("Complete".equals(command))
        request.getRequestDispatcher("../dashboard/projects.jsp").forward(request, response);
      else if ("Partial".equals(command))
        response.sendRedirect("../dashboard/projects.jsp?projectid="+projectid);
      else
        //probably an error, or do something else...
    }This allows you to do two different actions with one form submitted to the same place, and eliminates the necessity of javascript. You could do the samething within the JSP (projects.jsp) as well, but I like to keep the flow control in servlets...

  • Catch TransactionRolledbackLocalException ejb session

    Hi,
    I'm working with ADF Faces, JSF and EJB3. Now when I use UnitOfWork's commit and it fails I throw a RuntimeException that it catched and wrapped in a TransactionRolledbackLocalException.
    I need to manage TransactionRolledbackLocalException because I must identify what causes the exception and re-throws the correct exception
    Thanks

    The EJB spec defines two kinds of exceptions : system exceptions and application exceptions. System exceptions are considered severe errors that are not recoverable. If you throw a RuntimeException it will be considered a system exception and will result in an EJBException being delivered to the caller. In this case the exception thrown from the bean code is not necessarily visible to the caller, even in the exception chain. If you want to deliver a specific exception to the caller "as is" then throw an Application Exception. You can do that by throwing any exception that subclasses java.lang.Exception. You can also take a user-defined class that extends RuntimeException and annotate it with @javax.ejb.ApplicationException to have it treated as an Application Exception by the container.

  • How to handle more records in jsp page

    i have some 1000 records in an collection( arraylist or iterator or any collection object) , for examples query returns records to me with resultset.
    i want to display 50 records each time per page
    how to display them and how to control the flow.
    plz give me any codes if possible...
    thanks all
    Message was edited by:
    BURAK
    Message was edited by:
    BURAK

    sorry I can't understand you, can you please explain it or post here any codes about it?

Maybe you are looking for

  • Need to convert to .img file

    I have an image, currently in .bmp format, but can be changed to .jpg or .tiff. I need to convert it to .img. I'm running CS6 on a Mac.

  • Error while importing music in iMovie 09 from iTunes 09

    Dear All, I need you help to solve a problem that drives me crazy. I have been working on a new projects for countless hours and had a lot of fun so far. This morning I updated the iTunes software and since then adding music seems impossible. The "+"

  • Problem while parsing xmlString in jsp using JSTL

    HI, I am not able to display data in jsp page that I have stored in string variable in XML form. I want to print xmlString data in jsp using jstl. probably i might have to parse it but i don't have idea . Can any one help me PLZ??

  • Safari launch and Flash problems

    Safari seems to crash at random times or not function well with certain Web sites. This is what has been happening so far... 1. It takes about 30 to 45 seconds for Safari to launch. 2. Sometimes after launching, Safari crashes immediately after a bla

  • TC powers on then off

    My time capsule powers on and flashes the amber light and I can hear it starting up but after about 5 seconds it powers down.  Any idea what the problem is? If I reset my TC will I lose all my data? Also, if indeed my TC has failed can I recover the