Passing Array from Server to Client

I can't find the answer that I am looking for anywhere on the forums.
I don't even know if what I am trying to do is possible.
I am attempting to take clientNames[], which is composed of various strings,
and write it out to the client through output.writeObject(clientNames);
(output as ObjectOutputStream)
As far as I can tell, this is working just fine. Unforuntately, I do not know how to recieve it as an array at the client's end.
The obvious solution would be input.readObject();
(input as ObjectInputStream)
Unfortunately, once it is as the client's end, in this form it appears impossible to convert the data
back into an array of strings to access each string individually.
Is there a practical solution to this? Am I missing something?
Any example code or a reference website would be wonderful. thanks in advance : )

well i am thoroughly embarassed. I suppose ive been staring at this code for too long.
I thought about casting it, but only for a brief moment.
yes, this works nicely, thanks for the third-person view

Similar Messages

  • How can i transfer more than one file from server to client

    Hi,
    our requirement is transfer more than one files from server to client using the
    webutil_file_transfer.as_to_client_with_progress.One file transfer is already working in our system.If anybody know the solution please inform
    regards
    mat

    just an idea ...
    for this purpose let us put aside security concerns and other potential problems....
    -- Get the content of a server directory with Filter and create zip file
    1) create a class that implements java.io.FilenameFilter ...
    2) define accept() method ...
    3) call File.list() with the filter as a parameter. The returned array of strings will have all the names that passed through the accept() filter
    4) use java.util.Zip to create ZIP file on the server side
    -- I think it is better to create this functionality as a separate Java class, put it in required folder and after it
    -- use Forms->Program->"Import Java class" to create pl/sql wrappers, than to create wrappers for all classes and code in pl/sql
    5) use webutil to transfer file on the client
    6) use Java on client side to unzip transferred file
    if you think this is not too complicated, you should try ...
    Regards,
    Vladimir

  • Passing Information From Server to GUI

    Hi, I'm making a chat client, but I'm having trouble passing information from server's input stream to my GUI. I made two threads, one for sending and one for receiving, and I start them both when I click "connect" after I log in to the server. So what happens is I run my program, the frame appears as I want it to, and then I click connect, and after a little wait the button "unclicks" (or w/e) and nothing happens. I don't know why I am not receiving the messages from the server. If I make the program "GUI-less" it works, I can both send and receive messages via the console. But in the GUI, where I am sending/receiving via my two TextAreas, it doesn't work. Here's my code:
    (I apologize ahead of time for posting so much code in a thread, I tried to cut it down as best as I could.)
    actionPerformed method for connect and disconnect buttons (in BotWindow class)
    public void actionPerformed(ActionEvent evt) {
            JButton src = (JButton)evt.getSource();
            if(src == connect) {
                try {
                    bnet = new BattleNet("useast.battle.net");
                    bnet.logIn("dynobot1", "test");
                catch(Exception error) {
                    System.out.println(error);
            if(src == disc) {
                try {
                    BattleNet bnet = new BattleNet("useast.battle.net");
                    bnet.logOut();
                catch(Exception error) {
                    System.out.println(error);
    BattleNet class
    import java.io.*;
    import java.net.*;
    public class BattleNet extends SendAndReceive {
        Socket sock;
        InputStream in;
        OutputStream out;
        Send send;
        Receive receive;
        public BattleNet(String server) {
            try {
                sock = new Socket(server, 6112);
                in = sock.getInputStream();
                out = sock.getOutputStream();
                send = new Send(this.out);
                receive = new Receive(this.in);
            catch(Exception error) {
                System.out.println(error);
        public void logIn(String username, String password) {
            byte[] u = username.getBytes();
            byte[] p = password.getBytes();
            try {
                out.write((byte) 0x03);
                out.write((byte) 0x04);
                out.write(u);
                out.write((byte) 0x0a);
                out.write(p);
                out.write((byte) 0x0a);
                receive.start();
                send.start();
            catch(IOException e) {
                System.out.println(e);
        public void logOut() {
            try {
                sock.close();
                in.close();
                out.close();
            catch(Exception error) {
                System.out.println(error);
    SendAndReceive class (with Threads as subclasses)
    import java.io.*;
    import java.net.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class SendAndReceive implements ActionListener {
        JButton src = null; 
        public SendAndReceive() {} 
        public void actionPerformed(ActionEvent evt) {
            src = (JButton)evt.getSource();
    class Send extends Thread {
        OutputStream out;
        SendAndReceive sr = new SendAndReceive();
        BotWindow bw = new BotWindow();
        public Send(OutputStream inputOut) {
            out = inputOut;
        public void run() {
            if(sr.src == bw.submit) {
                String newLine = "\n";
                String messageOut = bw.inText.getText();
                bw.outText.setText(bw.outText.getText() + newLine + messageOut);
                byte[] m = messageOut.getBytes();
                try {
                    out.write((byte) 0x05);
                    out.write(m);
                catch(IOException e) {
                    System.out.println(e);
                String blank = "";
                bw.inText.setText(blank);
                sr.src = null;
    class Receive extends Thread {
        InputStream in;
        SendAndReceive sr = new SendAndReceive();
        BotWindow bw;
        public Receive(InputStream inputIn) {
            in = inputIn;
            bw = new BotWindow();
        public void run() {
            while(true) {
                try {
                    bw.outText.setText(bw.outText.getText() + (char)in.read());
                catch(IOException e) {
                    System.out.println(e);
    }So, to repeat my questions, SendAndReceive class, but I'm not sure if this is the right approach.why isn't my TextArea (BotWindow.outText) not receiving and setting it's text to the information from the server? Is my threading correct? Also, with the way I set up the threads, will the Send function be able to send in the midst of the receive function? I tried to set it up so that it could by implementing ActionListener in my SendAndReceive class, but I am not sure if this is the correct approach.
    P.S. The reason I put this in Swing is because it works without a GUI/Swing components! If it will help, I will post the GUI-less program I made that works.

    Multi-post. Reply to this posting: http://forum.java.sun.com/thread.jspa?threadID=656211

  • URGENT: Passing Array from JSP to a Stored Procedure

    Hi,
    Can some one please help me understanding how can I pass array from JSP page to a stored procedure in database.
    Thanks in advance.
    Jatinder

    Thanks.
    I tried ArrayExampla.java and was successful in passing array values to the stored database procedure.
    How can I use this class in JSP? Like I have first JSP where in I will collect input from the user and then submit it to the second JSP - that needs to call the ArrayExample.java to pass the values as array to the database.
    How should I call this java code in my second JSP?
    Thanks in advance.

  • Redundant folders created in root of C drive of server and Client . I want to stop the same and want to automatically delete them from server and client .

    Redundant folders created in root of C drive of server and Client . I want to stop the same and want to automatically delete them from server and client .
    Please let me know the solution to delete them not manually . It should not create automatically .Is there a way we can change the path of creation.
    Is there a way that once the folfer is create should be automatically deleted once the task is done.
    Redundant folders are created in the root of my C drive all the time,
    folder names look like:
    09b0508d0bd2dbd70523
    56f51b81c1462bb378009ee4d5ed03
    02afe4378371907aca40ab

    This is a duplicate of
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/ae99c2d0-8dea-4c5e-8a79-17e08e9e5de4/sccm-2012-issue-folders-with-long-guid-are-created-in-c-drive?forum=winservergen#ae99c2d0-8dea-4c5e-8a79-17e08e9e5de4
    Jason | http://blog.configmgrftw.com

  • VTP from server to client mode

    Hi,
    I have couple switches setup in VTP server mode. All of them have the same VTP revision number, but most of them should be in VTP client mode.
    Will switching some of them (but the one I really want to have in VTP server mode) into VTP client mode have negative impact on the network? I do know that if you change a switch (with the highest rev #) from client mode to server mode I could end up with problems. However, in my case it will be switching them from server to client mode with all of them with the same Rev #.
    Thanks for the help

    Hello,
    change the switches in question to VTP transparent mode first, and then to client mode, that will reset the revision and prevent any possible conflicts.
    In addition, in case you need to change the root switch as well, in general the VTP server switch should also be the root for your VLANs. You can set the switch as root by configuring it as:
    spanning-tree vlan x priority 0
    HTH,
    GP

  • Move files from server to client

    I have create txt file in server directory using UTL_FILE package,
    and I put in the directory in server.
    Server platform is linux. and client platform in Windows.
    What I want to ask is there any possibilities to copy that file from server to client using pl/sql ? could all of you "The Gurus" give me a script example ?
    Thanks a lot.
    regards,
    indra

    > What I want to ask is there any possibilities to copy that file from server
    to client using pl/sql
    No. Not really.
    Think about it.. the file is on the server. PL/SQL code executes inside the Oracle server session that is servicing the client.
    Just how is PL/SQL (on the server) suppose to reach out and push that file to a client's file system and directory?
    PL/SQL cannot do this. You need something on the client that will accept the file. You need something in-between the client and PL/SQL that will handle the transfer of the file. This something can be ftp, scp, tftp, NetBIOS etc.
    Anyway you look at this, it does not make sense. You are turning the server into the client that needs to push the file. You are turning the client into a server that needs to accept the file.
    Why? This is contrary to the basic client-server RDBMS architecture. You are adding more complexities and more moving parts to the architecture by forcing a swap of client and server roles. The are now a far greater likelihood of errors and bugs and failures.
    It does not make sense to do it this way.
    What is the business requirement you are trying to satisfy? Instead of us trying to help you to hack a flawed solution, let us rather assist you in determining the correct and proper solution.

  • Help :- Send Large File From Server To Client

    Hey guys, I am stuck with a problem.Hope u guys might be able to help me out. My problem is :-
    From client i am doing an operation which results in calculation of results by server and saving a file on the server..But i want to see what results have been computed by the server and hence i want to stream that file back to the client..
    The file may be of 100MB as well , that is, the size of the file may be huge.
    I want u guys to tell me how to stream that file back to the client..I tried returning byte array which gets serialized and then received at client side but as i said the file may be huge so memory problem may arise, so returning byte[] from function is not a good solution..
    I am looking something where server can send the file back to the client in chunks..Client keeps receiving these chucks and keep putting them in the file.
    So how to make server send file in chunks??Also, i don't know the hostname and ports...so sockets i can't use...
    Any Another way to do it...??
    is PipedStream a solution??
    Please guys, help me
    Thanks in advance
    Edited by: 854509 on Apr 25, 2011 8:28 AM
    Edited by: 854509 on Apr 25, 2011 8:59 AM

    854509 wrote:
    I knew about sockets but as i said i am able to send request to server by client by calling a remote method...There i haven't used sockets...RMI uses sockets, I assume you mean you don't access to the underlying socket.
    So i wanted to know if we can without using sockets send file back to Client..I would have the RMI return the connection details where the result can be obtains, .e.g with hostname, port, and file name to use.
    I would suggest trying to compress the stream as well (just wrapp the stream on the sender/reciever), especially for files over 1 MB.
    Tell me something abt PipedStreams as well..If they are of any use here or not?I don't see how. PipedStreams can be used to share data between threads in the same process.
    If RMI is your only choice you can perform a method which would return alot of data and have seperate methods to download portions of it.
    e.g.
    public int loadBigFile(String filename); // returns the number of portions.
    public byte[] returnPortion(int n);
    int portions = rmi.loadBigFile("my-big-file.xml");
    for(int i=0;i<portions;i++) {
       byte[] bytes = rmi.returnPortion(i);
       // do something with bytes.
    }You can have the server cleanup the file when the last portion is read.

  • Sending XML messages from server to client using POST method

    Dear everyone,
    I have a simple client server system - using Socket
    class on the server side and URLConnection class on
    the client side. The client sends requests to the
    server in the form of an XML message using POST method.
    The server processes the request and responds with
    another XML message through the same connection.
    That's the basic idea.
    I have a few questions about headers and formats
    especially with respect to POST.
    1. In what format should the response messages from the
    server be, for the client? Does the server need to
    send the HTTP headers - for the POST type requests?
    Is this correct?:
       out.println("HTTP/1.1 200 My Server\r");
       out.println("Content-type: text/xml\r");
       out.println("Content-length: 1024\r");
       out.println("\r");
       out.println("My XML response goes here...");2. How do I read these headers and the actual message
    in the client side? I figured my actual message was
    immediately after the blank line. So I wrote
    something like this:
       String inMsg;
       // loop until the blank line is through.
       while (!"".equals(inMsg = reader.readLine()))
          System.out.println(inMsg);
       // get the actual message and process it.
       inMsg = reader.readLine();
       processMessage(inMsg);But the above did not work for me. Because I seem to
    be receiving a blank line after each header! (I suppose
    that was because of the "\r".) So what should I do?
    3. What are the different headers I must pass from
    server to the client to safeguard against every
    possible problem?
    4. What are the different exceptions I must be prepared
    for this situation? How could I cope with them? For
    example, time outs, IOExceptions, etc.
    Thanks a lot! I appreciate all your help!
    George

    hello,
    1) if you want to develop a distributed application with XML messages, you can look in SOAP.
    it's a solution to communicate objects distributed java (or COM or other) and it constructs XML flux to communicate between them.
    2) if it can help you, I have developed a chat in TCP/IP and, to my mind, when you send datas it's only text, so the format isn't important, the important is your traitement behind.
    examples :
    a client method to send a message to the server :
    public void send(String message)
    fluxOut.println(message);
    fluxOut.flush();
    whith
    connexionCourante = new Socket(lAdresServeur, noPort);
    fluxOut= new PrintWriter( new OutputStreamWriter(connexionCourante.getOutputStream()) );
    a server method in a thread to receive and print the message :
    while(true)
    if (laThread == null)
    break;
    texte = fluxIn.readLine();
    System.out.println(texte);
    that's all ! :)
    If you want to use it for your XML communication, it could be a good idea to use a special message, for example "@end", to finish the server
    ex :
    while(true)
    if (laThread == null)
    break;
    texte = fluxIn.readLine();
    // to stop
    if (texte.equals("@end"))
    {break;}
    processMessage(texte );
    hope it will help you
    David

  • Drive Redirection virtual channel hangs when copying a file from server to client over RDP 8.1

    Problem Summary:
    A UTF-8 without BOM Web RoE XML file output from a line of business application will not drag and drop copy nor copy/paste from a Server 2012 R2 RD Session Host running RD Gateway to a Windows 7 Remote Desktop client over an RDP 8.1 connection and the Drive
    Redirection virtual channel hangs.  The same issue affects a test client/server with only Remote Desktop enabled on the server.
    Other files copy with no issue.  See below for more info.
    Environment:
    Server 2012 R2 Standard v6.3.9600 Build 9600
    the production server runs RDS Session Host and RD Gateway roles (on the same server).  BUT,
    the issue can be reproduced on a test machine running this OS with simply Remote Desktop enabled for Remote Administration
    Windows 7 Pro w SP1v6.1.7601 SP1 Build 7601 running updates to support RDP 8.1
    More Information:
    -the file is a UTF-8 w/o BOM (Byte Order Marker) file containing XML data and has a .BLK extension.  It is a Web Record of Employment (RoE) data file exported from the Maestro accounting application.
    -the XML file that does not copy does successfully validate against CRA's validation XML Schema for Web RoE files
    -Video redirection is NOT AFFECTED and continues to work
    -the Drive Redirection virtual channel can be re-established by disconnecting/reconnecting
    -when the copy fails, a file is created on the client and is a similar size to the original.  However, the contents are incomplete.  The file appears blank but CTRL-A shows whitespace
    -we can copy the contents into a file created with Notepad and then that file, which used to copy, will then NOT copy
    -the issue affects another Server 2012 R2 test installation, not just the production server
    -it also affects other client Win7 Pro systems against affected server
    -the issue is uni-directional i.e. copy fails server to client but succeeds client to server
    -I don't notice any event log entries at the time I attempt to copy the file.
    What DOES WORK
    -downgrading to RDP 7.1 on the client WORKS
    -modifying the file > 2 characters -- either changing existing characters or adding characters (CRLFs) WORKS
    -compressing the file WORKS e.g. to a ZIP file
    -copying OTHER files of smaller, same, and larger sizes WORKS
    What DOES NOT WORK?
    -changing the name and/or extension does not work
    -copying and pasting affected content into a text file that used to have different content and did copy before, then does not work
    -Disabling SMB3 and SMB2 does not work
    -modifying TCP auto-tuning does not work
    -disabling WinFW on both client and server does not work
    As noted above, if I modify the affected file to sanitize it's contents, it will work, so it's not much help.  I'm going to try to get a sample file exported that I can upload since I can't give you the original.
    Your help is greatly appreciated!
    Thanks.
    Kevin

    Hi Dharmesh,
    Thanks for your reply!
    The issue does seem to affect multiple users.  I'm not fully clear on whether it's multiple users and the same employee's file, but I suspect so.
    The issue happens with a specific XML file and I've since determined that it seems to affect the exported RoE XML file for one employee (record?) in the software.  Other employees appear to work.
    The biggest issue is that there's limited support from the vendor in this scenario.  Their app is supported on 2012 R2 RDS.
    What I can't quite wrap my head around are
    why does it work in RDP 7.1 but not 8.1?  What differences between the two for drive redirection would have it work in 7.1 and not 8.1?
    when I examine the affected file, it really doesn't appear any different than one that works.  I used Notepad++ and it shows the encoding as the same and there doesn't appear to be any invalid characters in the affected file.  I wondered
    if there was some string of characters that was being misinterpreted by RDP or some other operation and blocked somehow but besides having disabled AV and firewall software on both ends, I'm not sure what else I could change to test that further
    Since it seems to affect only the one employee's XML file AND since modifying that file to change details in order to post it online would then make that file able to be copied, it seems I won't be able to post a sample.  Too bad.
    Kevin

  • Why doesn't using EAS to sync Drafts from server to client work anymore?

    Hi All,
    I understand that uploading an email into a Drafts folder is not possible and has never been possible using Exchange ActiveSync.
    It has always been possible, however, to download emails from the Drafts folder and to sync the Drafts folder like any other folder. Recently, however, I have been having problems performing this sync. These problems are occuring on Office-365. Other users
    are also experiencing the issue. There is a thread discussing this issue  on that site at: http://community.office365.com/en-us/forums/158/p/176113/525322.aspx#525322 
    Unfortunately, there is still no resolution forthcoming from the Office-365 support team, so I thought it might help to cross-post the problem here.
    In short, the problem that I am seeing is that the GetItemEstimate command receives a Status of 4 indicating an invalid sync key. This is even though the Sync Key is known the be valid. If that issue is ignored, and a Sync command is sent, then there is no
    error, but the incorrect information is returned. The information that should be returned is the 'Adds' for the folder. Instead, an empty reply is received, indicating that there is nothing to sync.
    Here are the details from the interaction:
    =================
     [EAS] Client Sends: 
    ================
    <Sync xmlns="AirSync:">
        <Collections>
            <Collection>
                <SyncKey>0</SyncKey>
                <CollectionId>4</CollectionId>
            </Collection>
        </Collections>
    </Sync>
    ======================
    [EAS] Received from Server
    ======================
    <Sync>
        <Collections>
            <Collection>
                <SyncKey>1335200247</SyncKey>
                <CollectionId>4</CollectionId>
                <Status>1</Status>
            </Collection>
        </Collections>
    </Sync>
    =================
     [EAS] Client Sends:
    =================
    <GetItemEstimate xmlns="GetItemEstimate:">
        <Collections>
            <Collection>
                <airsync:SyncKey>1335200247</airsync:SyncKey>
                <CollectionId>4</CollectionId>
            </Collection>
        </Collections>
    </GetItemEstimate>
    ======================
     [EAS] Received from Server
    ======================
    <GetItemEstimate>
        <Response>
            <Status>4</Status>        
            <Collection>
                <CollectionId>4</CollectionId>
            </Collection>
        </Response>
    </GetItemEstimate>
    ================
    [EAS] Client Sends
    ================
    <Sync xmlns="AirSync:">
        <Collections>
            <Collection>
                <SyncKey>1335200247</SyncKey>
                <CollectionId>4</CollectionId>
                <DeletesAsMoves/>
                <GetChanges/>
                <WindowSize>64</WindowSize>
                <Options>
                    <airsync:MIMESupport>2</airsync:MIMESupport>
                </Options>
            </Collection>
        </Collections>
    </Sync>
    =====================================
    This receives an empty reply indicating no changes
    Here are the HTTP Headers:
    =====================================
    Headers: {
        "Cache-Control" = private;
        "Content-Encoding" = gzip;
        "Content-Length" = 119;
        "Content-Type" = "application/vnd.ms-sync.wbxml";
        Date = "Fri, 19 Jul 2013 22:31:47 GMT";
        "MS-Server-ActiveSync" = "15.0";
        Server = "Microsoft-IIS/7.5";
        "Set-Cookie" = "X-BackEndCookie=S-1-5-21-2447848828-1310731447-1641304557-13231500=u56Lnp2ejJqBz83MmsfNncnSzJnGztLLyMfP0p7Nxp3Szs/HycjPzJrIy5ybgZiQkJuXipKekYzRkJGSlpyNkIyQmYvRnJCSgcjQzsbQzc/OzN/Oz8XLzsXLyN+vsg==; expires=Fri,
    19-Jul-2013 22:41:47 GMT; path=/Microsoft-Server-ActiveSync; secure; HttpOnly";
        Vary = "Accept-Encoding";
        "X-AspNet-Version" = "4.0.30319";
        "X-BEServer" = BN1PR05MB121;
        "X-CalculatedBETarget" = "bn1pr05mb121.namprd05.prod.outlook.com";
        "X-DiagInfo" = BN1PR05MB121;
        "X-FEServer" = BY2PR09CA003;
        "X-Powered-By" = "ASP.NET";
        "request-id" = "b78e1afc-74b4-4080-a8b2-c641f567d4f9";
    Cookies: (
        "<NSHTTPCookie version:0 name:\"X-BackEndCookie\" value:\"S-1-5-21-2447848828-1310731447-1641304557-13231500=u56Lnp2ejJqBz83MmsfNncnSzJnGztLLyMfP0p7Nxp3Szs/HycjPzJrIy5ybgZiQkJuXipKekYzRkJGSlpyNkIyQmYvRnJCSgcjQzsbQzc/OzN/Oz8XLzsXLyN+vsg==\"
    expiresDate:2013-07-19 22:41:47 +0000 created:2013-07-19 22:31:47 +0000 (3.95966e+08) sessionOnly:FALSE domain:\"outlook.office365.com\" path:\"/Microsoft-Server-ActiveSync\" isSecure:TRUE>"
    Thanks!
        -Rich

    Hi Tom,
    Thanks for following up on this and providing a definitive answer. It is much appreciated.
    The decision they have made to block the Drafts folder syncing is mildly disappointing.
    Unfortunately, the mechanism by which they are implementing this makes it a more serious issue.
    Specifically, they should not be returning a Status of 4 in response to the GetItemEstimate for the Drafts folder. That Status of 4 effectively says, "Try Again".  See section 2.2.3.162.6 of the MS-ASCMD document.
    Instead, they should probably return a Status of 1 and an Estimate of 0. This would be the appropriate match with their empty collection in response to the Sync command.
    Alternatively, they could return a Status of 2 indicating, "an incorrect folder was requested". 
    Or they could simply omit the folder from the FolderHierarchy response.
    By returning a 4 and requesting that the client try again, they can cause the client to enter a continuous (and infinite) stream of GetItemEstimate requests. By following the documentation from 2.2.3.162.6, a client would get into this loop:
    1) GetItemEstimate returns 'Invalid sync key'
    2) FolderSync returns status OK 
    3) GetItemEstimate returns 'Invalid sync key'
    4) FolderSync with syncKey 0  returns Status OK
    5) goto 1
    Thanks,
        -Rich

  • File Download from server to client

    Please review the following code. I am attempting to download a file , whether PDF, DOC, TXT, etc.., from the server to client(in this case a DOC file). The f.exist() method returns true so the file exists but the f.length() returns 1. The file is considerably larger than 1 byte. The download occurs but the file contains 1 byte of code.
    Also, please review all the code and suggest any code changes needed to complete the download. I am new to Java programming so be kind.
    File f = new File(filePath + fileName);
    System.out.println("file " + f);
    System.out.println(f.exists());
    System.out.println("file length " + f.length());
    FileInputStream fis = new FileInputStream(f);
    BufferedInputStream bis = new BufferedInputStream(fis);
    response.setContentLength(fis.available());
    System.out.println("bytes " + fis.available());
    response.setContentType("application/msword");
    response.setHeader("Content-disposition","attachment; filename=" + fileName );
    BufferedOutputStream bos = new BufferedOutputStream(response.getOutputStream());
    byte[] buff = new byte[1024];
    int bytesRead;
    // Simple read/write loop.
    while(-1 != (bytesRead = bis.read(buff, 0, buff.length)))
    bos.write(buff, 0, bytesRead);
    bos.flush();
    bos.close();
    bis.close();
    response.flushBuffer();
    fis.close();
    } catch(Exception e){
    System.out.print("\n svtFileDownload.processRequestFileDownload Exception=" + e);

    the following is a nippet from a servlet I wrote that does what you want and I've had no problems with it, even with large file 200+ megs.
                String filename = bundle.getFileLocation();
                response.setContentType("application/stream");
                response.setHeader("Content-Disposition","attachment; filename="+filename+";");
                ServletOutputStream out = response.getOutputStream();
                BufferedInputStream fif= new BufferedInputStream(new FileInputStream(FILE_LOCATION+filename));
                int data;
                while((data = fif.read())!=-1)
                    out.write(data);
                fif.close();
                out.close();

  • Exceptions at the time of downloading jars from server to client PC-Help !!

    Always getting some exceptions in my log file at the time of downloading the jar files from server to my client PC. Actually our appln contains different functionalities and one of the functionality is this stanalone appln. When i click on some links into my appln request will go to the server and then download some jars into client PC. After that it works as a stanalone appln.
    i am attaching my stack trace along with this query. Plse reply ----
    2006-04-06 05:48:58 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
    java.io.IOException: There is no process to read data written to a pipe.
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:48:59 ErrorDispatcherValve[localhost]: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error]
    java.lang.IllegalStateException
    at org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.throwable(ErrorDispatcherValve.java:250)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:48:59 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
    java.io.IOException: There is no process to read data written to a pipe.
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:49:00 ErrorDispatcherValve[localhost]: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error]
    java.lang.IllegalStateException
    at org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.throwable(ErrorDispatcherValve.java:250)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:49:00 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
    java.io.IOException: There is no process to read data written to a pipe.
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:49:00 ErrorDispatcherValve[localhost]: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error]
    java.lang.IllegalStateException
    at org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.throwable(ErrorDispatcherValve.java:250)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:49:02 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
    java.io.IOException: There is no process to read data written to a pipe.
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:49:02 ErrorDispatcherValve[localhost]: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error]
    java.lang.IllegalStateException
    at org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.throwable(ErrorDispatcherValve.java:250)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:49:04 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
    java.io.IOException: There is no process to read data written to a pipe.
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:49:04 ErrorDispatcherValve[localhost]: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error]
    java.lang.IllegalStateException
    at org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorDispatcherValve.throwable(ErrorDispatcherValve.java:250)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:498)
    2006-04-06 05:49:05 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
    java.io.IOException: There is no process to read data written to a pipe.
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java(Compiled Code))
    at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled Code))
    at org.apache.catalina.core.ApplicationFilterChain.doFil

    cross posting idiot well, im sorry for that..I posted it here now cause it concerns more bout servlet..

  • Passing Array from Class to JSP

    Hoi all,
    I am using MyEclipse Tomcat 4.1 and MySql
    I am trying to pass a 2D array from my struts framework action class to the forwarding action JSP.
    the Array is filled correctly, I check that by printing the values of the array as they are filled by my ResultSet into my console.
    but when I pass the Array to my JSP the value is null.
    I did the following in the class:
    request.setAttribute("Aray",aray);     and in the JSP i request the Attrebute as follows:
    String[][] ary =  request.getParameter("Aray"); Any help will be appreciated thx .

    request.setAttribute("Aray",aray);
    String[][] ary = request.getParameter("Aray");
    See the difference?

  • ORA-00932 when trying to pass ARRAY from Java SP to PL/SQL

    Hi all
    I am trying to pass ARRAYs back and forth between PL/SQL and Java stored procedures. But I keep getting:
    ORA-00932: inconsistent datatypes: expected a return value that is an instance of a user defined Java class convertible to an Oracle type got an object that could not be converted
    Here's my PL/SQL:
    create or replace type CONTENTP.sentences_array as VARRAY(1000) of CLOB
    -- I've also tried .. as TABLE of CLOB and varray/table of VARCHAR2
    declare
    proc_clob CLOB;
    arr SENTENCES_ARRAY;
    begin
    SELECT document_body
    into proc_clob
    from documents
    where document_id = 618784;
    arr := processdocument.sentencesplit (proc_clob);
    end;
    PROCESSDOCUMENT package definition:
    CREATE OR REPLACE PACKAGE CONTENTP.PROCESSDOCUMENT AS
    FUNCTION sentenceSplit(Param1 CLOB)
    return SENTENCES_ARRAY
    AS
    LANGUAGE java
    NAME 'com.contentp.documents.ProcessDocument.sentenceSplit(oracle.sql.CLOB) return oracle.sql.ARRAY';
    FUNCTION removeHTML(Param1 CLOB)
    return CLOB
    AS
    LANGUAGE java
    NAME 'com.contentp.documents.ProcessDocument.removeHTML(oracle.sql.CLOB) return oracle.sql.CLOB';
    end;
    Java sentenceSplit code:
    public static oracle.sql.ARRAY sentenceSplit ( CLOB text) throws IOException, SQLException
    Connection conn = new OracleDriver().defaultConnection();
    String[] arrSentences = sent.getsentences ( CLOBtoString (text) );
    ArrayDescriptor arrayDesc =
    ArrayDescriptor.createDescriptor ("SENTENCES_ARRAY", conn);
    ARRAY ARRSentences = new ARRAY (arrayDesc, conn, arrSentences);
    return ARRSentences;
    I have confirmed that the String[] arrSentences contains a valid string array. So the problem seems to be the creation and passing of ARRSentences.
    I have looked at pages and pages of documents and example code, and can't see anything wrong with my declaration of ARRSentences. I'm at a loss to explain what's wrong.
    Thanks in advance - any help is much appreciated!

    I am trying to do something similar but seems like getting stuck at registerOutParameter for this.
    Type definition:
    CREATE OR REPLACE
    type APL_CCAM9.VARCHARARRAY as table of VARCHAR2(100)
    Java Stored Function code:
    public static ARRAY fetchData (ARRAY originAreaCds, ARRAY serviceCds, ARRAY vvpcs) {
    Connection connection = null;
         ARRAY array = null;
         try {
         connection = new OracleDriver ().defaultConnection();
         connection.setAutoCommit(false);
    ArrayDescriptor adString = ArrayDescriptor.createDescriptor("VARCHARARRAY", connection);
    String[] result = new String [2];
    result[0] = "Foo";
    result[1] = "Foo1";
    array = new ARRAY (adString, connection, result);
    connection.commit ();
    return array;
    } catch (SQLException sqlexp) {
    try {
    connection.rollback();
    } catch (SQLException exp) {
    return array;
    Oracle Stored Function:
    function FETCH_TRADE_DYN_DATA (AREA_CDS IN VARCHARARRAY, SERVICE_CDS IN VARCHARARRAY,VV_CDS IN VARCHARARRAY) return VARCHARARRAY AS LANGUAGE JAVA NAME 'com.apl.ccam.oracle.js.dalc.TDynAllocation.fetchData (oracle.sql.ARRAY, oracle.sql.ARRAY, oracle.sql.ARRAY) return oracle.sql.ARRAY';
    Java Code calling Oracle Stored Procedure:
    ocs = (OracleCallableStatement) oraconn.prepareCall(queryBuf.toString());
                   ArrayDescriptor adString = ArrayDescriptor.createDescriptor("VARCHARARRAY", oraconn);
                   String[] originAreaCds = sTDynAllocationVO.getGeogAreaCds();
                   ARRAY areaCdArray = new ARRAY (adString, oraconn, originAreaCds);
                   ocs.registerOutParameter(1, OracleTypes.ARRAY);
                   ocs.setArray (2, areaCdArray);
                   String[] serviceCds = sTDynAllocationVO.getServiceCds();
                   ARRAY serviceCdsArray = new ARRAY (adString, oraconn, serviceCds );
                   ocs.setArray (3, serviceCdsArray);
                   String[] vvpcs = sTDynAllocationVO.getVesselVoyagePortCdCallNbrs();
                   ARRAY vvpcsArray = new ARRAY (adString, oraconn, vvpcs);
                   ocs.setArray (4, vvpcsArray);
    ocs.execute();
    ARRAY results = ocs.getARRAY(1);
    Error I get:
    Parameter Type Conflict: sqlType=2003
    Thanks for help in advance.

Maybe you are looking for

  • Can I get a refund for an unauthorized app?!

    Can I get a refund for an unauthorized app?!

  • Bit more preloader help

    So, I have my main swf requesting a load of the movie about_mov.fla, which just loads over the entire main movie site. I have a preloader placed as well, but here is my code on the last frame of the main movie, to load the swf: var imageLoader:Loader

  • Can I use single words in a paragraph to show other elements on the stage?

    I want to put a paragraph on the stage. The paragraph would look like this:     " Yada yada yada... so either click here to read Note1, or click here to read Note2. " As you might guess, I want the user to be able to click the underlined words in the

  • Web report data provider change from Master data table to InfoCube

    hi Experts, I have created one report on top of multiprovider but in the selection screen when i check the values for a variable I came to know that data is coming from master data table and not from data provider(InfoCube).Can any one help to change

  • Hp 35s integrating with complex numbers/functions

    Are there any examples of how to integrate a complex function for the HP 35s..the manual suggests its possible..but, I can not find one example...anywhere... I am just interested in testing.....I do not want to break things into parts etc...I just wa