Servlet POST response

Hi,
I am looking for a solution for following problem.
Step 1) Browser calls Servlet 1
Step2) Servlet 1 does a post to Servlet 2
i require that servlet 2 response to directly go to the browser has it is a HTML page with images.
Could any one please suggest me a solution for this.

does servlet1 really have to do a post? It seems to me like you want to do a forward in stead. You can do that like this:
RequestDispatcher rd = request.getRequestDispatcher("/Servlet2");
rd.forward(request, response);
return;A forward will transfer control to the servlet (or JSP) you forward to while keeping the current request and response as they are. This means that any parameters submitted to Servlet1 will also be available in Servlet2.
i require that servlet 2 response to directly go to the browser has it is a HTML page with imagesI don't understand what you are asking here... you want to output HTML to the browser from within Servlet2?

Similar Messages

  • Initialization Error: Failed to read POST response

    Guys,
    I need help, I am cloning ,y PROD DB to a test environment, I did first using my test database and it worked, but running with my PROD failed.
    I am using OEMGrid Control, Wind2003, DBOracle9i, I am trying to connect using OEMGC and when start trasnfering "One datafile" via HTTP (I guess is the temp file) fialed with the error: Initialization Error: Failed to read POST response.
    Please does anybody have a little idea what could happen?...please I need some guide...I will appreciate so much....Thanks
    I tried looking for the error I the only I got was the follwoing:...It looks like a patch
    Subject: Oracle Enterprise Manager Management Agent Patch Set Notes for Windows 10g Release 2 (10.2.0.2)
    Doc ID: Note:375161.1 Type: README
    Last Revision Date: 01-AUG-2006 Status: ARCHIVED
    Skip Headers
    Oracle® Enterprise Manager Management Agent Patch Set Notes for Windows
    10g Release 2 (10.2.0.2)
    B31109-01

    What is the size of the data file which fails during transfer? I could find one reference on Metalink where the large file size (6GB) resulted in this error but that is in Oracle 10g.

  • "failed to read POST response"  when adding a standby database

    Hello everybody,
    I've got a problem ...
    I try to create a standby db using the Oracle Grid Manager. When running the job, it is broken in step "httpOneDatafile" with message "failed to read POST response".
    In metalink, I found the one-off patch 6670069. As it is only applicable to Oracle agent 10.2.0.4, I've de-installed the agent 10.2.0.5 and tried to install patch 6670069 to this version, but all I get is this error:
    Prerequisite check "CheckApplicable" failed.
    The details are:
    Patch 6670069: Required component(s) missing : [ oracle.sysman.top.agent, 10.2.0.4.0 ]
    ApplySession failed during prerequisite checks: Prerequisite check "CheckApplicable" failed.
    I tried with different ORACLE_HOMEs (<path_to_db_home> or <agent_home>) and different PATH (<path_to_db_home>/bin or <agent_home>/bin) variables, but anytime, I get the same message when trying to patch the agent.
    Does someone have an idea, what's going wrong?
    Environment:
    Primary Database : 10.2.0.4 on HPUX 64 Itanium
    Standby DB: 10.2.0.4 on HPUX 64 PA-Risc (this combination is ok as we used it in a former config with two 10.2.0.2 DBs for the last 2 years...)
    Oracle agents: 10.2.0.3 up to 10.2.0.5
    As I'm trying for 1 week now, any (ANY!) idea is very welcome...
    Regards,
    Roland

    JVM is probably not the correct forum for this post. JVM is for issues related to the RDBMS resident Oracle proprietary java VM, which isn't involved in what you are doing here.

  • Code for displaying the word doc file from servlet as response.

    Hi can any provide me code for displaying the word document form servlet as response.
    here i have file from file it should ale to read them and display it.
    i have written code but the proble here is in displaying.it ios as not showing as word.can any one help me here
    vijay

    Are we talking of HTTP?
    If yes, you'll need to provide an appropriate content-type and use the binary output stream.
    IE does not trust the content-type header but relies upon the file name, so set it too.
    response.setHeader( "Content-Disposition", "attachment; filename=" etc. Edited by: BIJ001 on Oct 22, 2007 10:10 AM

  • Parameters are corrupted in Servlet  Post method  Why

    Arguement from Client is
    "This is my Test"
    But in the servlet the output is
    STRING BUFFER�&#966; &#9827;t &#9835;This is a Test
    Applet Code is
    URL url =new URL("http://localhost:8080/portal/servlet/com.kbs.framework.client.gui.ReportServlet");
    HttpURLConnection servletConnection = (HttpURLConnection)url.openConnection();
    servletConnection.setDoInput(true);
    servletConnection.setDoOutput(true);
    servletConnection.setUseCaches(false);
    servletConnection.setDefaultUseCaches(false);
    servletConnection.setRequestMethod("POST");
    servletConnection.setRequestProperty("Content-type","application/octet-stream");
    servletConnection.addRequestProperty("COMMAND" ,"test");
    servletConnection.setRequestProperty("COMMAND" ,"tes");
    ObjectOutputStream outStream =
    new ObjectOutputStream(servletConnection.getOutputStream());
    System.out.println("CLIENT COMMAND" + command.trim());
    outStream.writeObject("This is a Test");
    outStream.flush();
    outStream.close();
    Servlet Post method
    try
    System.out.println("**********************************************");
    System.out.println("COMMAND IS" + request.getParameter("COMMAND"));
    InputStream requestInputStream = request.getInputStream();
    System.out.println("REQUEST INPUT STREAM" + requestInputStream);
    InputStreamReader isr = new InputStreamReader(requestInputStream);
    System.out.println("REQUEST INPUT STREAM ReaDER" + isr);
    BufferedReader br = new BufferedReader(isr);
    System.out.println("BUFFERED READER" + br);
    String line = "";
    StringBuffer sb= new StringBuffer();
    while ((line = br.readLine()) != null)
         sb.append(line);
         br.close();
    System.out.println("STRING BUFFER" + sb.toString()); // display the input Stream

    My guess is that you wrote the String "THIS IS A TEST" as a serializable object but tried to read it as character text.
    ObjectOutputStream outStream =
    new ObjectOutputStream(servletConnection.getOutputStream());
    outStream.writeObject("This is a Test");Serializing an Object stores extra data so that the Object can re-instantiated and it is this extra data that you are seeing.

  • Displaying japanese chars using servlet (posted in Java programming too)

    I am trying to display the japanese characters inputed by the user using
    html form and I am using servlet...
    After reading the input and when i try to display i get ????
    how can i solve this.
    It was originally posted in Java Programming forum. but i think the question suits here....heres the link for original post
    http://forum.java.sun.com/thread.jspa?threadID=670419&tstart=0
    sorry for posts at two different forums

    After reading the input and when i try to displayDisplay on what?
    Usually, if request.getCharacterEncoding() doesn't return viable result, then you should call
    request.setCharacterEncoding() with a proper value. If user send Shift_JIS string as form
    input, then the argument value should be also "Shift_JIS". When in doubt, use "UTF-8".
    Then, you call response.setContentType("text/html; charset="Shift_JIS"), etc.

  • CharConversionException during Servlet Post method - Need fix.

    XML request message using HTTP POST is received by the Servlet interface.
    While we are reading and trying to parse the InputStreamObject, we are getting the following error message.
    doPost java.io.CharConversionException: Characters larger than 4 bytes are not supported: byte 0x8e implies a length of more than 4 bytes
    It looks like we are receiving some invalid Non-ASCII characters in the XML message.
    The above error is thrown intermittently.
    Whenever we have this CharConversionException, the servlet gets corrupted and it impacts few good xml messages that follows after the error.
    I need to know the following:
    1. How to fix this exception and skip the bad message?
    2. Is it possible to log the entire xml message in the catch block, whenever we have this exception?
    NOTE: we tried different ways, not able to print the xml message, as the inputstream seems to be closed/null, when it reaches the catch block.
    Tried the below code , but the servlet process/thread hungs and throws the below error:
    Thread "WebContainer : 3" (00000028) has been active for 667781 milliseconds and may be hung.  There is/are 1 thread(s) in total in the server that may be hung.
    Below is the code snippet:
    public void doPost(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {
              response.setContentType("text/xml");
              request.setCharacterEncoding("ISO-8859-1");
              OutputStream out = response.getOutputStream();
              InputStream inputStream=null;
              InputStream inputStreamTemp=null;
              try {
                   // Create a new file upload handler
                   ServletFileUpload upload = new ServletFileUpload();
                        // Parse the request
                        FileItemIterator iter = null;
                        iter = upload.getItemIterator(request);
                        while (iter.hasNext()) {
                             FileItemStream item = iter.next();
                             String name = item.getFieldName();
                             inputStream = item.openStream();
                             inputStreamTemp=inputStream;
                             // we are trying to process the input stream
                             processXml(inputStream);
    catch(CharConversionException charConversionException){
                   this.logger.error(charConversionException);
                   if(inputStreamTemp !=null){
                        logSlurp(inputStreamTemp,logger);
    private static void logSlurp(InputStream in, Log logger) throws IOException {
              StringBuffer out = new StringBuffer();
              byte[] b = new byte[in.available()];
              for (int n; (n = in.read(b)) != -1;) {
                   out.append(new String(b, 0, n));
              if (logger.isInfoEnabled()) {
                   logger.info(out.toString());
    Need any help to fix the issue we are facing? Issue of either fixing/overcoming the actual exception and printing out the entire xml message(bad one) in ours log
    during the catch block.
    Thanks a lot.

    Which line is the exception coming from?
    It seems that your content type is UTF-8, even though you're sending LATIN-1 data.
    Also, your "inputStreamTemp" is a redundant variable.

  • Forwarding A Servlet Post Variables

    Hello, I'm trying to forward some posted variables from form A to this servlet where I am adding one more then forwarding it on. How can I get it to forward and show up in the URL window instead of how I'm doing it here with the servlet context?
    package com.shoponlinesecure.order;
       import java.io.*;
       import javax.servlet.*;
       import javax.servlet.http.*;
       import java.util.*;
       public class AddHashAndForward extends HttpServlet {
          public void doPost(HttpServletRequest request,
          HttpServletResponse response)throws ServletException, IOException {
             response.setContentType("text/html");
             PrintWriter out = response.getWriter();
             HttpSession session = request.getSession(true);
            out.write(AuthorizeNetFingerPrint.insertFP("wil481306225","AMONaKPAIXGdLUgB","10.50",
            "789", null));
            out.close();
            RequestDispatcher dispatcher =
            getServletContext().getRequestDispatcher("https://secure.authorize.net/gateway/transact.dll");
            dispatcher.forward(request, response);
          }-thanks

    This is basically what I'm trying to do in java without any javascript. They have this thing as you can see called a <%ret variable%> that only gets executed when you hit the submit button. I'm trying to do it the way I am becuase I do not want to use javascript to simulate the asp ret variable. So I thought I forwarded it to a servlet that added it then forwarded it to the gateway I would be ok?
    Example 1 � Minimum requirements for requesting a Payment Form
    The following HTML code along with the server-side script represents the minimum data that would need to be inserted into a page to provide a connection to the system. It shows that the fingerprint, time stamp, and the sequence number are inserted into the HTML form POST along with Login ID and other required fields. The result of this HTML code snippet is a button. Clicking on the button will take the user to the gateway�s Payment Form.
    A call to generate the fingerprint should be made when the button is clicked and before the Payment Form request is made to the gateway. A sequence number should be generated and the total amount of the tranaction calculated before the call to generate the fingerprint is made. The function used to generate the fingerprint takes these fields (amount, transaction key, Login ID, and sequence number) The transaction amount should not change after the fingerprint is generated. All trailing spaces need to be removed from the fields used to generate the fingerprint
    <!--#INCLUDE FILE="simlib.asp"-->
    <FORM METHOD=POST ACTION="https://secure.authorize.net/gateway/transact.dll">
    <% ret = InsertFP (loginid, txnkey, amount, sequence) %>
    <INPUT TYPE=HIDDEN NAME="x_login" VALUE="your login ID goes here">
    <INPUT TYPE=HIDDEN NAME="x_show_form" VALUE="PAYMENT_FORM">
    <INPUT TYPE=HIDDEN NAME="x_amount" VALUE="amount goes here">
    <INPUT TYPE=SUBMIT VALUE="Click here for secure payment form">
    </FORM>
    The function InsertFP is provided by the gateway and can be downloaded from the Merchant Interface. This function must be called within a server-side script on the merchant Web server. The above example shows the call being made in an ASP scripting environment.

  • Servlets + Post method

    Please help. I've created a servlet that sends the client a different response depending on the item that they clicked. The item sends a parameter to the servlet, and the servlet then sends the response depending on the item.
    Here's the code. What am I doing wrong? It doesn't seem to recognize the parameters sent.
    the client side has a link of to the following items:
    Item 1
    Item 2
    The servlets main code is as follows:
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    HttpSession session = request.getSession(true);
    out.println("<html>");
    String value = request.getParameter("reqtype");
    if (value == "1")
    out.println("<img src='1.gif' align='center'>");
    if (value == "2")
    out.println("<img src='2.gif' align='center'>");
    out.println(request.getParameter("value"));
    out.println("</body></html>");
    Please help!!!

    There is no parameter named "value" in you request!
    Your link must be something like :
    servert?reqtype=1&value=you_value
    regardsHi,
    The parameter value was a typo(on my post for help), i ment to type:
    out.println(request.getParameter("reqtype")).
    So basically my html page has a link to:
    Item A
    My servlet then has a
    String value = request.getParameter("reqtype");
    if (value == "1")
    { out.println("Item 1"); }
    The out.println(request.getParameter("reqtype")); part near the end of the code simply writes the outs the parameter i've requested, which it does. It outputs 1 in the html page.
    But it doesn't meet the if condition i've set out.
    Do I have to conver the String value = request.getParameter("reqtype") into a different data type? do I need to decode it, cause I'm thinking theres a trailing space or something there that I can't see.
    Please help me. I've been working flat out on this thing for over a day!
    Thanks

  • Exporting a PDF from an ATG servlet: IllegalStateException: Response already committed

    High-level question
    When a custom servlet in my ATG servlet pipeline writes a PDF document into the HTTP response output stream, although the PDF is delivered to the user's client browser successfully, an error is logged on the server: Servlet failed with Exception  java.lang.IllegalStateException: Response already committed".  Why does this occur?
    Details
    My ATG 10.1.2 application has a requirement to be able to generate and return to the client browser a PDF document when a particular button on the site is clicked.
    Although I'm not sure whether or not it's an ATG best practice, the approach that I landed on for this was to insert a new custom servlet, "PdfExportServlet", into the ATG servlet pipeline.  The PdfExportServlet, for requests that it determines are PDF requests and decides to handle, generates the PDF content (using the Jasper Reports engine), and writes the PDF content to the HTTP response output stream.  Here's the relevant portion of the code:
    response.setContentType("application/pdf");
    // (...Code that generates a JasperPrint object with the PDF content...)
    final byte[] pdfBinaryContent = JasperExportManager.exportReportToPdf(jasperPrint);
    response.setContentLength(pdfBinaryContent.length);
    final ServletOutputStream outputStream = response.getOutputStream();
    outputStream.write(pdfBinaryContent);
    outputStream.flush();
    outputStream.close();
    This works fine, and the PDF does display in the client browser.  However, an error is also logged in the application's log file on the server:
    <WL-101020> <[ServletContext@1369332778[app:storeFront module:shop path:/shop spec-version:2.5]] Servlet failed with Exception
    java.lang.IllegalStateException: Response already committed
        at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1631)
        at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:637)
        at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:602)
        at weblogic.servlet.FileServlet.findSource(FileServlet.java:269)
        at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:191)
        at weblogic.servlet.FileServlet.service(FileServlet.java:173)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        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:301)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at atg.servlet.GenericFilterService.doFilterChain(GenericFilterService.java:621)
    A frustrating thing about this error which had made it difficult to troubleshoot is that it does not occur on my local development PC; this log message only appears when the application is running on one of our pre-production or production servers.  This has made trying to rapidly iterate through multiple possible solutions problematic, as each change to the code requires a fresh deployment to our shared pre-production server, which is time-consuming.
    I have tried the following variations on the above code, neither of which has produced a change in the manifestation of the issue (the error message appearing in the log):
    Added a call to response.flushBuffer() after the call to outputStream.close(), on the theory that this might serve to notify downstream servlets that the request has already been committed and no further attempts to modify and/or commit the request should be made.
    Removed the calls to outputStream.flush() and outputStream.close(), on the theory that some downstream servlet pipeline member (TailPipelineServlet?) might be responsible for closing out the outputStream, and trying to do that prematurely was responsible for the error.
    I also so far haven't found anything relevant in the ATG/Oracle documentation that might provide a clue as to what's going on here, or what the general best practice is regarding having a custom servlet in the ATG pipeline that outputs to the response's outputStream.
    Any advice regarding the root cause of this error and/or what should be done to fix it would be most welcome!
    Thanks,
    -Jon

    Here's the full stack trace from the log (which includes the PdfExportServlet):
    <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1386007041311> <WL-101020> <[ServletContext@1369332778[app:storeFront module:shop path:/shop spec-version:2.5]] Servlet failed with Exception
    java.lang.IllegalStateException: Response already committed
    at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1631)
    at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:637)
    at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:602)
    at weblogic.servlet.FileServlet.findSource(FileServlet.java:269)
    at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:191)
    at weblogic.servlet.FileServlet.service(FileServlet.java:173)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    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:301)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at atg.servlet.GenericFilterService.doFilterChain(GenericFilterService.java:621)
    at atg.servlet.GenericFilterService.handleDoFilter(GenericFilterService.java:484)
    at atg.servlet.GenericFilterService.doFilter(GenericFilterService.java:431)
    at atg.filter.ConditionalDelegatingFilter.doFilter(ConditionalDelegatingFilter.java:113)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at atg.service.configuration.ResponseWrappingConfiguration.invokeFilterChainWithPossibleWrapping(ResponseWrappingConfiguration.java:457)
    at atg.servlet.pipeline.TailPipelineServlet.service(TailPipelineServlet.java:174)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at com.mycompany.purchase.PdfExportServlet.service(PdfExportServlet.java:73)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.DispatcherPipelineServletImpl.service(DispatcherPipelineServletImpl.java:275)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.endeca.assembler.AssemblerPipelineServlet.service(AssemblerPipelineServlet.java:442)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.http.CookieBufferServlet.service(CookieBufferServlet.java:119)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.ExpiredPasswordServlet.service(ExpiredPasswordServlet.java:378)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.MimeTyperPipelineServlet.service(MimeTyperPipelineServlet.java:228)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:657)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.commerce.order.CommerceCommandServlet.service(CommerceCommandServlet.java:150)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.commerce.promotion.PromotionServlet.service(PromotionServlet.java:213)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:320)
    at com.mycompany.browse.EndecaSessionStateTrackerServlet.service(EndecaSessionStateTrackerServlet.java:97)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.AccessControlServlet.service(AccessControlServlet.java:696)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.sessionsaver.SessionSaverServlet.service(SessionSaverServlet.java:2447)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.PageEventTriggerPipelineServlet.service(PageEventTriggerPipelineServlet.java:191)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.multisite.SiteSessionEventTriggerPipelineServlet.service(SiteSessionEventTriggerPipelineServlet.java:161)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.SessionEventTrigger.service(SessionEventTrigger.java:512)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.ProfilePropertyServlet.service(ProfilePropertyServlet.java:230)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at com.mycompany.servlet.pipeline.ThreadNameServlet.service(ThreadNameServlet.java:89)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.userprofiling.ProfileRequestServlet.service(ProfileRequestServlet.java:460)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.DynamoPipelineServlet.service(DynamoPipelineServlet.java:491)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.URLArgumentPipelineServlet.service(URLArgumentPipelineServlet.java:302)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.PathAuthenticationPipelineServlet.service(PathAuthenticationPipelineServlet.java:392)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.security.ThreadUserBinderServlet.service(ThreadUserBinderServlet.java:113)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.dtm.TransactionPipelineServlet.service(TransactionPipelineServlet.java:234)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.SecurityServlet.service(SecurityServlet.java:195)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.multisite.SiteContextPipelineServlet.service(SiteContextPipelineServlet.java:448)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.HeadPipelineServlet.passRequest(HeadPipelineServlet.java:1271)
    at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:952)
    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:272)
    at atg.filter.dspjsp.PageFilter.innerDoFilter(PageFilter.java:349)
    at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:208)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3739)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3705)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2282)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2181)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

  • Send(email)  method  is delaying servlet's response

    hello ,
    i have a servlet that store a message in the DB ,
    after the message was stored ,
    a requestDispatcher is called to forward to the "msg sent" screen.
    than there is method that makes a call to an ejb method to send the msg via email like....
    user_message msg = dispatcher.getMessage();
    persister.store(Message);
    request.getRequestDispatcher("/msgSent.jsp").forward(request,response);
    Mailer.sendNotification(msg.destination.email);
    the problem is : even though i called to the request dispatcher it doesnt forward the message till
    the mail server sends a - 250 OK
    is there a way to solve it without storing data ..?

    You've stored the message in the DB? Does that include all the sender & receiver info?
    If it does you could probably have a thread (started on application startup) whose job it is to pick up messages added to the queue and to send them.
    It is something that worked really well at my last job. The page submits with the request to send the message. Because the message required a lot of processing we stuck the message data on a queue with a NOTPROCESSED status. The thread woke up every ten seconds and grabbed the top ten NOTPROCESSED message (changing status to PROCESSING) and processed them. In the meantime, the page had returned to the user and the sending entity had a status of "sending".
    We found that acceptable where a synchronous processing would take a while and page responsiveness is important.
    Another option is to submit the page but also rewrite the current page with javascript or somesuch. You can display a message "sending, page will reload when sent" or somesuch. I've seen it done elsewhere. I think there is another way to do it but don't know enough to comment on that.
    Mark

  • Internal servlet error :response has already been commited

    Does anyone knows what this error message means and how to solve the problem ? ?

    Hi,
    I am using struts framework, I do have a module export to excel, where in some big Mb's of data can be exported to excel by a client. As part o the implementation I have an action which calls a DAO object. This DAO object dumbs the whole data to excel File. The action picks up this file and writes the whole thing to the ServletOutputStream. In the logs I am finding a Response Already commited exception
    " [6/22/06 6:24:09:830 EDT] 110d2e6a WebGroup E SRVE0026E: [Servlet Error]-[Cannot forward. Response already committed. &#40;Servlet 2.3, SRV 8.4&#41;]: javax.servlet.ServletException: Cannot forward. Response already committed. (Servlet 2.3, SRV 8.4)
    I fear this is causing memory leaks and eating up the whole CPU resources on the web-server, which is causing us to restart the JVM frequently.
    Can any one help me in fixing this issue.
    Thanks and Regards,
    Hari
    The code which downloads the excel file is :
    ========================================================
    private void downLoadTheExcelFile(String fileName, HttpServletResponse response) throws IOException {
    FileInputStream inputStream = new FileInputStream(fileName);
    boolean flag = true;
    response.setHeader("Content-Disposition", "attachment;filename=ECOMatrix.xls");
    response.setContentType("application/vnd.ms-excel");
    char c = '\u5000';
    ServletOutputStream servletOutputStream = response.getOutputStream();
    BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(servletOutputStream);
    int abyte0 = 0;
    while ((abyte0=inputStream.read()) != -1) {
    bufferedOutputStream.write(abyte0);
    inputStream.close();
    bufferedOutputStream.flush();
    File file = new File(fileName);
    file.delete();
    /* /opt/httpd/logs/apps/ecom/ecom-9962/EcoMatrix1141911660345.xls */
    ========================================================

  • Error while trying to get an HTTP POST response

    Hi everyone,
    I'm coding a simple client to download some information from a local machine in my LAN.
    I have to do this with an http post request.
    When i try to parse the http response the program catch an exception, this one:
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(...)
    the parameter is a JSON request, and of course the response is a JSON formatted.
    i put the http request code:
    import java.io.BufferedInputStream;
    import java.io.BufferedReader;
    import java.io.ByteArrayOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.HttpURLConnection;
    import java.net.URL;
    public class HttpDownloaderThread  extends Thread{
         private String url;
            private String param;
         private HttpDownloadListener listener;
         private HttpURLConnection connection=null;
         private InputStream is;
            private OutputStreamWriter wr;
         public HttpDownloaderThread(String _url,String param, HttpDownloadListener _listener){
              url = _url;
              listener = _listener;
                    this.param=param;
         public void run(){
              try{
                   connection=(HttpURLConnection)new URL(url).openConnection();
                            connection.setRequestMethod("POST");
                            connection.setReadTimeout(5000);
                            connection.setRequestProperty("Content-Type", "application/jsonrequest");
                            connection.setDoOutput(true);
                            wr = new OutputStreamWriter(connection.getOutputStream());
                            wr.write(param, 0, param.length());
                            wr.flush();
                            int responseCode=0;
                   System.out.println();
                            try{
                             responseCode= connection.getResponseCode();
                            }catch(Exception e){
                                e.printStackTrace();
                   if (responseCode == HttpURLConnection.HTTP_OK){
                        is = connection.getInputStream();
                                     BufferedReader rd = new BufferedReader(new InputStreamReader(is));
                                    String line;
                                    while ((line = rd.readLine()) != null) {
                                        System.out.println(line);
                        closeHttpConnection();
                        listener.resourceDownloaded(url, null);
                                else{
                                closeHttpConnection();
                                listener.downloadFailed(url, new Exception("Http error: " + Integer.toString(responseCode)));
              }catch(Exception e){
                   e.printStackTrace();
                   listener.downloadFailed(url, e);
              }finally{
         public void closeHttpConnection(){
              if (is != null){
                   try{
                        is.close();
                                    wr.close();
                   }catch (Exception e){
                   }finally{
                        is = null;
                                    wr=null;
              if (connection != null){
                   try{
                        connection.disconnect();
                   }catch (Exception e){
                   }finally{
                        connection = null;
    }there's someone who know's why??
    Thanks to everyone :)
    Thomas.

    Hi Vincent,
    according to your script,it seems like you are trying to connect to Exchange Online?
    If so these as to be installed on your computer:
    http://go.microsoft.com/fwlink/?LinkId=286152
    http://go.microsoft.com/fwlink/p/?linkid=236297
    Reboot and run this command as one line:
    Set-ExecutionPolicy RemoteSigned
    $LiveCred = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $LiveCred -Authentication Basic -AllowRedirection
    $Import = Import-Pssession $Session -AllowClobber
    Import-Module MSOnline -verbose
    Connect-MSOLservice -Credential $LiveCred
    Hope this helped
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work

  • My Post Response

    I love the new Discussion board feel. It has a "Macish" feel, which the previous board didn't have. I am thankful for Apple's hard work in fixing the bugs so quickly, most companies I find don't do that. I am glad for the time being they took off reputations even though it is because of the updates. I noticed that people might have been putting responses to threads just for points where as now it does not matter.
    There is one thing though that does bother me. It is the My Post and whether someone has responded to a thread or not. I understand the circle system, but I don't understand why every time I respond, it shows up like it is a totally new thread. The other thing is that it counts me as a new response so no one else might have responded but since I did, it shows up as a new response. I know that might sound a little confusing, so bare with me. If someone responds to this thread and I respond because I see the half circle. The half circle remains because I responded even though I know I posted the message. It shows up on My Post as a new thread, with a half circle. Anyone know what I mean and are maybe aggravated by this? Is there any solutions to this? Was it like that with the old Discussion board?
    Just curious,
    Jon
    PS I give credit to Apple, I believe they are the ones working on this. Also this is a .jspa, which I believe is a Java Blog/Forum. Was the other Discussion the same way?

    In the previous boards, a message you made was displayed shortly after posting, and wouldn't be considered new for you by the servers once that had been done. Therefore, it would only appear as new if you clicked on the My Posts link between the time the servers processed the post and the time the post was sent back to you. Currently, a reply you make isn't automatically displayed afterwards due to the sparse page which appears afterwards, so it will appear as new in My Posts until you view the thread again.
    The current boards run on Jive, while the older ones used WebCrossing.
    (9500)

  • Can't post response, get error

    I Keep getting an Error stating that "your content could not be saved due to an error"  and then to contact my system administrator? Says I might have been logged out, but I am definitely. Showing as logged in and it was a copy paste answer from earlier When I got the error An saved my response.
    i have tried both a windows machine running ie, and my ipad fully updated. Still same error.
    Any ideas why this is?
    Thanks
    jason

    Hi, After I downloaded the Safari 7.1 update, I cannot post a new question here in Apple Discussions, so I'm having to tag into a previous conversation, as that's the only way to get my question in here. Every time I've tried to post, I get the message: "Your content could not be saved due to an error. You might have been logged out. If this problem persists, please contact your system administrator." I have been logged in each time. I have no idea what this error message means. Who is my system administrator? I cannot go to Apple Support directly because I have an iMac Early 2009 and my Apple Care coverage expired long ago. I checked the subject line for length, but it was on the shorter side. Can you help? Thank you very much in advance for your help. My iMac desktop is running OS X Yosemite 10.10

Maybe you are looking for

  • Multiple channels in one task with ch to ch config

    Hi, Normally the way I acquire sample from more than one channel on a cDAQ system is like this: 1, I create virtual channels for my AIs in MAX 2, in LabVIEW I use channel constants and merging them using comma as a separator (eg. with the concatenate

  • My Setting, Contacts and reminders has stopped working.  I am on IOS5

    Settings, reminders, contacts have stopped working.  settings opens but locks up.  Reminders and contacts open but there is nothing there.

  • Database adapter and column aliases in the select statement (10.1.3.1)

    Hi, Is it possible to use column aliases in the select statement for a database adapter to return an xml element name which is different to the column in the queried table? I have tried using SELECT EMPLOYEE_ID, FIRST_NAME AS MYNAME, LAST_NAME, SALAR

  • How to decompose a string with ';' into Internal table

    Hello all, I need your help for find a Function module or Abap code. I have a file with the separator is the ';' Example of the contains of my file : 521010;16;46048,00;;*Soucet*Odmena za 524012;41;103807,00;;Zdrav.p.organizace 524012;42;;18332,00;Zd

  • Applying one video filter to multiple clips

    How do I apply just one video filter to multiple clips on a timeline in FCP7? "Copy and paste attributes" does not give me the control to select just one filter to apply, for example there is a color corrector and sharpen filter in the copied clip an