Servlet chaining possibility

Hi, A reply to one of the earlier messages, says "servlet chaining is currently not available". does it mean it would be available in future versions or do we have support for it in any of the currently available, recently released versions?
          

i just wondering, why you want to chain the servlets in what way, is that
          the servlet application is in someway already chained in by itself.
          it would be little use in my mind to have chained servlet.
          just my opinon
          Frank
          Mahesha <[email protected]> wrote in message
          news:40d8c8fc$1@mktnews1...
          > Hi, A reply to one of the earlier messages, says "servlet chaining is
          currently not available". does it mean it would be available in future
          versions or do we have support for it in any of the currently available,
          recently released versions?
          

Similar Messages

  • How to Configure a Servlet Chain Using MIME Types with weblogic5.1?

    Hi ,
              I want to configure a servlet(cocoon) in weblogic 5.1 such that the
              servlet so configured is invoked each
              time a response with the mime-type "text/xml" is generated.
              1.) will weblogic support to configure a servlet with a particular
              mime-type so that it post-process any
              servlet's response with the corresponding mime-type?
              2.) if not what is the alternative?
              Thanks
              sumanth
              [sumo.vcf]
              

    We suggest that use the request dispatcher interface instead. Servlet
              chaining is not a standard's based possibility.
              Michael Girdley
              WLS Product Manager
              Sumanth Chinthagunta <[email protected]> wrote in message
              news:[email protected]..
              > Hi ,
              > I want to configure a servlet(cocoon) in weblogic 5.1 such that the
              > servlet so configured is invoked each
              > time a response with the mime-type "text/xml" is generated.
              > 1.) will weblogic support to configure a servlet with a particular
              > mime-type so that it post-process any
              > servlet's response with the corresponding mime-type?
              > 2.) if not what is the alternative?
              >
              > Thanks
              > sumanth
              >
              

  • Servlet chaining problem..

    import java.io.*;
        import javax.servlet.*;
        import javax.servlet.http.*;
        public class Deblink extends HttpServlet {
          public void doGet(HttpServletRequest req, HttpServletResponse res)
                                       throws ServletException, IOException {
            String contentType = req.getContentType();  // get the incoming type
            if (contentType == null) return;  // nothing incoming, nothing to do
            res.setContentType(contentType);  // set outgoing type to be incoming type
            PrintWriter out = res.getWriter();
            BufferedReader in = req.getReader();
            String line = null;
            while ((line = in.readLine()) != null) {
              line = replace(line, "<BLINK>", "");
              line = replace(line, "</BLINK>", "");
              out.println(line);
          public void doPost(HttpServletRequest req, HttpServletResponse res)
                                        throws ServletException, IOException {
            doGet(req, res);
          private String replace(String line, String oldString, String newString) {
            int index = 0;
            while ((index = line.indexOf(oldString, index)) >= 0) {
              // Replace the old string with the new string (inefficiently)
              line = line.substring(0, index) +
                     newString +
                     line.substring(index + oldString.length());
              index += newString.length();
            return line;
    What is pre request fo above code to work.
    I had tried this many time but it is not working, what will be calling servlet look like

    And can you explain why your title is "Servlet chaining problem"?

  • Servlet Chaining and OAS 4.0.8.1

    I am using the Request Dispatcher Concept for my application where a servlet either initiates a bean or calls another servlet. I believe I cannot test it from JDeveloper.But does OAS 4.0.8.1 support servlet chaining. Very Critical. if yes? Please let me know where I can find the necessary documentation.
    Thanks

    More info ...
    I enable logging and found the following error
    Unable to initiate threads: cannot find class java/lang/Thread.

  • Does weblogic server have Servlet chaining concept?

    I saw JRun which has the servlet chaining function. Does anyone know how to
              do it in the weblogic server?
              Thank you.
              li
              

    WLS does not support Servlet Chaining
              Kumar
              li wrote:
              > I saw JRun which has the servlet chaining function. Does anyone know how to
              > do it in the weblogic server?
              >
              > Thank you.
              >
              > li
              

  • Can WebLogic do Servlet chaining?

    Is there any way to do servlet chaining, or more specifically, for a servlet
              to process the output of another servlet efficiently in WebLogic?
              Sure a servlet can make another HTTP request on its own servlet engine but
              that seems way too inefficient and heavy handed.
              J.
              James Strachan
              =============
              email: [email protected]
              web: http://www.metastuff.com
              

    Check out XSPs from cocoon. xml.apache.org
              -- bk
              James Strachan wrote:
              > JSP includes go straight to the HTTP response - there's no way of
              > redirecting them to some internal buffer for post processing. (*)
              >
              > I'd like to be able to do simple Servlet chaining at the Servlet or JSP
              > level. i.e. I want to post process the output of one servlet / JSP page to
              > do things like caching or XSL styling. This is a totally reasonable request
              > IMHO. Imagine a complex portal with alot of included JSP files - I'd like to
              > be able to cache whole chunks of the page - a chunk may have many includes
              > inside it..
              >
              > Right now there is no way of doing such a thing in WebLogic AFAIK. You have
              > to go through every JSP file and add caching / styling to it rather than
              > being able to 'pipeline' or 'servlet chain' which is less than ideal. (Also
              > remember there is a 64K code size limit on the bytecode that can exist in a
              > Java class - so JSP files should be kept small to void hitting this
              > barrier). I can't quite believe noone else has hit this problem.
              >
              > There are workarounds such as to do the include using seperate internal HTTP
              > requests, RMI calls or JMS messages all of which seem to be far too
              > heavyweight.
              >
              > (*)
              > <aside>
              > One side effect of the JSP include always going straight to the response
              > means that you can't use WebLogics <cache> tag if you are using any kind of
              > JSP include. e.g. the following snippet doesn't work as expected :-
              >
              > <cache>
              > something
              > <jsp:include file="foo.jsp" flush="true"/>
              > something else
              > </cache>
              >
              > since you are not allowed to do an include inside a body tag,. Even if you
              > were the output of the include goes straight to the response, not the body
              > tag.
              >
              > So you have to close and reopen the cache tags around each include which may
              > break your XML complience for complex pages and is error prone and much more
              > inefficent to boot:-
              >
              > <cache>
              > something
              > </cache>
              > <jsp:include file="foo.jsp" flush="true"/>
              > <cache>
              > something else
              > </cache>
              >
              > </aside>
              >
              > --
              > J.
              >
              > James Strachan
              > =============
              > email: [email protected]
              > web: http://www.metastuff.com
              >
              > "Jaggu Dada" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > Hi --
              > >
              > > Why not use JSP includes? The only servlet "chaining" that is
              > > reasonable
              > > is to use a servlet to process an initial request, and make some
              > > decision
              > > (based on the querystr, for example) then, without having written
              > > anything
              > > back to the client, do a server side redirect (with RequestDispatcher)
              > > to
              > > a servlet or JSP that does some work. If I understand you correctly,
              > > servlets
              > > were not designed to do what you are proposing.
              > >
              > > Hope this helps,
              > >
              > > -jaggu
              > >
              > > James Strachan wrote:
              > > >
              > > > Hi Joe
              > > >
              > > > Thanks for that. Sure that would work too though its probably a heavier
              > > > weight than just plain old HTTP.
              > > >
              > > > I was looking for something a little more lightweight such that I could
              > > > include 10-20 servlet chains per web page on a complex portal without
              > too
              > > > much performance hit. i.e. using synchronous servlet 'pipelining' to
              > > > generate complex pages without having to do many internal HTTP / JMS
              > > > requests.
              > > >
              > > > --
              > > > J.
              > > >
              > > > James Strachan
              > > > =============
              > > > email: [email protected]
              > > > web: http://www.metastuff.com
              > > >
              > > > "Joe Trung" <[email protected]> wrote in message
              > > > news:[email protected]...
              > > > >
              > > > > Hi Jim,
              > > > > I chain my servlets via jms: the queue is output/input bin
              > > > >
              > > > > Joe
              > > > >
              > > > >
              > > > > "James Strachan" <[email protected]> wrote:
              > > > > >Is there any way to do servlet chaining, or more specifically, for a
              > > > servlet
              > > > > >to process the output of another servlet efficiently in WebLogic?
              > > > > >
              > > > > >Sure a servlet can make another HTTP request on its own servlet
              > engine
              > > > but
              > > > > >that seems way too inefficient and heavy handed.
              > > > > >
              > > > > >J.
              > > > > >
              > > > > >James Strachan
              > > > > >=============
              > > > > >email: [email protected]
              > > > > >web: http://www.metastuff.com
              > > > > >
              > > > > >
              > > > > >
              > > > >
              

  • Is servlet chaining (filtering) supported?

    For a given virtual name I would like to set up a chain of servlets
              (ProducerServlet, ConsumerServlet) so that the ServletInputStream of the
              ConsumerServlet contains the results of the ServletOutputStream of the
              ProducerServlet. The ConsumerServlet is in effect 'filtering' the results
              of ProducerServlet.
              eg. BrowserRequest --> ProducerServlet --> ConsumerServlet -->
              BrowserResponse
              Can this be done with WLS 5.1?
              The RequestDispatcher interface does not seem to satisfy these requirements?
              If I understand this interface correctly, it allows requests to be either
              'forwarded' (where the output of the forwarder is not used) or 'included'
              (where the included servlet inserts output in the stream). But it does not
              allow servlets to be connected in a producer-consumer chain.
              Am I missing something?
              Thank you.
              Marko.
              

    Is there any way to achieve the same effect within the current spec?
              Marko.
              Winston Koh <[email protected]> wrote in message
              news:[email protected]...
              > Hey Marko, servlet chaining is not supported in WLS since its a
              proprietary
              > mechanism not specified in the current servlet/jsp specs
              >
              > thanx
              >
              > Winston
              > Marko Milicevic <[email protected]> wrote in message
              > news:[email protected]...
              > > For a given virtual name I would like to set up a chain of servlets
              > > (ProducerServlet, ConsumerServlet) so that the ServletInputStream of the
              > > ConsumerServlet contains the results of the ServletOutputStream of the
              > > ProducerServlet. The ConsumerServlet is in effect 'filtering' the
              results
              > > of ProducerServlet.
              > >
              > > eg. BrowserRequest --> ProducerServlet --> ConsumerServlet -->
              > > BrowserResponse
              > >
              > > Can this be done with WLS 5.1?
              > >
              > > The RequestDispatcher interface does not seem to satisfy these
              > requirements?
              > > If I understand this interface correctly, it allows requests to be
              either
              > > 'forwarded' (where the output of the forwarder is not used) or
              'included'
              > > (where the included servlet inserts output in the stream). But it does
              > not
              > > allow servlets to be connected in a producer-consumer chain.
              > >
              > > Am I missing something?
              > >
              > > Thank you.
              > >
              > > Marko.
              > > .
              > >
              > >
              > >
              >
              >
              

  • Java Servlet BUG (Possibly)-Servlet classname replaces retrieved doc name

    I created a test servlet (TestServlet.java) which reads data from a file which could be pdf/doc/xls/zip etc and presents the file to the user for download. When the user clicks on the save option to save the file the default name before the file extension of the file in the save dialog box is always TestServlet. i.e. If the file being downloaded is BEA.doc the default name in the save dialog box is TestServlet.doc
    The contents of the file(data in the file) are correct but the default name should be BEA.doc and not TestServlet.doc. I get the same result if the file is a pdf/xls or any other file type which is being downloaded.
    We tested this in BEA Weblogic 8.1 and Tomcat and get the same results both places so this issue is not application server specific and seems like a bug to us.
    The TestServlet.java file is below
    package com.test;
    import java.io.*;
    import java.util.*;
    import javax.servlet.http.*;
    public class TestServlet  extends HttpServlet
        private String fileName = "c:/BEA.doc";
        private FileInputStream  rd;
        private ByteArrayOutputStream wr;
        byte[] buf = new byte[8192];    //buffer size
        byte[] fileData;
        public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
            doPost(request,response);     
        public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
            int count = 0;
            try
                File theFile = new File(fileName);
                if (theFile.exists())
                    try
                        rd = new FileInputStream(fileName);
                        wr = new ByteArrayOutputStream();
                        while ((count = rd.read(buf)) > -1)
                            wr.write(buf, 0, count);
                        rd.close();                   
                        fileData = wr.toByteArray();
                        response.setContentType("application/msword");
                        OutputStream sos = response.getOutputStream();
                        sos.write(fileData);
                        sos.flush();
                        sos.close();                  
                    catch(Exception ex)
                        System.out.println(ex.getMessage());
                else
                    response.setContentType("text");
                    response.getWriter().write("no data");
            catch (Exception e)
                e.printStackTrace();       
    } I get the same results. i.e. The name of the document downloaded by the servlet is TestServlet.doc instead of BEA.doc which is what I have in c:\BEA.doc.

    The web browser downloading this knows nothing about the file you are loading from disk and sending via the servlet. All it knows is that it requested via Http on the url TestServlet, and is getting something in return.
    A quick google pulled up this link: http://builder.com.com/5100-6370-1027645.html
    You might try this:
    response.setHeader("Content-Disposition","inline;filename=\"BEA.doc\"");
    good luck,
    evnafets

  • Servlet chaining

    Hi,
    I am having three servlets. First servlet is receiving request
    and after doing some processing it generates html and sends html
    to user. Once user enters all details in requested page(html
    page sent by servlet 1), he presses submit on that html.
    At that time that html is calling another servlet(Servlet 2).
    After receiving request from user, servlet 2 extract parameter
    sent by user. Then it stores extracted parameter to database.
    Depends upon one parameter (sent by user) servlet2 dispatch
    request to servlet3.
    Now I want to convert above servlets into portlet.
    Can anybody tell me how to convert second servlet into portlet.
    Because it is not shown in any page but still it receives
    request. do some processing and send the response to third
    servlet.
    Do I need to change zone and jserv properties file for servlet2?
    Do I need to enter servlet 2 in provider.xml where servlet 1 is
    entered as portlet ?
    Thanks in advance.
    Biren

    Hello,
    What is the version of the weblogic server you are using ?
    Regards
    Anilkumar kari

  • Servlet chaining or reponse filtering

              Does WL6 currently support one of these features? If not, how can I do this under
              WL6?
              

    If not, how can I do this under          >WL6?
              I do this:
              I create one controller servlet. then I create many command classes, they
              have a constructor and one execute(req, res) method, which throws my
              exception.
              in servlet's init(), I load these commands, and put them in hashmap. then in
              service() I call one of the command's execute(req, res) method.
              I have many commands, some of them call each other, put variables in a
              session, analyze requests etc.
              

  • Can a HTML form send data to two servlets?

    I would like to know if an HTML Form can send data to two servlets, I guess I am askin is that can the parameters be passed to two ACTION attributes??

    Hmmmm, well I'm not sure if that is possible, but you could do something of the sort on the server side by chaining them.... the technieque is called Servlet Chaining
    Hope this helps
    Omer

  • How to maintain layout of process chain ?

    Dear all,
    Is maintaining the layout of a process chain possible?
    Since a complicated process chain will be in a state very hard to see with the automatic layout by a system,I am looking for the way of maintaining the layout of process chain.
    Even if a layout is edited legible and it saves it in the edit mode of a process chain, a layout will be changed after coming out from an edit mode once and checks again.
    Best regards,
    Takao

    Hi Takao,
    I have exactly the same problem.
    Does anyone any tricks?
    Regards,
    Daniel

  • How to send array of bytes to a servlet and store it in a file

    Hi,
    How to send array of bytes to a servlet and store it in a file.
    I am new to Servlets. if possible for any one, please provide the code.
    Thanks,
    cmbl

    Through HTTP this is only possible with a POST request of which the encoding type is set to multipart/form-data. You can use Apache Commons FileUpload to parse such a multipart form data request into useable elements. From the other side (the client) you can use a HTML <input type="file"> element or a Java class with Apache Commons PostMethod API.
    You may find this article useful: http://balusc.blogspot.com/2007/11/multipartfilter.html

  • Servlet and JSP in OAS

    I'm developing web application with OAS
    4.0.8.1 and JDeveloper 3.0 and I want to call
    JSP from servlet using "RequestDispatcher".
    I downloaded JSP for OAS from www.olab.com.
    In the Release note, there is a description
    about RequestDispatcher, but I cannot
    understand about details.
    In what configuration can I use servlet and
    JSP together with RequestDispatcher. Anyone
    scceeded about that?
    null

    wan (guest) wrote:
    : Hi everyone,
    : I am using OAS 4.0.8 on Solaris 2.6. After viewing servlet
    : and JSP samples, I am kind of confuse whether OAS supports the
    : following options
    : 1. JSP
    : 2. servlet chaining
    : 3. running JDeveloper DB Servlet wizard
    : (oracle.jdeveloper.servlet.*) and Java Business Objects
    : (oracle.jbo.rt.cs)
    : Thank you for your time.
    I found a white paper 408newfead.pdf, that says under "Future
    Directions" that it will add jsp support. I read somewhere (I
    can't remember where exactly :( ) that said 4.0.8.1 would
    support
    JSPs. I don't know if this release is out yet.
    I wish Oracle would get with the times and put out a product that
    is consistent with the technology they are touting as the
    future.
    Having us download Suns server to run servlets and JSP is
    ridiculous for the worlds second largest software company!
    null

  • RequestDispatcher.forward on OAS 4.0.8.1 for Servlet Communication

    We are unable to pass request information from a servlet to another servlet or a JSP on OAS 4.0.8.1 whereas we have been able to achieve this
    successfully in JDK using the same code.
    Since Servlet Chaining is not supported in the JServlet of OAS, use the forward
    method in the RequestDispatcher object instead.
    RequestDispatcher rd;
    rd =getServletConfig().getServletContext().getRequestDispatcher(/testme1/USe
    rvl
    et);
    rd.forward(request,response);
    It didn't do anything with the forward method and nothing was logged in the log file. Anyone out there, please send help ASAP. Thanks.
    null

    After I fixed some of the things I broke while searching for the wrksf failure, the PL/SQL Cartridge now works for me too. And, after failing to get the DB Browser to work by loading it into the SCOTT schema, I got it to work by loading it into SYS. (SCOTT can't see the DBA_* views so loading the DB Browser into the database failed.) I haven't tried any Java Servlets yet, but that's next on my list.
    If you want to try my wrksf workaround, rather than using Christoph's, here's how you can do it.
    1. Backup liborb.so in the $ORACLE_HOME/orb/4.0/lib directory, just in case something goes wrong.
    2. Using a hex editor, such as emacs hexl-find-file or ghex, to edit liborb.so, find the string "/proc/stat".
    3. Change the directory, "/proc" to something like "/pfoo" and write the shared library file back to liborb.so. You now have the required modified liborb.so.
    4. Make the /pfoo directory and cp /proc/stat /pfoo.
    5. Edit /pfoo/stat and duplicate the first line, which should be the cpu line. This will let the metrics parser handle it. Make sure that /pfoo/stat has read access.
    Of course, the values that the metrics code gets are now bogus, but that does not seem to be a fatal problem.
    Hopefully somebody from Oracle is reading this and the real fix will be in the mail soon.

Maybe you are looking for

  • Channel Value Issue Between Photoshop 6 and CS3

    We use a specialized process that includes Channel operations to make separations for printing. When we use the same process that we have always used in any NEW photoshop, the value are completely different. This is best illustrated by opening a PS5

  • ADF Faces EA15 Demo will not run

    Here is the error that I get (I am using Tomcat 5.0.28): javax.servlet.ServletException: Cannot find FacesContext      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)      org.apache.jasper.runtime.PageContex

  • How to make a record uneditable

    I have a table that contains records that are effective dated. If the record is effective I don't want any field to be modified except for the termination date. I thought I could do this by disabling the elements, but you can change the effective dat

  • Missing Account Name

    After shutting my computer down and restarting it about a half an hour later, my I realized my User name was no longer listed. It's as if it dissappered. I tried booting from the installtion CD in hopes i could maybe reset my password but the only ac

  • Itunes will not import the full song

    my computer crashed a few months ago and ever since then i cant import CDS onto iTunes...the full song. It will download the first 10-14 seconds then quit and move on to the next song. I got really annoyed with that so i thought that i could import t