How to read unix standrad pipe output stream

I want to write some code that will read data from a standard solaris pipe output stream. Please help.
For example
I cat a file in a unix shell
cat /etc/hosts
The output of this file can be piped to another program and I want to write a piece of code that reads that piped data and puts it into a textArea.
Thanks

Here ya go bro.................
This just checks if IO is coming in and if so prints it to the term, but
you get the idea.
There might be an better way but...........
import java.io.*;
class xxx
public static void main(String args[])
byte b[] = new byte[256];
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
if(System.in.available() > 0) {
System.in.read(b);
baos.write(b,0,256);
System.out.println(baos.toString());
else
System.out.println("No pipe being layed");
catch(Throwable t){}

Similar Messages

  • Reading native process standard output stream with ProcessBuilder

    Hi,
    I'd like to launch an native process (windows application) which writes on standard output during its running.
    I'd like to view my application output on a JTextArea on my Java frame (Swing). But I do get all process output
    on text area only when the process is finished (it takes about 20 seconds to complete). My external process is
    launched by using a ProcessBuilder object.
    Here is my code snippet with overridden doInBackground() and process() methods of ProcessBuilder class:
    @Override
    public String doInBackground() {
    jbUpgrade.setEnabled(false);
    ProcessBuilder pb = new ProcessBuilder();
    paramFileName = jtfParameter.getText();
    command = "upgrade";
    try {
    if (!(paramFileName.equals(""))) {
    pb.command(command, jtfRBF.getText(), jtfBaseAddress.getText(), "-param", paramFileName);
    } else {
    pb.command(command, jtfRBF.getText(), jtfBaseAddress.getText());
    pb.directory(new File("."));
    pb.redirectErrorStream(false);
    p = pb.start();
    try {
    InputStream is = p.getInputStream();
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line;
    jtaOutput.setText("");
    while ((line = br.readLine()) != null) {
    publish(line);
    } catch (IOException ex) {
    Logger.getLogger(CVUpgradeFrame.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IOException ex) {
    Logger.getLogger(CVUpgradeFrame.class.getName()).log(Level.SEVERE, null, ex);
    jtaOutput.setText("");
    jtaOutput.setLineWrap(true);
    jtaOutput.append("Cannot execute requested commmad:\n" + pb.command());
    jtaOutput.append("\n");
    jtaOutput.setLineWrap(false);
    return "done";
    @Override
    protected void process(List<String> line) {
    jtaOutput.setLineWrap(true);
    Iterator<String> it = line.iterator();
    while (it.hasNext()) {
    jtaOutput.append(it.next() + newline);
    jtaOutput.repaint();
    //Make sure the new text is visible, even if there
    //was a selection in the text area.
    jtaOutput.setCaretPosition(jtaOutput.getDocument().getLength());
    How can I get my process output stream updated while it is running and not only when finished?
    Thanks,
    jluke

    1) Read the 4 sections of http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html and implement the recommendations. Although it is concerned with Runtime.exec() the recommendations still apply to Process generated by ProcessBuilder.
    2) Read about concurrency in Swing - http://java.sun.com/docs/books/tutorial/uiswing/concurrency/ .
    3) Use SwingUtilities.invokeLater() to update your GUI.

  • Exec() - G77 Fortran blocks read(*,*)  until Java closes output stream.

    This is my first post!
    I have a program in fortran using G77 from GNU. When I start the program and write to the output stream I have to close() the stream for the message to arrive at the other end. G77 seems to need Java to close the stream for the message to be sent.
    Then, the stream is forever closed and can not be re-obtained for subsequent writes.
    I do not need to close() with microsoft fortran. It works fine with a simple flush().
    My code for Microsoft is below, followed by same code for G77:
    Any ideas?
    Disciple285
    // write to stream with Microsoft Fortran
    std_out.println(message);
    std_out.flush();
    // write to stream with G77 Fortran
    std_out.println(message);
    std_out.close();

    Hi:
    The internal OJVM is not affected by your installations of any other Sun JDK on the server.
    So you can not upgrade your internal OJVM without upgrading the entire DB.
    Oracle 10g includes a JDK 1.4 runtime, 11g a 1.5 runtime and so on.
    If you can upgrade your Oracle 9.2.0.8 to a 10g release you can then compile the code, if not you should re-write the code to compile with an standard JDK 1.3 release.
    Best regards, Marcelo.

  • Java Sockets and Output Streams

    Hi All,
    I am beginning sockets programming and I have a problem. If there is a server listening in the background for incoming connections and say for example 4 client programs programs which we shall call client1...client4 connect. How best can I capture the output streams associated with these newly created sockets so that the server can send back isome nformation to say clients1 and client4 only which is not seen by clients 2 and 3. Similarly I would like the server to send some infor to clients 2 and 3 only which is not seen by client1 and client 4.
    Currently I have the server listening part as shown below, but not too sure how to add DISTINCT output streams for 1 and 4 on one hand and 2 and 3 on the other.
    Thanks:
    // bind socket to a port number
    ServerSocket serverSocket = new ServerSocket(portNo);
    // create socket to listen to client connection
    while (true) {
    //listen to an incoming connection
    System.out.println("chatroom server waiting for incoming connections");
    Socket incomingSocket = serverSocket.accept();
    //launch new thread to take care of new connection
    chatRoomThread chatThread = new chatRoomThread(incomingSocket);
    chatThread.start();
    //go back and wait for next connection
    Please help.
    Thanks,
    Bleak

    HouseofHunger wrote:
    yes thats exactly the way I have my in and out streams, in the run method, but that doesn't help me in filtering traffic, in other words I am saying 2 clients, client1 and client4 for example should share a common in and out stream so that they will see eact other's messages... makes sense.....?No, doesn't make sense. That's the wrong design. Each socket should have its own input and output stream (yes, I know, that's been said several times before). If messages going to client1 should also be sent to client4, then whatever writes the messages to client1's output stream must also write them to client4's output stream. Trying to make those two output streams actually be the same output stream is the wrong way to do that. Just have the controller send the messages to whoever is supposed to get them.

  • How to Redirect a Unix program to output to Java not a log

    Hi all!
    Okay, here is what I am trying and I cannot seem to get a handle on where I should start.
    I have a Unix program that basically outputs to a log file when a error occurs. (std_err_file: /Errorfile)
    What I am trying to do is have this entry redirected to a java program that will take the log stream and then use it in some fashion. Perhaps (std_err_file: >java readlog Errorfile)? Not sure if this will work, and I need to get a better understanding of what type of stream to use to read this data.
    Can anyone give me a pointer in the "write" direction??
    Thanks in advance...

    Just read it in like you would keyboard input.
    Programs have three IO streams permanently attached
    Standard In (stdin) is an Input Stream.
    Standard Out (stdout) is an Output Stream.
    Standard Error (stderr) is a Second Output Stream.
    Think of it this way:
    Each STDxxx is like a hose. When you invoke a program, by default the
    hoses are attached as follows:
    stdin is attached to the keyboard for input.
    stdout is attached to the console window for output.
    stderr is attached to the console window for output.
    In java, the streams System.in, System.out, System.err are the other ends of these hoses.
    Now, in Unix (and similarly in dos or NTshell) you can connect these hoses in different ways using a "pipe" (hence the hose metaphor)
    'Program1 | Program2' will take the stdout stream from Program1, and disconnect it from the console window. It will also disconnect the stdin stream from the keyboard, and then, it will slip in a piece of pipe between the two hoses, thus connecting them.
    So, program2 can read the output on its System.in stream in exactly the same way as it would if it was connected to the keyboard. In fact, Program2 has absolutely no knowledge of what is at the other end of that hose, just that there is data coming down it.
    So, the leaves us with the question "What is stderr for?" It's for error messages. It is often convenient to use a pipe or a file redirect (similar to a pipe) to send data to a file, but errors to the screen.
    A programmer can facilite this by sending all true output to System.out, and all error messages to System.err
    Example: (in class Bob)
    System.out.println("Hello Bob");
    System.err.println("Warning: Bob is hacking again.");
    java Bob | someProgram
    // pipe the stdout of Bob to someProgram
    // leave stderr attached to the keyboard.
    Will send the message Hello Bob to someProgram, but the Error message will appear on the console for the system administrator to read.
    Do a google on "Pipes and redirects" for more info.

  • How can I put an output stream (HTML) from a remote process on my JSF page

    Hello,
    I've a question if someone could help.
    I have a jsf application that need to execute some remote stuff on a different process (it is a SAS application). This remote process produces in output an html table that I want to display in my jsf page.
    So I use a socket SAS class for setting up a server socket in a separate thread. The primary use of this class is to setup a socket listener, submit a command to a remote process (such as SAS) to generate a data stream (such as HTML or graphics) back to the listening socket, and then write the contents of the stream back to the servlet stream.
    Now the problem is that I loose my jsf page at all. I need a suggestion if some one would help, to understand how can I use this html datastream without writing on my Servlet output stream.
    Thank you in advance
    A.
    Just if you want to look at the details .....
    // Create the remote model
    com.sas.sasserver.submit.SubmitInterface si =
    (com.sas.sasserver.submit.SubmitInterface)
    rocf.newInstance(com.sas.sasserver.submit.SubmitInterface.class, connection);
    // Create a work dataset
    String stmt = "data work.foo;input field1 $ field2 $;cards;\na b\nc d\n;run;";
    si.setProgramText(stmt);
    // Setup our socket listener and get the port that it is bound to
    com.sas.servlet.util.SocketListener socket =
    new com.sas.servlet.util.SocketListener();
    int port = socket.setup();
    socket.start();
    // Get the localhost name
    String localhost = (java.net.InetAddress.getLocalHost()).getHostAddress();
    stmt = "filename sock SOCKET '" + localhost + ":" + port + "';";
    si.setProgramText(stmt);
    // Setup the ods options
    stmt = "ods html body=sock style=brick;";
    si.setProgramText(stmt);
    // Print the dataset
    stmt = "proc print data=work.foo;run;";
    si.setProgramText(stmt);
    // Close
    stmt = "ods html close;run;";
    si.setProgramText(stmt);
    // get my output stream
    context = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
    ServletOutputStream out = response.getOutputStream();
    // Write the data from the socket to the response
    socket.write(out);
    // Close the socket listener
    socket.close();

    The system exec function is on the Communication palette. Its for executing system commands. On my Win2K system, the help for FTP is:
    "Ftp
    Transfers files to and from a computer running an FTP server service (sometimes called a daemon). Ftp can be used interactively. Click ftp commands in the Related Topics list for a description of available ftp subcommands. This command is available only if the TCP/IP protocol has been installed. Ftp is a service, that, once started, creates a sub-environment in which you can use ftp commands, and from which you can return to the Windows 2000 command prompt by typing the quit subcommand. When the ftp sub-environment is running, it is indicated by the ftp command prompt.
    ftp [-v] [-n] [-i] [-d] [-g]
    [-s:filename] [-a] [-w:windowsize] [computer]
    Parameters
    -v
    Suppresses display of remote server responses.
    -n
    Suppresses autologin upon initial connection.
    -i
    Turns off interactive prompting during multiple file transfers.
    -d
    Enables debugging, displaying all ftp commands passed between the client and server.
    -g
    Disables file name globbing, which permits the use of wildcard characters (* and ?) in local file and path names. (See the glob command in the online Command Reference.)
    -s:filename
    Specifies a text file containing ftp commands; the commands automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).
    -a
    Use any local interface when binding data connection.
    -w:windowsize
    Overrides the default transfer buffer size of 4096.
    computer
    Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last paramete
    r on the line."
    I use tftp all of the time to transfer files in a similar manner. Test the transfer from the Windows command line and copy it into a VI. Pass the command line to system exec and wait until it's done.

  • Exception writing binary data to the output stream to client -Broken pipe

    Hi,
    I am trying to use the drag & drop feature using Contributor mode of Webcenter sites. Single Image Page Attribute is working properly where as Multiple Image Page Attribute throws the following error:
    [ERROR] [.kernel.Default (self-tuning)'] [logging.cs.satellite.request] Exception writing binary data to the output stream to client 10.191.117.106
    java.net.SocketException: Broken pipe
         at java.net.SocketOutputStream.socketWrite0(Native Method)
         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
         at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:568)
         at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:539)
         at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:427)
         at weblogic.servlet.internal.ChunkOutput$2.checkForFlush(ChunkOutput.java:648)
         at weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:333)
         at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:148)
         at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:148)
         at COM.FutureTense.Servlet.ServletRequest$OutputOutputStream.write(ServletRequest.java:80)
         at COM.FutureTense.Servlet.ServletRequest.write(ServletRequest.java:1633)
         at com.openmarket.Satellite.RequestContext.write(RequestContext.java:1123)
         at com.openmarket.Satellite.BytePiece.stream(DataPiece.java:253)
         at com.openmarket.Satellite.CacheObjectImpl.stream(CacheObjectImpl.java:651)
         at com.openmarket.Satellite.Http11Responder.respondForWrapper(Http11Responder.java:142)
         at com.openmarket.Satellite.WrapperAwareResponder.respond(WrapperAwareResponder.java:36)
         at com.openmarket.Satellite.SatelliteServer.execute(SatelliteServer.java:85)
         at com.openmarket.Satellite.servlet.BaseServlet.doGet(BaseServlet.java:118)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         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:56)
         at com.fatwire.wem.sso.cas.filter.CASFilter.doFilter(CASFilter.java:557)
         at com.fatwire.wem.sso.SSOFilter.doFilter(SSOFilter.java:51)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
         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:2273)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Thanks
    KarthiK

    Thank u very much,
         FileOutputStream opGif = new FileOutputStream(destFile, false);
    I have changed above line with the following line:
         PrintWriter opGif = new PrintWriter ( new FileWriter(destFile, false));
    and now this code is working very fine.
    Thanks once again...

  • How to print an output stream on console.

    Hi,
    I am new to JAVA. I am trying to execute a command in runtime and I want to print the output on console and also redirect the output to a file.
    Could anyone please help me?
    This is what I wrote :
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("cmd /c ipconfig");I am getting an output stream by : proc.getOutputStream(). I dont know how to print it on console and also how to redirect it to a file.
    Could anyone please help me.
    Thanks in advance.
    Basav

    You can do it this way :-
         public static void main(String args[]) throws Exception {
              ProcessBuilder builder = new ProcessBuilder("ipconfig", "/all");
              Process process = builder.start();
              BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
              FileWriter writer = new FileWriter(new File("C:/ipconfig.txt"));
              String str;
              while ((str = reader.readLine()) != null) {
                   System.out.println(str);
                   writer.write(str + System.getProperty("line.separator"));
              writer.close();
              reader.close();
         }Let me know if it works for you.

  • Read Servlet output stream

    how can i read servlet output stream

    i m using SAX to create an XML.
    I set result to "Servlet Output Stream" as shown below :->
    SAXTransformerFactory saxTF = SAXTransformerFactory.newInstance();
    TransformerHandler th = saxTF.newTransformerHandler();
    Transformer t = th.getTransformer();
    StreamResult stRes = new StreamResult(res.getOutputStream());
    th.setResult(stRes);
    th.startDocument();
    what i want to wright the same xml result in file at the same time(parallel y).

  • How to read .xml file from embedded .swf(flash output) in captivate

    I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
    I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
    Here is is graphical demonstration of my query :
    Message was edited by: captainmkv

    Hi Captainmkv,
    Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
    Tristan,

  • How to read specific line in a file through UNIX shell script..

    Dear Friends,
    I have generated .ldt file under admin/import/US folder through FND_LOAD script for Download the responsibility.
    I registred Shell script (Host concurrent program) in Oracle apps. Now i want to read the file in speciific line which i was generated in admin/import/US folder through unix shell script. Please help me how to read specific line and the i want to replace that which i am going to read the specific line.
    Thanks in advance..
    Regards,
    Velu.

    Hi,
    Thanks for reply,
    My requirement i have to find the specific line in a file and find and replace needed word over there it's should happen programatically. i want to read specific line in a file Once complete find and replace the condition should exists. The loop will go to next file and read the same line in next file also do the same process upto how many files over there.i am doing through UNIX shell script. Please help me out to find the
    Your suggestion is highly appriciated.
    Thanks,
    Velu.

  • How to  read list output into itab? - URGENT

    hai experts,
    how to read current report output for further validation i need all data which is showing in output.
    my req is,
    to read list output all data put into itab.
    reward avail for useful answer....
    regards,
    jai.m

    Hi kumar,
    you said your using second one.
    it's good. then use the below part.but check the syntax because it is there in other programs what i have already phased.
    INCLUDE <%_list>.
    DATA %_LIST TYPE SLIST_LIST_TAB ." WITH HEADER LINE.
    DATA %_LIST_WA TYPE SLIST_LISTLINE.
    DATA: BEGIN OF data_tab OCCURS 0,
    line(255),
    END OF data_tab.
    & Then use:-
    LOOP AT %_list into %_list_wa.
    data_tab-line = %_list-line.
    data_tab-line = %_list_wa-line.
    APPEND data_tab.
    Clear data_tab.
    Clear %_list_wa.
    ENDLOOP.
    kindly reward me if it's ok

  • Read Zip File and output it to the Stream

    Hi,
    I really need help with this topic. I need to write a function which as input read the zip file (inside: jpeg, mp3, xml)
    and as output provide the output Stream of this zip file.
    public OutputStream readZipToStream(String sourceZipFile) { ....}
    I've tried something....
    public static OutputStream    readZipToStream(String src, HttpServletResponse response) throws Exception {
            File fsrc = null;
            ZipOutputStream out = null;
            byte buffer [] = null;
            FileInputStream in = null;
            try {
                buffer = new byte[BUFFER_CREATE];
                fsrc = new File(src);
                out = new ZipOutputStream(response.getOutputStream());
                ZipEntry zipAdd = new ZipEntry(fsrc.getName());
                zipAdd.setTime(fsrc.lastModified());
                out.putNextEntry(zipAdd);
                // Read input & write to output
                in = new FileInputStream(fsrc);
                while (true) {
                    int nRead = in.read(buffer, 0, buffer.length);
                    if (nRead <= 0)
                        break;
                    out.write(buffer, 0, nRead);
                out.flush();
                in.close();
            } catch (IOException ioe) {
                logger.error("Zip Exception: " + ioe.getMessage());
                ioe.printStackTrace();
                throw ioe;
            return out;
        } But the problem with this code when it returns ( I called from servlet: bellow)
    it ask user to save the file as servlet.jsp file. So I would have to rename it to zip file later.
    What I want to achive is it would ask to save zip file from the stream as name of the original zip file (if that is possible)
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%
    OutputStream stream = null;
    response.setContentType("application/zip");
    target = mount_media + File.separator + "test_swf.zip";       
    try {
    stream = ZipUtil.readZipToStream(target, response);
    } catch (Exception ex) {
            System.out.println(ex.getMessage());
        } finally {
    if(stream != null) {
                stream.close();
    %>
    <%@page import="java.io.File" %>
    <%@page import="java.io.OutputStream" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    </body>
    </html>

    Hi oleg_s ,
    There's a contradiction of content in your JSP :
    response.setContentType("application/zip");
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">The html part of your JSP seems useless for what you mean to do. Therefore, instead of a JSP, you should use a simple servlet to send your zip file.

  • How to read metadata (such as artist  trackname) from mp3 stream properly?

    Hi,
    while playing with JavaFX i would like to read metadata from a mp3 stream ( internet radio)
    to display information such as author, artist , trackname..
    Anbody could give some code example to show how to achieve that?
    Any help would be appreciated..
    Thank you,
    Lacos

    Thank you for your help. I tried once more but somehow i don't get it.
    Here's my code:
    binding the JavaFX media player to variable "player"..
    var player =
         MediaPlayer {
           repeatCount:MediaPlayer.REPEAT_FOREVER
            media : Media {source:mp3RadioStream}
    starting playing the stream when user clicks in a rectangle area
    and (hopefully ever printing some metadata :-) ..
    Rectangle {
                  opacity: 0.0
                  x: 10 y: 80 width: 128 height: 126
                   onMouseClicked: function(e:MouseEvent):Void
                        println("mouse clicked ..");
                        println("setting radio stream..");
                        player.media = Media {source: mp3RadioStream};
                        println("play init..");
                        player.play();
                        println("playing..");
                        // printing some metadata
                         for (a in player.media.metadata) {
                            println("metadata key: {a.key} , value: {a.value}");
                   }Any help, especially some explicit code example would be very appreciated..
    It has to be a silly error on my side but i really dont get it :-/
    Tried to play the mp3 stream with winamp an the stream definitly has some metadata like
    artist , trackname..
    Thx for your help,
    Lacos

  • How to forward after output stream is open

    Hi
              I want ot forward one jsp page to another, but the output stream of the jsp
              page is open and content is showed.
              I know <jsp:forward> can't work now. Then what can i do?
              Thanks all
              

              You can also set autoFlush to false and increase the buffer (session). Her is an example:
              <%@ buffer="1024kb" autoFlush="false" import="java.io.*" %>
              If the buffer is full and you did not flush him, you will get an IOException.
              Robert Patrick <[email protected]> wrote:
              >It doesn't matter if the OutputStream is open, it matters whether or not
              >the
              >OutputStream has been flushed. If you are not explicitly flushing it (or
              >flushing it implicitly by using jsp:include), you might want to play around
              >with moving some of the content so that the buffer size is not exceeded
              >(which
              >causes it to be flushed) before the jsp:forward is encountered or try
              >increasing the size of the buffer...
              >
              >Hope this helps,
              >Robert
              >
              >andy wrote:
              >
              >> Hi
              >> I want ot forward one jsp page to another, but the output stream of the
              >jsp
              >> page is open and content is showed.
              >>
              >> I know <jsp:forward> can't work now. Then what can i do?
              >>
              >> Thanks all
              >
              

Maybe you are looking for

  • Need a Report for a List of PO's against a Sales Order

    Need a Report for a List of PO's against a Sales Order

  • FCE freezing computer.

    I'm using FCE 1 and DVD Studio Pro 2. Both apps are installed on my boot volume, a hard drive on a PCI controller and my scratch disk is a hard drive on my onboard IDE-ATA socket. I save project files to the scratch disk volume. When I try to export

  • MS Access Record-Locking files

    Hi all, I am having some serious issues with Lock files that won't go away. I want to create a new project and then import boilerplate topics into this new project. When I try to import the HTML files from an existing project, RH goes through its lit

  • Strange display behavior - partial display of text

    I scanned this forum and couldn't find this one anywhere -- My 15" Titanium Powerbook screen just went crazy after installing the latest security update. By crazy, I mean that major portions of the menu bar aren't there now (but the screen isn't blac

  • Issues with buttons in Sum Total Mobile App

    Are there any users of Sum Total LMS who are using the Sum Total app (as found on iOS and Android)? On iOS, the responsive course I have created runs fine UNTIL it gets to the QUIT button. I have created a simple button that exits the course. The but