Oracle 8 not connecting from client machines

hello
i am using oracle 8 on windows environment. the problem is that oracle is connecting on the server machine but not on client machine for some days. sometimes i do connects but sometimes the application helds for long time and no response is obtained. Application is residing on the server and drive has been mapped on the client machines. What can be the possible cause. ping on the network is ok.
Waiting...
iftikhar ahmad
Lahore

oracle 8Wauv a historic database from 1997 - http://tonguc.wordpress.com/2006/12/27/history-of-oracle/
do you really have to stay at that version first of all, 11gR1 is out and 9iR2 is de-supported recently and I couldnt find this release's documentation also.
What about tnsping and sqlplus connection from your clients and listener status on your server - lsnrctl status
You may need to set, take and analyze sql*net traces - http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/apxtblsh.htm#i1004660
Best regards.

Similar Messages

  • HOW TO CONNECT FROM CLIENT MACHINE TO REMOTE MACHINE(SERVER DATABASE MACHINE)

    Hi friends.
    I need your valuable help,
    I am using oracle 11g database.
    I have two system.One is client machine and installed oracle 11G client software.
    and from this machine user can connect remote server database(This is old remote system, this is just for Information).
    And i have created one new database called RMANP in new remote server machine (this is the machine, in which i need to connect from client machine)
    ex
    CLIENT MACHINE DETAIL IS:
    system66
    ip address is 192.162.21.66
    REMOTE SEVER MACHINE DETAILS IS:
    system56
    ip address is 192.162.21.56.
    and i add entry on client machine tnsname.ora file like following,
    RMANP=
    (DESCRIPTION=
       (ADDRESS=
         (PROTOCOL=TCP)
         (HOST=192.168.21.56)
         (PORT=1521)
       (CONNECT_DATA=
         (SERVICE_NAME=rmanp)
    But when i try to connect to remote server from client machine in sqlplus, i am getting an error, Like following,
    SQL> CONN SYS/SYSPW AS SYSDBA;
    ERROR:
    ORA-12560: TNS:protocol adapter error

    2684285 wrote:
    Hi friends.
    I need your valuable help,
    I am using oracle 11g database.
    I have two system.One is client machine and installed oracle 11G client software.
    and from this machine user can connect remote server database(This is old remote system, this is just for Information).
    And i have created one new database called RMANP in new remote server machine (this is the machine, in which i need to connect from client machine)
    ex
    CLIENT MACHINE DETAIL IS:
    system66
    ip address is 192.162.21.66
    REMOTE SEVER MACHINE DETAILS IS:
    system56
    ip address is 192.162.21.56.
    and i add entry on client machine tnsname.ora file like following,
    RMANP=
    (DESCRIPTION=
       (ADDRESS=
         (PROTOCOL=TCP)
         (HOST=192.168.21.56)
         (PORT=1521)
       (CONNECT_DATA=
         (SERVICE_NAME=rmanp)
    But when i try to connect to remote server from client machine in sqlplus, i am getting an error, Like following,
    SQL> CONN SYS/SYSPW AS SYSDBA;
    ERROR:
    ORA-12560: TNS:protocol adapter error
    There is nothing in your connect string to tell sqlplus which database you want to connect to.  Therefore it assumes (by default) that you want to connect to a *local* database whose name is identified by the value of the environment variable ORACLE_SID.  And there is no such database, so he gets the reported error trying to establish a connection to a non-existent local service.
    You need to specify your target database, thusly:
    SQL>  conn sys/syspw@rmanp as sysdba
    BTW, connecting to a remote database as sysdba is considered by most DBAs to be a big secruity breach.  If you really need sysdba privileges (rare) you should be logged on to the database server machine with proper OS credentials, and work from there.
    Also, TYPING IN ALL CAPS IS PERCEIVED AS SHOUTING.

  • BOE 4.0 Report Application Server Connectivity from client machine

    Hi,
    We have installed BO 4.0 for RAS. We configured the RAS to pick up the rpt files from local repository, that is from the machine which the Bo is installed.
    But when we try to access the RAS from client machine to process report it is not accepting the request,
    1. Do I need to grant access to any specific user group?
    2. What is the user id which the Report Application Service runs in the machine?
    3. Do I need to add / manage any guest acoount to request from client machine?
    4. How to accept other user request to process reports?
    Here is the error details,
    Message Number: -2147217397
    Message Description: The user account has been disabled. (FWB 00012)
    Please advise,
    Thanks,
    FebiginR
    Edited by: FebiginR on Jan 17, 2012 8:17 PM

    Thanks for your support.
    I searched in otn and i got the information
    http://www.oracle.com/technology/sample_code/products/forms/extracted/getclientinfo/readme.html?_template=/ocom/print
    1)But in Deployment section of this document the first point is copy entire sab and its subdirectories ........ot <oracle_home>\orant\forms60\java directory.
    I can't understand what is "sab" where should i look for it.
    2) Place the signed JavaBean JAR file (getclientinfo.jar.sig) in the codebase directory being used to deploy Oracle Forms Server 6i applications.
    Can you kindly explain this.
    3) where should we write <ARCHIVE = "f60all.jar, getclientinfo.jar.sig">
    Can you kindly explain this.
    Thanking you in anticipation.
    Regards,
    Devendra

  • SMP 3.0 with SP3 AgentryApp is not Connecting from Client : Communications error (14)

    Hello,
    In SMP 3.0 : Version 3.0.2, SP Level:02, my Agentry App : Work Manger 6.0 is working fine, it is running from device and running properly. After i migrate my SMP3.0 from SP02 To SP03, it is not connection from Any Device,(it is not showing any Error in Log file, Means App deployed successfully.) whenever we try to connect from Any device it is showing following Error Message.
    Requesting Public Key from Server
    Communications error (14)
    Connection failed
    Ending transmission
    ??? :  Is there any other confugration need to do in SMP 3.0 : SP03???? please help on this Issue...
    Thanks
    Krishna

    Hello Steve,
    i go through the SAP Note 2008882. based on that Note i run the following
    command.
    C:\windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -pa
    "C:\SAP\MobilePlatform3\Server\configuration\com.sap.mobile.platform.serv
    er.agentry" smpServiceUser.
    Now that Error is Gone from Log file but still it is not allowing to
    connect. Even from ATE also.
    Event Log File :
    06/19/2014 17:54:00, 0,         0,         0, Thr       3192, New files opened events.log, messages.log
    06/19/2014 17:54:00, 0,         0,         2, Thr       3192, Loading the Agentry Runtime's public/private key for password exchanges.
    06/19/2014 17:54:01, 0,         0,         2, Thr       3192, Upgraded the Agentry key pair from pre-SP03 format
    06/19/2014 17:54:01, 0,         0,         2, Thr       3192, Key pair loaded successfully.
    06/19/2014 17:54:01, 0,         0,         2, Thr       3192, Agentry Startup
    06/19/2014 17:54:01, 0,        17,        14, Thr       3192, WebSockets Front End v7.0.3.205
    06/19/2014 17:54:01, 0,         1,         4, Thr       3192, Agentry Server Agent v7.0.3.205
    06/19/2014 17:54:01, 0,        20,       150, Thr       1656, Loading Development application definitions
    06/19/2014 17:54:07, 0,        24,         4, Thr       1656, Loaded HTTPXML-HTTPXMLSystemConnection (HTTPXML v7.0.3.205) from ag3httpxmlbe.dll
    06/19/2014 17:54:07, 1,         3,         9, Thr       1656, Java-1, Chickaming Java, initialHeapSize, File: , ..\agentry\SystemLogger.cpp#792:DTLoggerHandler::badKey
    06/19/2014 17:54:07, 1,         3,         9, Thr       1656, Java-1, Chickaming Java, maxHeapSize, File: , ..\agentry\SystemLogger.cpp#792:DTLoggerHandler::badKey
    06/19/2014 17:54:07, 1,         3,         9, Thr       1656, Java-1, Chickaming Java, reduceOSSignalUse, File: , ..\agentry\SystemLogger.cpp#792:DTLoggerHandler::badKey
    06/19/2014 17:54:07, 1,         3,         9, Thr       1656, Java-1, Chickaming Java, nonStandardJavaOptions, File: , ..\agentry\SystemLogger.cpp#792:DTLoggerHandler::badKey
    06/19/2014 17:54:20, 0,        23,         4, Thr       1656, Loaded Java Back End (Java v7.0.3.205) from ag3javabe.dll
    06/19/2014 17:54:20, 0,        20,       152, Thr       1656, Loading Development application definitions for default localization
    06/19/2014 17:54:20, 0,        20,       153, Thr       1656, Finished loading Development application definitions for default localization
    06/19/2014 17:54:20, 0,        20,       151, Thr       1656, Finished loading Development application definitions
    06/19/2014 17:54:21, 0,        20,         4, Thr       3192, Server v7.0.3.205
    06/19/2014 17:54:21, 0,        17,        10, Thr       3192, WebSockets Front End v7.0.3.205
    06/19/2014 17:54:21, 0,         0,         0, Thr       3192, Old log files moved into C:\SAP\MobilePlatform3\Server\log\agentry\rolled\2014-06-19-175400
    06/19/2014 17:54:21, 0,         0,        23, Thr       3192, Agentry startup is complete.
    Thanks
    Krishna

  • Is it possible to export (expdp) oracle table from client machine ?

    Is it possible to export (expdp*) oracle table from client machine, without using Remote desk top connection ?*
    1) Database-10g server is in America
    2) client machine is in India
    3) Oracle client-10g software is installed in my machine
    4) I am able to connect to the server, could see all tables
    5) one table is with 35 million record, I wanted to export this table using data pump, is it possible?
    note: without using Remort desk top connection.

    Hi
    I used the following syntax , but I am getting error
    6) connect sys as sysdba
    create directory test_dir as '/dbusr1/exp_test'
    grant read, write on directory test_dir to user1;
    7) expdp user1/pwd1@xyz tables=test_1 directory=test_dir dumpfile=test_file.dmp logfile=test_file.log
    8) Errors
    In linux prompt I am getting this error
    -bash: expdp: command not found
    In windows cmd prompt I am getting this error
    ORA-39002: invalid operation
    ORA-39070: Unable to open the log file.
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE";, line 488
    ORA-29283: invalid file operation
    9) why ?
    -- Does the user ( "user1") should have any system level privilege ? to export his own table?
    -- This folder ('/dbusr1/*exp_test'*) has write privilege in os level.
    Thanks in advance
    sbmk_design
    Edited by: sbmk_design on Aug 24, 2009 12:06 AM

  • Path does not exit - While trying to save file on SharPoint Server 2013 from client machine

    Hi,
    I have installed Microsoft SharePoint Server 2013 Enterprise Edition on my testing Lab environment (On VM Workstation 10) on Windows Server 2012 with SQL server 2012, I can access all files stored at SharePoint Server from any physical machine, I can share
    a single file among different people to work simultaneously, but here i stuck on saving any file from client machine to directly on SharePoint Server, Attached is the snap shot, whenever I try to save any file directly It says Path Does Not Exist, If I drag
    and drop any file directly to SharePoint I do not see any error message.
    I read from different posts that I need to Enable Desktop Experience Feature on Server 2012, which I installed but no positive result gained :(
    I will appreciate for any possible help?
    Ali

    Hi Ali,
    Please try disabling the protected view per the link below and test the issue again:
    http://social.technet.microsoft.com/Forums/en-US/b8381a19-3394-406f-8adb-1976f45460ef/path-does-not-exit-while-trying-to-save-file-on-sharpoint-server-2013-from-client-machine?forum=sharepointgeneral
    You could simply type the url as http://sp/sites/sitename in the Filename place.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Running Pro*C from client machine

    Hi
    I trying to run a Pro*c program which tries to connect to DB which is running on different server.
    While running this I am getting "ORA-12560: TNS:protocol adapter error".
    One suggestion I found that Pro*C application should run on DB server.
    is there any workaround so that we can run pro*C from client machine?
    Or running on server is only possibility?
    Thanks
    Shailesh

    Sorry, I may have misunderstood your problem. I believe that this issue has to do with your tnsnames.ora file. You need to configure your DB to be able to talk to the Pro*C program. In order to do this, you need to set up an LISTENER for EXTERNAL_PROC (for external processes). This is automatically created when you install the DB. You can also create a listener using Network configuration manager. You just need to specify the proctocol, IPC or TCP/IP and the KEY = extproc (can be anything)
    listener.ora (techobs.com is just the domain name)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    TNSNAMES.ora where you you must specify the SID for the external proc
    EXTPROC_CONNECTION_DATA.TECHOBS.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(Key = EXTPROC0))
    (CONNECT_DATA = (SID = extp))
    Note: I learned this when doing the installation of OC. If I am wrong, I would hope that somebody would show me where because this is Oracle DBA.

  • How to delete file from client machine

    Hi all,
    we are using the DataBase: oracle:10g,
    and forms/reports 10g(developer suite 10g-10.1.2.2).
    can anybody help me how to delete the file from client machine in specified location using webutil or any
    (i tried with webutil_host & client_host but it is working for application server only)
    thank you.

    hi
    check this not tested.
    PROCEDURE OPEN_FILE (V_ID_DOC IN VARCHAR2)
    IS
    -- Open a stored document --
    LC$Cmd Varchar2(1280) ;
    LC$Nom Varchar2(1000) ;
    LC$Fic Varchar2(1280);
    LC$Path Varchar2(1280);
    LC$Sep Varchar2(1) ;
    LN$But Pls_Integer ;
    LB$Ok Boolean ;
    -- Current Process ID --
    ret WEBUTIL_HOST.PROCESS_ID ;
    V_FICHERO VARCHAR2(500);
    COMILLA VARCHAR2(4) := '''';
    BOTON NUMBER;
    MODO VARCHAR2(50);
    URL VARCHAR2(500);
    Begin
    V_FICHERO := V_ID_DOC;
    LC$Sep := '\';--WEBUTIL_FILE.Get_File_Separator ; -- 10g
    LC$Nom := V_FICHERO;--Substr( V_FICHERO, instr( V_FICHERO, LC$Sep, -1 ) + 1, 100 ) ;
    --LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
    LC$Path := 'C:';
    LC$Fic := LC$Path || LC$Sep || LC$Nom ;
    If Not webutil_file_transfer.DB_To_Client
    LC$Fic,
    'TABLE_NAME',
    'ITEM_NAME',
    'WHERE'
    ) Then
    Raise Form_trigger_Failure ;
    End if ;
    LC$Cmd := 'cmd /c start "" /MAX /WAIT "' || LC$Fic || '"' ;
    Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
    LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
    If LN$But 0 Then
    Set_Alert_Property( 'ALER_STOP_1', TITLE, 'Host() command' ) ;
    Set_Alert_Property( 'ALER_STOP_1', ALERT_MESSAGE_TEXT, 'Host() command error : ' || To_Char( LN$But ) ) ;
    LN$But := Show_Alert( 'ALER_STOP_1' ) ;
    LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Raise Form_Trigger_Failure ;
    End if ;
    If Not webutil_file_transfer.Client_To_DB
    LC$Fic,
    'TABLE_NAME',
    'ITEM_NAME',
    'WHERE'
    ) Then
    NULL;
    Else
    Commit ;
    End if ;
    LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Exception
    When Form_Trigger_Failure Then
    Raise ;
    End ;sarah

  • SSH and media wiki not connecting from outside of my LAN

    I cant seem to connect to ssh or my mediawiki server from outside of my LAN. Ive forwarded all the needed ports and been going over my config all night. I also made sure my router wasn't blocking anything.
    -ssh tells me connection denied
    -when i go to my http server i can list directorys but as soon as i try to load media wiki i get a 502 error
    *these problems do not happen if im connecting from another machine in my local LAN
    This is my sshd_config
    # $OpenBSD: ssh_config,v 1.25 2009/02/17 01:28:32 djm Exp $
    # This is the ssh client system-wide configuration file. See
    # ssh_config(5) for more information. This file provides defaults for
    # users, and the values can be changed in per-user configuration files
    # or on the command line.
    # Configuration data is parsed as follows:
    # 1. command line options
    # 2. user-specific file
    # 3. system-wide file
    # Any configuration value is only changed the first time it is set.
    # Thus, host-specific definitions should be at the beginning of the
    # configuration file, and defaults at the end.
    # Site-wide defaults for some commonly used options. For a comprehensive
    # list of available options, their meanings and defaults, please see the
    # ssh_config(5) man page.
    #Host *
    # ForwardAgent no
    # ForwardX11 yes
    # RhostsRSAAuthentication no
    # RSAAuthentication yes
    # PasswordAuthentication yes
    #HostbasedAuthentication yes
    # GSSAPIAuthentication no
    # GSSAPIDelegateCredentials no
    # BatchMode no
    # CheckHostIP yes
    #AddressFamily any
    # ConnectTimeout 0
    # StrictHostKeyChecking ask
    # IdentityFile ~/.ssh/identity
    # IdentityFile ~/.ssh/id_rsa
    # IdentityFile ~/.ssh/id_dsa
    #Port 22
    Protocol 2
    # Cipher 3des
    # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
    # MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160
    # EscapeChar ~
    # Tunnel yes
    # TunnelDevice any:any
    # PermitLocalCommand no
    # VisualHostKey no
    #RSAAuthentication yes
    #PubkeyAuthentication yes
    #HostbasedAuthentication no
    #PasswordAuthentication no
    #HashKnownHosts yes
    #StrictHostKeyChecking ask
    #LoginGraceTime 120
    #PermitRootLogin no # (put yes here if you want root login)
    hosts.deny
    # /etc/hosts.allow
    sshd: ALL
    mysqld: ALL
    # End of file
    # /etc/hosts.deny
    ALL: ALL: DENY
    # End of file
    hosts.allow
    # /etc/hosts.allow
    sshd: ALL
    mysqld: ALL
    # End of file
    I feel like its a security policy or something im not catching.
    Ive been searching and working to fix this all night to no avail.
    Thanks ahead of time for any help.

    djszapi wrote:
    Hello ahronzombi!
    Do you try it with apache web server ? If yes, is there any related information in the apache.log when someone try to connect from out. What's in your http server related config files, vhosts, etc?
    Ill try that today. i tried something similar with sshd and looked at the verbose output of the program when trying to connect remotely. it was never touched, like no one tried to connect. i feel like its a network security issue since i can connect locally. but ill check these logs as well

  • Reading Large data files from client machine ( urgent)

    Hi,
    I want to know the best way for reading large data at about 75MB file from client machine and insert to the database.
    Can anybody provide sample code for it.
    Loading the file should be done at client machine and inserting into the database should be done at server side.
    How should i load the file?
    How should i transfer this file or data to server ?
    How should i insert into the database ?
    Thanks in advance.
    regards
    Kalyan

    Like I said before you should be using your application server to serve files >from the server off the filesystem. The database should not store files this big >and should instead just have a reference to this file. I think u have not understood the problem corectly.
    I will make it clear.
    The requirement is as follows.
    This is a j2ee based application.
    Application server is oracle application server.
    Database is oracle9i
    it is thick client (swing based application)
    User enters datasource like c:\turkey.data
    This turkey.data file contains data
    1@1@20050131@1@4306286000113@D00@32000002005511069941@@P@10@0@1@0@0@0@DK@70059420@4330654016574@1@51881100@51881100@@99@D@40235@0@0@1@430441800000000@@11@D@42389@20050201@28483@15@@@[email protected]@@20050208@20050307@0@@@@@@@@@0@@0@0@0@430443400000800@0@0@@0@@@29@0@@@EUR
    like wise we may have more than 3 lacs rows in it.
    We need to read this file and transfer this to the application server. Which are EJBS.
    There we read this file each row in file is one row in the database for a table.
    Like wise we need to insert 3 lacs records in the database.
    We can use Jdbc to insert the data which is not a problem.
    Only problem is how to transfer this data to server.
    I can do it in one way. This is only a example
    I can read all the data in StringBuffer and pass to server.
    There again i get the data from StringBuffer and insert into database using jdbc.
    This way if u do it. It is performance issue and takes long time to insert into the database.It even may give MemoryOutofBond exception.
    just iam looking for the better way of doing this which may get good performace issue.
    Hope u have understood the problem.

  • How to find out a file from client machine

    hi all,
    I want to read a file from client machine, like a outlook express file in which all the address are saved, using servlet. Initially i do not know the file path for that file, How i can read that file.
    plz help me
    thanx in advace
    Manish

    You have 2 possibilities. First, you might be able to mount the client's disk drive at the server; the servlet can then access that drive directly. Second, install a client program on the client machine and communicate with that program, and have it do the search (or whatever).
    Outside of Java, there are remote-access programs - like PCAnyWhere.

  • How to upload file from client machine to  database in server machine?

    I am developing a web application. this application is suppose to take file from client machine and store that to database in the server side.
    My jsp form is of multi part type. but I am confused about what to write in servlet.
    Can any one help me ?
    Edited by: chinmaya_mishra on Feb 16, 2009 2:55 AM
    Edited by: chinmaya_mishra on Feb 16, 2009 2:58 AM

    http://www.google.com/search?q=jdbc+blob
    Blob processing varies between databases; see also examples for whatever database you are using, e.g.
    http://www.google.com/search?q=jdbc+blob+oracle
    If you are storing text data instead of binary data, replace "blob" by "clob" in the searches.

  • Print report from client machine without showing in screen

    Hi guys!!
    I m using (forms10g+ 10gAS). I want to Print report from client machine without showing in the screen/monitor.
    Currently I m generating report in pdf format. From the pdf I m printing the document.
    But my requirements is to print directly to the printer without showing preview
    Thanks in advance
    Mokarem

    Maybe this will help:
    http://forums.oracle.com/forums/thread.jspa?messageID=1209371&#1209371
    Gary

  • Reading files from clients machine through a browser

    if i have to access or use some files say C:\hello\myimage.jpg from client machine's local drive, how it can be done using some technology in Java eg applets or some other way. please read the following situation to have a better undertsanding of the problem,
    consider the following situation:
    a web application is running on client PC, and on click of a button, i have to generate a report in some format and insert some images in that report which are on clients local drive and their path is known to me say C:\ myimage.jpg.
    if the mages were on the server(where web application is hosted), then its not a prob.
    if there any other technology in java to read files from clients PC through a browser other than java

    Sign the applet.
    http://forum.java.sun.com/thread.jspa?forumID=63&threadID=524815
    second and last post

  • Reg :File upload and download from client machine

    hi..
    anyone help me the way that how to upload and download word
    document file from client machine.. i am using j2eeserver1.4 in linux..
    i want upload file from client machine(windows) to server(linux.) please
    help me . tell me idea regarding..
    i have tried this coding.. but i can transfer txt file. only. when i upload mirosoft word file.. it will open with some ascii values with actual content.
    <!-- upload.jsp -->
    <%@ page import="java.io.*" %>
    <%String contentType = request.getContentType();
    String file = "";
    String saveFile = "";
    FileOutputStream fileOut = null;
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while (totalBytesRead < formDataLength)
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    try { 
    file = new String(dataBytes);
    saveFile = file.substring(file.indexOf("filename=\"") + 10);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("/") + 1,saveFile.indexOf("\""));
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex + 1,contentType.length());
    int pos;
    pos = file.indexOf("filename=/" + 1);
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    String folder = "/tmp/uploads/";
    fileOut = new FileOutputStream(folder + saveFile);
    fileOut.write(dataBytes);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush(); } catch(Exception e) {  out.print(e);
    } finally
    {  try
    {fileOut.close();
    }catch(Exception err)
    %>
    please which package will help me to upload word document file with no errror. send me how can use in ftp.. send me some sample program..
    Regards..
    New User M.Senthil..

    Hi,
    Well,i don't know whether if this helps people here are not.
    It is always a good practise to do it via Servlet and then download content.
    The adavantage of doing this is
    1). You may not need to pack the downloadable with the .war which you ultimately genrate which ceratinly help us in terms of faster deployment.
    3). You may update the new content just by moving a file to the backup folder.
    2).One may definately download the content irrespective to the content/file.
    Hope example below helps..
    Configurations:
    In the above example we are assuming that we placing all downlodable file in D:/webapp/downlodables/ and you have configured the same path as a init param with the name "filePath" in your web.xml.
    something like the one below.
    <servlet>
        <servlet-name>DownloadServlet</servlet-name>
        <servlet-class>com.DownloadServlet</servlet-class>
        <init-param>
           <param-name>filePath</param-name>
           <param-value>D:/webapp/downlodables/</param-name>
           <!--Could use any backup folder Available on your Server-->
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>DownloadServlet</servlet-name>
        <url-pattern>/downloadFile</url-pattern>
    </servlet-mapping>DownloadServlet.java:
    ==================
    package com;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import javax.activation.MimetypesFileTypeMap;
    *@Author RaHuL
    /**Download Servlet
    *  which could be accessed downloadFile?fid=fileName
    *  or
    *  http://HOST_NAME:APPLN_PORT/ApplnContext/downloadFile?fid=fileName
    public class DownloadServlet extends HttpServlet{
      private static String filePath = new String();
      private static boolean dirExists = false;
      public void init(ServletConfig config){
          // Acquiring Backup Folder Part
          filePath = config.getInitParameter("filePath");
          dirExists = new File(filePath).exists();      
      private void processAction(HttpServletRequest request,HttpServletResponse response) throws Exception{
           // Some Authentication Checks depending upon requirements.
           // getting fileName which user is requesting for
           String fileName = request.getParameter("fid");
           //Building the filePath
           StringBuffer  tFile = new StringBuffer();
           tFile.append(filePath);    
           tFile.append("fileName"); 
           boolean exists = new File(tFile.toString()).exists();
           // Checking whether the file Exists or not      
           if(exists){
            FileInputStream input = null;
            BufferedOutputStream output = null; 
            int contentLength = 0;
            try{
                // Getting the Mime-Type
                String contentType = new MimetypesFileTypeMap().getContentType(tFile.toString());          
                input = new FileInputStream(tFile.toString());
                contentLength = input.available();
                response.setContentType(contentType);
                response.setContentLength(contentLength);
                response.setHeader("Content-Disposition","attachment;filename="+fileName);
                output = new BufferedOutputStream(response.getOutputStream());
                while ( contentLength-- > 0 ) {
                   output.write(input.read());
                 output.flush();
              }catch(IOException e) {
                     System.err.println("Exception Occured:"+e.getMessage());
                 System.err.println("Exception Localized Message:"+e.getLocalizedMessage());
              } finally {
                   if (output != null) {
                       try {
                          output.close();
                      } catch (IOException ie) {
                          System.err.println("Exception Occured:"+e.getMessage());
                             System.err.println("Exception Localized Message:"+e.getLocalizedMessage());                      
           }else{
             response.sendRedirect("/errorPage.html");
      public void doPost(HttpServletRequest request,HttpServletResponse response) throws Exception{       
            processAction(request,response); 
      public void doGet(HttpServletRequest request,HttpServletResponse response) throws Exception{
            processAction(request,response); 
    NOTE: Make sure You include activations.jar in your CLASSPATH b4 trying the code.
    therefore,if you have something like above set as your application enviroment in the above disccussed
    can be done by just giving a simple hyper link like
    <a href="downloadFile?fid=fileName.qxd" target="_blank">Download File</a>REGARDS,
    RaHuL

Maybe you are looking for

  • How can I add a row into a JTable with JButton

    Hi all. I have the following code: package gui; import db.*; import javax.swing.table.AbstractTableModel; import java.util.ArrayList; public class FoundersTable extends AbstractTableModel{     private static final int COLUMNS = 8;     private String

  • Additional Fields In me21n

    hi all, My requirement is to add additional fields  in a new tab at header & line item level in ME21N.Ive copied the sample code of SAP in the interface of BADI ME_GUI_PO_CUST. but i cant see any new tab when i run the trx ME21N.Can any one suggest a

  • Information record

    Dear All, We are created a purchase order and before saving have checked the check box for creation of info record but when we go the info record and click on conditions to check the conditions but no condition exist. Secondly it gives an message "No

  • Quality ?  iPhoto Book vs. Koday Easyshare

    Has anyone compared books from these two services? I've received prints from Easyshare (formerly Ofoto), and they've been excellent - no books yet. The one book I got from iPhoto was not so hot - but I have read about the resolution settings that one

  • IPhoto doesn't recognize my iPhone

    When I plug my phone into my mac and open up iPhoto, it says it recognizes my brother's iPhone. It also says there are no pictures to import. I have an iPhone full of photos I'd like to import to my mac. I have used iPhoto on this mac before, but thi