File upload to web server

I need a little help with the file upload process in flex..
I am trying to upload a file.. i had it where i would get a cgi-script url passing as the following
filename="filename"&filedata="data of the file"
then my cgi script "written in C" would read from standard in.. and write the info to a file...
now i get the following..
------------KM7Ef1gL6Ij5cH2ae0ei4Ij5GI3Ef1
Content-Disposition: form-data; name="Filename"
Botanical Garden 239.JPG
------------KM7Ef1gL6Ij5cH2ae0ei4Ij5GI3Ef1
Content-Disposition: form-data; name="Filedata"; filename="Botanical Garden 239.JPG"
Content-Type: application/octet-stream
in the file i am trying to write.... Can anyone help me fix this problem? I am clueless at this point on what to do..
sample code below is what i got from trying to work this...
Thanks in advanced for anyones help..
<code>  
const FILE_UPLOAD_URL:String = "http://172.16.1.6:1111/cgi-bin/login.cgi"; 
private function init():void {fileRef =
new FileReference();fileRef.addEventListener(Event.SELECT, fileRef_select);
fileRef.addEventListener(ProgressEvent.PROGRESS, fileRef_progress);
fileRef.addEventListener(Event.COMPLETE, fileRef_complete);
private function browseAndUpload():void {fileRef.browse();
message.text =
private function fileRef_select(evt:Event):void { 
try {message.text =
"size (bytes): " + numberFormatter.format(fileRef.size);fileRef.upload(
new URLRequest(FILE_UPLOAD_URL) ); 
trace("going to print file data in a sec... ready?"); 
trace(fileRef.data); 
trace(fileRef.name );}
catch (err:Error) {message.text =
"ERROR: zero-byte file";}
private function fileRef_progress(evt:ProgressEvent):void {progressBar.visible =
true;}
private function fileRef_complete(evt:Event):void {message.text +=
" (complete)";progressBar.visible =
false;}
</code>

Here are some code....
Forms
<%@ page language="java" session="true" %>
<html>
<head>
<script>
</script>
</head>
<body>
<form name="myform" method="post" action="fileproc.jsp" enctype="multipart/form-data">
<input type="file" name="myfile">
<input type="submit" value="submit">
</form>
</body>
</html>Process
<%@ page language="java" session="true" import="com.oreilly.servlet.*"%>
<html>
<head>
</head>
<body>
<% String s = request.getParameter("myfile"); %>
<%=s%>
<br>
<%
   MultipartRequest multi = new MultipartRequest(request, "C:/multipart/", 10*1024*1024); // 10MB
   Enumeration params = multi.getParameterNames();
   while (params.hasMoreElements()) {
     String name = (String)params.nextElement();
     String value = multi.getParameter(name);
     out.println(name + " = " + value);
   out.println();
   Enumeration e = multi.getFileNames();
   while(e.hasMoreElements()){
       String fname = (String)e.nextElement();
       out.println("<h1>"+fname+"</h1>");
       File fl = multi.getFile(fname);
       FileReader fr = new FileReader(fl);
       BufferedReader buf = new BufferedReader(fr);
       while(buf.ready()){
           out.println(buf.readLine());
       out.println();
       buf.close();
       fl.delete();
%>
</body>
</html>Hope this helps....

Similar Messages

  • File upload through web server to weblogic

    WAS: Weblogic 10.3
    Web Server: Sun One Web Server 6.1
    JDK: 1.4
    I've deployed a web application(*.war) to weblogic server, and try to upload a file through sun one web server(webserver) to the weblogic. The 'webserver' does nothing but bypass the request to weblogic. When I do upload a file to weblogic server directly without though webserver it's ok. I mean the uploaded file would be written to a specfied saving directory on server as soon as the upload process gets start. But with going through webserver, it does not happen immediately. After a long time passed the uploaded file begins to be written to the saving directory. The 'webserver' seems to buffer the amount as much as the file size, and then send them to weblogic. To sovle this problem I tried to change the webserver configuration(magnus.conf) as like,
    ChunkedRequestBufferSize 0, UseOutputStreamSize
    But doesn't work.
    Is there somthing of I'm missing? Get me out of this struggling.

    Thanks for your comments.
    What I'm doing is that first I made a simple upload jsp file using 'com.oreilly.servlet.MultipartRequest', and then try to upload with a html page over IE browser.
    That is,
    IE browser ( Local PC ) ---> Sun One Web Server ( Remote machine ) ---> Weblogic ( Local PC ).
    And I also peeked into the transferred data between webserver and weblogic. What I've found is that all data in the upload file would be buffered into webserver and then flushed out to weblogic at one time. I want to upload the file to weblogic server without buffering in webserver. Rather than a bug of webserver, I thinik I missed some configuration stuff of webserver, or weblogic.
    Local PC: Windows XP
    IE: 6.0
    Web Server: Sun One Web Server 6.1 SP9
    Weblogic: 10.3.0.0
    upload filesize: 4MB

  • Uploading a file to the web server

    How can i upload a file to the web server using JSP.

    hello sir,
    Could U even tell me performance which one is better.
    U have mentioned that Multipartrequest is Complex for Beginers,
    but as far as performance is concerned which is better.
    If Taglib is used is it error Free , as I do not know much abt taglib.
    have just read a little abt it , have never created my own Custome Tag.
    Could U just Guide me which is the best site where I could get know a little abt Taglib.An easy tutorial where I could read and start working on My application.
    I have been given a Deadline. So Please help me man.
    If U have the source Code for Uploading of a File Please Cut Paste it.
    I have to finish the project on time .
    Please
    With Regards
    Eklavya

  • Problem uploading Muse-exported files on my Web server

    I'm using the FTP client Transmit for years and I'm very pleased with it.
    I use also Muse from the first preview and I always use the "Export to HTML" feature, and place the files on my remotely-hosted Web servers (NetSol).
    When I upload all kind of files (HTML, CSS, .ZIP, videos,…), everything works fine.
    Since yesterday, when I upload files generated by Muse, Transmit stalls and is unable to save the file on the Web server. I receive all kind of transfer errors.
    Something must have happened recently.
    I use the latest Muse CC2014 version and the latest Transmit version.
    I called NetSol support and they said they change nothing on their Web servers recently. They point out that all my non-Muse files upload correctly.
    The big problem is that I can't update my websites anymore.
    How to share here the exported Muse folder?
    Thank you.

    Switched to FileZilla
    Here's the current log and it is failing all the time.
    NetSol told me they have restarted the server and checked for authorisations, and they say it should work as it works for other files.
    Status:      Connection established, waiting for welcome message...
    Response: 230 Login successful.
    Command: SYST
    Response: 215 UNIX Type: L8
    Command: FEAT
    Response: 211-Features:
    Response:  EPRT
    Response:  EPSV
    Response:  MDTM
    Response:  PASV
    Response:  REST STREAM
    Response:  SIZE
    Response:  TVFS
    Response:  UTF8
    Response: 211 End
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Retrieving directory listing...
    Command: PWD
    Response: 257 "/"
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,122,127)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Status:      Directory listing successful
    Status:      Retrieving directory listing...
    Command: CWD /htdocs
    Response: 250 Directory successfully changed.
    Command: PWD
    Response: 257 "/htdocs"
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,123,133)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Status:      Directory listing successful
    Status:      Retrieving directory listing...
    Command: CWD /htdocs/indesign
    Response: 250 Directory successfully changed.
    Command: PWD
    Response: 257 "/htdocs/indesign"
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,124,119)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Status:      Directory listing successful
    Status:      Retrieving directory listing...
    Command: CWD /htdocs/indesign/digitalpublishing
    Response: 250 Directory successfully changed.
    Command: PWD
    Response: 257 "/htdocs/indesign/digitalpublishing"
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,125,9)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Status:      Directory listing successful
    Status:      Retrieving directory listing...
    Command: CWD /htdocs/indesign/digitalpublishing/twixl
    Response: 250 Directory successfully changed.
    Command: PWD
    Response: 257 "/htdocs/indesign/digitalpublishing/twixl"
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,125,96)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Status:      Directory listing successful
    Status:      Retrieving directory listing...
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Command: PWD
    Response: 257 "/htdocs/indesign/digitalpublishing/twixl/twixlfacts"
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,125,186)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Status:      Calculating timezone offset of server...
    Command: MDTM sitemap.xml
    Response: 213 20140918164807
    Status:      Timezone offsets: Server: 0 seconds. Local: 7200 seconds. Difference: 7200 seconds.
    Status:      Directory listing successful
    Status:      Retrieving directory listing...
    Command: CDUP
    Response: 250 Directory successfully changed.
    Command: PWD
    Response: 257 "/htdocs/indesign/digitalpublishing/twixl"
    Status:      Directory listing successful
    Status:      Retrieving directory listing...
    Command: CWD twixlfacts
    Response: 250 Directory successfully changed.
    Command: PWD
    Response: 257 "/htdocs/indesign/digitalpublishing/twixl/twixlfacts"
    Status:      Directory listing successful
    Command: DELE sitemap.xml
    Response: 250 Delete operation successful.
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/css/site_global.css
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/css/index.css
    Response: 250 Directory successfully changed.
    Command: TYPE A
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 250 Directory successfully changed.
    Command: TYPE A
    Response: 227 Entering Passive Mode (206,188,192,135,130,87)
    Command: STOR site_global.css
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,130,92)
    Command: STOR index.css
    Response: 150 Ok to send data.
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connection established, waiting for welcome message...
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/css/site_global.css
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/css/index.css
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Response: 227 Entering Passive Mode (206,188,192,135,133,227)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Command: TYPE A
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,135,193)
    Command: STOR site_global.css
    Response: 227 Entering Passive Mode (206,188,192,135,135,195)
    Command: STOR index.css
    Response: 150 Ok to send data.
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/css/site_global.css
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,139,52)
    Command: LIST
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 150 Here comes the directory listing.
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 226 Directory send OK.
    Command: TYPE A
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 227 Entering Passive Mode (206,188,192,135,139,81)
    Command: STOR site_global.css
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/css/index.css
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,139,110)
    Command: STOR index.css
    Response: 150 Ok to send data.
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/index.html
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,143,173)
    Command: STOR index.html
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/muse_manifest.xml
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,143,241)
    Command: STOR muse_manifest.xml
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/index.html
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,146,182)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,146,224)
    Command: STOR index.html
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/muse_manifest.xml
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,147,43)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,147,77)
    Command: STOR muse_manifest.xml
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/muse_manifest.xml
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,152,8)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,152,60)
    Command: STOR muse_manifest.xml
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/index.html
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,153,212)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,153,253)
    Command: STOR index.html
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/sitemap.xml
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,156,194)
    Command: STOR sitemap.xml
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/css/index.css
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts/css
    Response: 550 Failed to change directory.
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Command: MKD css
    Response: 257 "/htdocs/indesign/digitalpublishing/twixl/twixlfacts/css" created
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts/css
    Response: 250 Directory successfully changed.
    Command: PWD
    Response: 257 "/htdocs/indesign/digitalpublishing/twixl/twixlfacts/css"
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,158,202)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,158,252)
    Command: STOR index.css
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/sitemap.xml
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,161,149)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,161,186)
    Command: STOR sitemap.xml
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/css/index.css
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts/css
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,163,215)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,164,8)
    Command: STOR index.css
    Response: 150 Ok to send data.
    Error:        Connection timed out
    Error:        File transfer failed
    Status:      Resolving address of XXXXXXX.netsolhost.com
    Status:      Connecting to XXX.XXX.XXX.XXX:21...
    Status:      Connection established, waiting for welcome message...
    Response: 220 (vsFTPd 2.3.4)
    Command: USER ftpXXXXXXX
    Response: 331 Please specify the password.
    Command: PASS ********
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status:      Connected
    Status:      Starting upload of /Users/blackmountainprod01/Documents/Google Drive/eCampus.pro/cours/Twixl Publisher/Twixl Facts!/export/sitemap.xml
    Command: CWD /htdocs/indesign/digitalpublishing/twixl/twixlfacts
    Response: 250 Directory successfully changed.
    Status:      Retrieving directory listing...
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,166,69)
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Directory send OK.
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (206,188,192,135,166,96)
    Command: STOR sitemap.xml

  • I want to cache all files in my web server for JRE auto installation

    Hi,
    I have written an application for my customer. When they access my web server, they will auto-install jre 6.12 and then load my application using jnlp. All that is done, but i want to improve in the following ways:
    1. I want to have more quiet installation of java. It should only show progress bar or just run in background. In the jre installation file (cab file), there is a file jinstall-6u12.inf, the last line is "run=%EXTRACT_DIR%\jinstall.exe /installurl=http://localhost/1.6.0_12-b04.xml /installmethod=plugin". What should I add to this line to make the installation more quiet?
    2. When my client install jre, i want them to fetch all necessary files from my web server, so when java web site is down, i can still provide files they need to install java. I am aiming jre 6.12 only.
    Thank you in advance.
    William

    Open Macintosh HD > Applications > Utilitiies > AirPort Utility
    Click on the Time Capsule icon
    In AirPort Utility 6.x.....click Edit to the right of the Time Capsule
    In AirPort Utility 5.x.....click Manual Setup
    Click the Disks icon/tab at the top of the next window
    Click Erase
    The "Quick Erase" option will only take a few minutes, but it is not a secure Erase.
    The "Zero Out" option will replace everything on the disk with zeros, and will likely take 4-6 hours for the process to complete, depending on the size of the drive.
    The erase procedure will only affect the disk. It will not affect any of the network settings, passwords, etc that you have stored on the Time Capsule.

  • File Based Multithreaded Web Server Question

    Hi friends,
    I have the code of a simple File Based Multithreaded Web Server. I have been asked to add proper http/1.1 Keep-Alive behavior to it. As far as I understand it means to use the same socket for the request coming from the same client without opening a new socket for every request by it. I am unable to implement it. Any help would be greatly appreciated. The entire code is as below:
    package multithreadedwebserver.com;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    /** This Class declares the general and HTTP constants
    * and defines general static methods:
    class Constants {
    /** 2XX: generally "OK" */
    public static final int HTTP_OK = 200;
    public static final int HTTP_CREATED = 201;
    public static final int HTTP_ACCEPTED = 202;
    public static final int HTTP_NOT_AUTHORITATIVE = 203;
    public static final int HTTP_NO_CONTENT = 204;
    public static final int HTTP_RESET = 205;
    public static final int HTTP_PARTIAL = 206;
    /** 3XX: relocation/redirect */
    public static final int HTTP_MULT_CHOICE = 300;
    public static final int HTTP_MOVED_PERM = 301;
    public static final int HTTP_MOVED_TEMP = 302;
    public static final int HTTP_SEE_OTHER = 303;
    public static final int HTTP_NOT_MODIFIED = 304;
    public static final int HTTP_USE_PROXY = 305;
    /** 4XX: client error */
    public static final int HTTP_BAD_REQUEST = 400;
    public static final int HTTP_UNAUTHORIZED = 401;
    public static final int HTTP_PAYMENT_REQUIRED = 402;
    public static final int HTTP_FORBIDDEN = 403;
    public static final int HTTP_NOT_FOUND = 404;
    public static final int HTTP_BAD_METHOD = 405;
    public static final int HTTP_NOT_ACCEPTABLE = 406;
    public static final int HTTP_PROXY_AUTH = 407;
    public static final int HTTP_CLIENT_TIMEOUT = 408;
    public static final int HTTP_CONFLICT = 409;
    public static final int HTTP_GONE = 410;
    public static final int HTTP_LENGTH_REQUIRED = 411;
    public static final int HTTP_PRECON_FAILED = 412;
    public static final int HTTP_ENTITY_TOO_LARGE = 413;
    public static final int HTTP_REQ_TOO_LONG = 414;
    public static final int HTTP_UNSUPPORTED_TYPE = 415;
    /** 5XX: server error */
    public static final int HTTP_SERVER_ERROR = 500;
    public static final int HTTP_INTERNAL_ERROR = 501;
    public static final int HTTP_BAD_GATEWAY = 502;
    public static final int HTTP_UNAVAILABLE = 503;
    public static final int HTTP_GATEWAY_TIMEOUT = 504;
    public static final int HTTP_VERSION = 505;
    /* the Web server's virtual root directory */
    public static File root;
    static PrintStream log = null;
    /* Configuration information of the Web server is present
    * in this props object
    protected static Properties props = new Properties();
    /* timeout on client connections */
    static int timeout = 0;
    /* maximum number of worker threads */
    static int workerThreads = 5;
    /* General method for printing strings */
    static void printString(String s) {
    System.out.println(s);
    /* print logs to the log file */
    static void log(String s) {
    synchronized (log) {
    log.println(s);
    log.flush();
    /* print to the log file */
    static void printProperties() { 
    printString("\n");
    printString("#####################################################################");
    printString("\n");
    printString("Web server's virtual root directory= "+root);
    printString("Timeout on client connections in milliseconds= "+timeout);
    printString("Number of Worker Threads= "+workerThreads);
    printString("\n");
    printString("#####################################################################");
    printString("\n\n");
    printString("********************WEBSERVER STARTED SUCCESSFULLY********************\n");
    /* load server.properties from java.home */
    static void loadServerConfigurationProperties() throws IOException {
    File f = new File(System.getProperty("java.home")+"\\lib\\"+"server.properties");
    if (f.exists()) {
    InputStream is =new BufferedInputStream(new FileInputStream(f));
    props.load(is);
    is.close();
    String r = props.getProperty("root");
    if (r != null) {
    root = new File(r);
    if (!root.exists()) {
    throw new Error(root + " Server Root Directory does not exist");
    r = props.getProperty("timeout");
    if (r != null) {
    timeout = Integer.parseInt(r);
    r = props.getProperty("workerThreads");
    if (r != null) {
    workerThreads = Integer.parseInt(r);
    r = props.getProperty("log");
    if (r != null) {
    log = new PrintStream(new BufferedOutputStream(
    new FileOutputStream(r)));
    /* Assign default values to root, timeout,
    * workerThreads and log if the same have
    * not been specified in the server.propwerties file
    if (root == null) {   
    root = new File(System.getProperty("user.dir"));
    if (timeout <= 1000) {
    timeout = 5000;
    if (workerThreads > 25) {
    printString("\n");
    printString("#####################################################################");
    printString("\n");
    printString("Too many Threads!!!Maximum number of Worker Threads can be 15 only");
    printString("\n");
    printString("#####################################################################");
    workerThreads = 15;
    if (log == null) {
    log = System.out;
    public class WebServer extends Constants {
    /* Specifying Default port for listening the requests */
    static int port = 8080;
    /* The Vector class implements a growable array of objects.
    * Like an array, it contains components that can be accessed using an integer index.
    * The size of a Vector can grow or shrink as needed to accommodate adding and
    * removing items after the Vector has been created.
    * The workerThreads are added to the Vector object threads where the worker threads stand idle
    * Vector is used since it is synchronized
    static Vector threads = new Vector();
    public static void main(String[] userSpecifiedPort) throws Exception {
    if (userSpecifiedPort.length > 0) {
    port = Integer.parseInt(userSpecifiedPort[0]);
    loadServerConfigurationProperties();
    printProperties();
    /* Instantiate ThreadPoool class and call
    * the createThreadPool() method on threadPool object
    ThreadPool threadPool= new ThreadPool();
    threadPool.createThreadPool();
    /* This class implements java.lang.Runnable.
    * It runs in a worker thread to process the request and serve files to the clients.
    class Worker extends WebServer implements Runnable {
    static final byte[] EOL = {(byte)'\r', (byte)'\n' };
    final static int BUFFER_SIZE = 2048;
    /* A byte array buffer to read and write files.
    * Memory is allocated to it once in the construtor of the class Worker
    * and reused thereafter
    byte[] buffer;
    /* Socket for the client being handled */
    private Socket socket;
    Worker() {
    buffer = new byte[BUFFER_SIZE];
    socket = null;
    synchronized void setSocket(Socket socket) {
    this.socket = socket;
    notify();
    public synchronized void run() {
    do {
    if (socket == null) {
    /* Wait */
    try {
    wait();
    } catch (InterruptedException e) {
    continue;
    try {
    handleClientRequest();
    } catch (Exception e) {
    e.printStackTrace();
    socket = null;
    Vector pool = WebServer.threads;
    synchronized (pool) {
    /* When the request is complete add the worker thread back
    * into the pool
    pool.addElement(this);
    }while(true);
    void handleClientRequest() throws IOException {
    InputStream is = new BufferedInputStream(socket.getInputStream());
    PrintStream ps = new PrintStream(socket.getOutputStream());
    /* we will only block in read for this many milliseconds
    * before we fail with java.io.InterruptedIOException,
    * at which point we will abandon the connection.
    socket.setSoTimeout(WebServer.timeout);
    socket.setTcpNoDelay(true);
    /* Refresh the buffer from last time */
    for (int i = 0; i < BUFFER_SIZE; i++) {
    buffer[i] = 0;
    try {
    /* We will only support HTTP GET/HEAD */
    int readBuffer = 0, r = 0;
    boolean endOfLine=false;
    while (readBuffer < BUFFER_SIZE) {
    r = is.read(buffer, readBuffer, BUFFER_SIZE - readBuffer);
    if (r == -1) {
    /* EOF */
    return;
    int i = readBuffer;
    readBuffer += r;
    for (; i < readBuffer; i++) {
    if (buffer[i] == (byte)'\n' || buffer[i] == (byte)'\r') {
    /* read one line */
    endOfLine=true;
    break;
    if (endOfLine)
    break;
    /*Checking for a GET or a HEAD */
    boolean doingGet;
    /* beginning of file name */
    int index;
    if (buffer[0] == (byte)'G' &&
    buffer[1] == (byte)'E' &&
    buffer[2] == (byte)'T' &&
    buffer[3] == (byte)' ') {
    doingGet = true;
    index = 4;
    } else if (buffer[0] == (byte)'H' &&
    buffer[1] == (byte)'E' &&
    buffer[2] == (byte)'A' &&
    buffer[3] == (byte)'D' &&
    buffer[4] == (byte)' ') {
    doingGet = false;
    index = 5;
    } else {
    /* This method is not supported */
    ps.print("HTTP/1.0 " + HTTP_BAD_METHOD +
    " unsupported method type: ");
    ps.write(buffer, 0, 5);
    ps.write(EOL);
    ps.flush();
    socket.close();
    return;
    int i = 0;
    /* find the file name, from:
    * GET /ATG/DAS6.3.0/J2EE-AppClients/index.html HTTP/1.0
    * extract "/ATG/DAS6.3.0/J2EE-AppClients/index.html "
    for (i = index; i < readBuffer; i++) {
    if (buffer[i] == (byte)' ') {
    break;
    String filename = (new String(buffer, 0, index,
    i-index)).replace('/', File.separatorChar);
    if (filename.startsWith(File.separator)) {
    filename = filename.substring(1);
    File targ = new File(WebServer.root, filename);
    if (targ.isDirectory()) {
    File ind = new File(targ, "index.html");
    if (ind.exists()) {
    targ = ind;
    boolean fileFound = printHeaders(targ, ps);
    if (doingGet) {
    if (fileFound) {
    sendResponseFile(targ, ps);
    } else {
    fileNotFound(targ, ps);
    } finally {  
    // socket.close();
    System.out.println("Connection Close nahi kiya");
    boolean printHeaders(File targ, PrintStream ps) throws IOException {
    boolean ret = false;
    int responseStatusCode = 0;
    if (!targ.exists()) {
    responseStatusCode = HTTP_NOT_FOUND;
    ps.print("HTTP/1.0 " + HTTP_NOT_FOUND + " not found");
    ps.write(EOL);
    ret = false;
    } else {
    responseStatusCode = HTTP_OK;
    ps.print("HTTP/1.0 " + HTTP_OK+" OK");
    ps.write(EOL);
    ret = true;
    log("From " socket.getInetAddress().getHostAddress()": GET " +
    targ.getAbsolutePath()+"-->"+responseStatusCode);
    ps.print("Server: Simple java");
    ps.write(EOL);
    ps.print("Date: " + (new Date()));
    ps.write(EOL);
    if (ret) {
    if (!targ.isDirectory()) {
    ps.print("Content-length: "+targ.length());
    ps.write(EOL);
    ps.print("Last Modified: " + (new
    Date(targ.lastModified())));
    ps.write(EOL);
    String name = targ.getName();
    int ind = name.lastIndexOf('.');
    String ct = null;
    if (ind > 0) {
    ct = (String) map.get(name.substring(ind));
    if (ct == null) {
    ct = "unknown/unknown";
    ps.print("Content-type: " + ct);
    ps.write(EOL);
    } else {
    ps.print("Content-type: text/html");
    ps.write(EOL);
    return ret;
    void fileNotFound(File targ, PrintStream ps) throws IOException {
    ps.write(EOL);
    ps.write(EOL);
    ps.println("The requested file could not be found.\n");
    void sendResponseFile(File targ, PrintStream ps) throws IOException {
    InputStream is = null;
    ps.write(EOL);
    if (targ.isDirectory()) { ;
    listDirectory(targ, ps);
    return;
    } else {
    is = new FileInputStream(targ.getAbsolutePath());
    try {
    int n;
    while ((n = is.read(buffer)) > 0) {
    ps.write(buffer, 0, n);
    } finally {
    is.close();
    /* mapping file extensions to content-types */
    static java.util.Hashtable map = new java.util.Hashtable();
    void listDirectory(File dir, PrintStream ps) throws IOException {
    ps.println("<TITLE>Multithreaded Webserver</TITLE><P>");
    ps.println("<html><body align=center>");
    ps.println("<center><h3><font color=#9999CC>Simple File Based MultiThreaded WebServer</font></h3></center>");
    ps.println("<table border=1 align=center>");
    ps.println("<tr bgcolor=#9999CC><td width=100% height=100% align=center><h3>Directory Listing</h3></td>");
    ps.println("<td width=40% height=40% align=center><h3>Type</h3></td>");
    String[] list = dir.list();
    for (int i = 0; list != null && i < list.length; i++) {
    File f = new File(dir, list);
    if (f.isDirectory()) {
    ps.println("<tr><td>");
    ps.println("<font size=\""+"2"+"\"face=\""+"Verdana"+"\"> <A HREF=\""+list[i]+"/\">"+list[i]+"</A></font><a href=\""+list[i]+"/\"></a>\n<BR></td>");
    ps.println("<td align=center><a href=\""+list[i]+"/\"><img src=\""+"/images/folder.jpg"+"\"></img></a>");
    ps.println("</td");
    ps.println("</tr>");
    } else {
    ps.println("<tr><td>");
    ps.println("<font size=\""+"2"+"\" face=\""+"Verdana"+"\"></A> <A HREF=\""+list[i]+"\">"+list[i]+"</A></font><A HREF=\""+list[i]+"\"></A>\n<BR></td>");
    ps.println("<td align=center><a href=\""+list[i]+"/\"><img src=\""+"/images/file.gif"+"\"></img></a>");
    ps.println("</tr>");
    ps.println("</table>");
    ps.println("<P><HR><I><font color=blue>"+(new Date())+"</font></I>");
    ps.println("<I><font color=blue>Copyright to HCL Technology Ltd</font></I>");
    ps.println("<I><font color=blue>Author Vivek Kumar Sinha</font></I>");
    ps.println("</body></html>");
    The ThreadPool class contains a Vector of WorkerThread objects.
    These objects are the individual threads that make up the pool.
    The WorkerThread objects will start at the time of their construction.
    If there are more HTTP requests than there are WorkerThreads,
    the extra requests will backlog until WorkerThreads free up.
    class ThreadPool extends WebServer{
    void createThreadPool(){
    for (int i = 1; i <= workerThreads; ++i) {
    Worker w = new Worker();
    Thread t=new Thread(w, "Worker Thread No."+i);
    t.start();
    /* Uncomment to check the number of worker threads running */
    // printString("Worker Thread No."+i+" Started");
    threads.addElement(w);
    try{
    ServerSocket serversocket = new ServerSocket(port);
    do {
    Socket socket = serversocket.accept();
    Worker w = null;
    synchronized (threads) {
    if (threads.isEmpty()) {
    /* Do nothing */
    } else {
    w = (Worker) threads.elementAt(0);
    threads.removeElementAt(0);
    w.setSocket(socket);
    } while (true);
    } catch (IOException e) {
    e.printStackTrace();

    Thank you for Welcoming me!!! I am very new to this forum so din't have this idea.
    I am unable to add the keep alive behavior . I don't have problem with any part of the code. The problem is i don't know how to make that enhancement in the existing code.
    Regards

  • Transmitting and Receiving an audio file in a web server

    Hello all,
    How do I transmit an audio file from a Web Server as requested by a web based thin client (jsp)?
    Rgds,
    Seetesh

    If I were to use the programs : Transmitter and Receiver
    Transmitter
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/RTPTransmit.html
    Receiver
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/AVReceive.html
    Can the same be writen as either a Servlet or JSP so that the same can be executed on a Web Server?
    Any workaround on the code to make it run.
    Rgds,
    Seetesh

  • Running a batch file on  a web server

    hi,
    i am facing a problem regarding running a batch file(with a java command in that file) on a web server.
    i am having a batch file which is running a chatapplication (this file is having a single line -- "java ChatServer 8080")
    i want to execute this command ( file ) on my web server
    can u help me plz ( i think u can)
    thanx 4 reading my problem...
    -ashish

    thanx 4 replying
    but as i am a developer and i am developing the aplication for a client, so should i speak to the client for this or can i do this without interrupting them?
    -ashish

  • Deploying war files on iplanet web server 6.0

    Hello All,
    I tried to deploy an war file on iplanet web server 6.0 using both command line wdeploy and iplanet webserver browser based admin tool. Both the times it did say successfully deployed. I checked the WEB-INF files and it does contain all class files..But the problem is when I try to post a form to one of the class files the error log says as if it cannot find the class file.(I tried the sample app HelloWorld supplied by vendor)
    =========
    05/Mar/2002:13:19:14] config (13777): for host xx.xx.xx.xx trying to POST /samples/helloworld/GreeterServlet, handle-processed reports: The request method is not applicable to this requested resource.
    =================
    any help in this regards is appreciated
    Thanks
    sudhir

    Hello,
    I got few steps to deploy the WAR file, if you followed the same steps and got the error then ignore this else try with this steps.
    a) Set your environment variable IWS_SERVER_HOME to your server_root directory.
    b) Add the server_root/bin/https/httpsadmin/bin directory to your classpath.
    c) Configure your virtual server for web applications.
    From the Server Manager page, select the VirtualServerClass tab, select a Class, and click the Manage button.
    Select a Virtual Server and go to the Java Web Apps Settings page for that virtual server. Make sure that the virtual server has Web Apps State turned On, and web-apps.xml is the name of Web Apps File.
    To extract the sample WAR file HelloWorld.war in server_root/plugins/servlets/examples/web-apps/HelloWorld, use the wdeploy command as follows:
    wdeploy deploy -u /hello -i server.iplanet.com -v testvs -d
    /iws60/https-server.mydomain.com/testvs/web-apps/hello
    /iws60/plugins/servlets/examples/web-apps/HelloWorld/HelloWorld.war
    The syntax for the command is as follows:
    wdeploy deploy -u uri_path -i instance -v vs_id [-d directory] war_file
    uri_path Specify the URI prefix (a path to access the web application from the browser).
    instance Specify the server instance name. (Note: Do not include "https" in the front.)
    vs_id Specify the Virtual Server name as it appears on the Manage Virtual Servers page.
    directory Specify a directory to extract WAR files. If this directory doesn't exist already, it will be created for you now.
    war_file Specify the name of the WAR file.
    If the WAR file is extracted successfully, the message "web application deploy successful" appears at the command line.
    For verification, go to the /iws60/https-server.iplanet.com/testvs/web-apps/hello directory. It should have the following contents:
    colors
    index.jsp
    META-INF
    WEB-INF/
    web.xml
    /classes/
    HelloWorldServlet.class
    HelloWorldServlet.java
    SnoopServlet.class
    SnoopServlet.java
    In the server_instance/config directory, the web-apps.xml file should have the following entry:
    <vs>
    <web-app uri="/hello"
    dir="/iws60/https-server.iplanet.com/testvs/web-apps/hello"/>
    </vs>
    Restart the server instance from the command line or go to the admin GUI and apply configuration changes to the server instance.
    Now when you access the webserver instance in your browser, the Error log of that server instance will record successful initialization of the web application environment(web-apps.xml) for the virtual server(vs name). You can access the web application from a browser as follows:
    http://server.Mydomain.com:80/hello/index.jsp
    or:
    http://server.Mydomain.com/hello/
    The syntax is as follows:
    http://vs_urlhost[:vs_port]/uri_path/[index_page]
    Thanks
    Selva

  • Deploying an ear file in Sun Web Server

    I have an ear file that we use to deploy to weblogic. Is it possible to deploy an ear file to Sun WEb Server 6.0? Instead of deploying the war files one-by-one?
    If yes, what are the steps?
    Thanks.
    Beth

    No, Sun ONE Web Server does not support ear files; ear files are typically the domain of J2EE application servers.

  • Captivate Files Loaded on Web Server

    I have loaded a captivate file (along with all its dependent files) onto a web server in order to link it to our Plateau LMS.  I had no problem with the link, but a narration that is supposed to start later in the file begins when the main Captivate page is opened.  I am not the creator of the Captivate file and have never worked with the program.  Is there something that needs to be done to the file to keep it from doing this?

    Are you using Aggregator? Or is is a very long project? I've noticed Aggregator projects often want to jump into the audio while the presentation is still loading. The easiest fix for that is via Edit --> Preferences. Select Start and End in the Project group, uncheck Auto Play, and, as a touch of class, add a graphic to be displayed until the user presses the play button (which will be in the middle of the presentation when it loads).

  • Browse Files on a Web Server

    Hello,
    How could I start writing an applet for viewing files on my web server? I looked around the forum and on the net but couldn't find anything very helpful. Any resources or links are also much welcome.
    Thanks,
    LD

    Thanks for your reply Andy,
    All I want to do now is have something user friendly so that they could browse a tree folder and download some files on my web server. I don't really know if I should stick with Java or opt out and go try using JavaScript or other scripts - what's your view on this?
    I wrote some code in Java that creates a folder tree, starting from the folder where the applet is placed. Then I would have a table showing all the files etc...In my IDE it works fine but on the server it either doesn't show anything or complains about security issues (I tried different methods).
    (My web server is just a common commercial web server. When there's no index.html on a particular folder on the server and I locate it in my web browser, it does show a listing of all that is in there.)
    Here's my code:
    Thanks for your help,
    LD
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.io.File;
    import java.io.FileFilter;
    import javax.swing.JOptionPane;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.UIManager;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class WebServerFileBrowser extends Applet
        private JTree dirTree;
        private JScrollPane treeSPane;
        String root;
        /** Initializes the applet WebServerFileBrowser */
        public void init()
            try {
                java.awt.EventQueue.invokeAndWait(new Runnable()
                    public void run()
                        // Set applet's look and feel as the system's
                        try {
                            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                        } catch (Exception ex) {
                            ex.printStackTrace();
                        //End of settings    
                        initComponents();
            } catch (Exception ex) {
                ex.printStackTrace();
        private void populateDirTree()
    //        System.out.println(getCodeBase());
    //        root = "D:\\TestDir";       
            try {
                // Getting the root directory which is the directory where the applet is located
                File rootDir = new File (".");
                root = rootDir.getCanonicalPath();
                File topDir = new File(root); // The top/root directory
                DefaultMutableTreeNode treeTop = new DefaultMutableTreeNode(new Folder(topDir)); // The top node of the directory tree
                growDirTreeNodes(treeTop, topDir);
                dirTree = new JTree(treeTop); // After the directory tree nodes are fully grown, add them into the directory tree
            } catch (Exception ex) {
                ex.printStackTrace();
            JOptionPane.showMessageDialog(this, root);
        // Implementing the concept of recurrence, the directory tree is grown top down
        private void growDirTreeNodes(DefaultMutableTreeNode node, File dir)
            File[] dirs = getDirList(dir);
            for (int i = 0; i < dirs.length; i++) {
                node.add(new DefaultMutableTreeNode(new Folder(dirs)));
    growDirTreeNodes(((DefaultMutableTreeNode) node.getChildAt(i)), dirs[i]);
    // This method is used to return an array of child directories that are in a parent directory
    private File[] getDirList(File dir)
    File[] dirs = dir.listFiles(new FileFilter()
    public boolean accept(File file)
    return file.isDirectory();
    return dirs;
    private void initComponents()
    setLayout(new BorderLayout());
    populateDirTree();
    treeSPane = new JScrollPane(dirTree);
    add(treeSPane);
    * This sub class represents a folder which is equivalent to a directory
    * Main reason for this class' existence is to override the toString() method
    * so that when added into the dirTree, the nodes show the name of the folder
    * and not the full path of that directory
    class Folder
    private String name;
    private File dir;
    public Folder(File dir)
    this.dir = dir;
    name = dir.getName();
    public String getName()
    return name;
    public File getDir()
    return dir;
    public String toString()
    return name;

  • JSP : latest  JSTL, File Upload from web form Client to Server Question!

    I understand that within a JSP, It is possible to read a file from the Client by opening a Stream somehow.
    How do I code, within jsp/servlet (non tag) java code inside <% %>
    blocks, WITHOUT openening a new connection to the URL, an InputStream from a client web browser form, from a file upload coded using
    <input type="file" name="file1"/> ?
    I have previously achieved this quite simply with a FileInputStream
    with the previous version of JSTL.
    How may I do this with the latest version of JSTL, with this index.jsp?
    -with a simple text file.
    -with a Binary file (with DataInputStream)?
    <%--
    Document : index
    Created on : 27/01/2009, 3:08:32 PM
    Author : Zachary Mitchell
    --%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <h1 align="center">Hello World!</h1>
    <form name="form1" method ="POST" >
    <table align="center">
    <tr>
    <td>
    <input name="file1" type="file" align="center"></input>
    </td>
    </tr>
    <tr>
    <td>
    <input type="submit" value="submit" action="index.jsp" ></input>
    </td>
    </tr>
    </table>
    </form>
    <!--*********************************************************************** -->
    <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
    <%@page import = "java.io.*" %>
    <c:if test="${pageContext.request.method=='POST'}">
    <%
    File fileName = new File(request.getParameter("file1"));
    out.println(fileName.toString());
    FileInputStream stream = new FileInputStream(fileName);
    out.println(stream.toString());
    %>
    </c:if>
    <!--*********************************************************************** -->
    </body>
    </html>

    If I have:
    <!-- ***********************************************************************************-->
    <form name="form1" method="POST" enctype="multipart/form-data">
    <input name="file1" type="file"/>
    <input name="submit1" type="submit" value="Submit" action="index.jsp"/>
    </form>
    <!-- ***********************************************************************************-->
    and run this in an index.jsp, use browse to select my text file, and click SUBMIT.
    I can use:
    InputStreamReader reader = new InputStreamReader(new DataInputStream(request.getInputStream()))
    BufferedReader bufferedReader = new BufferedReader(reader);
    bufferedReader.readLine();...
    However, these is some HTML/POST related content around what multiple readLine();
    calls return.
    Is there an easy way, like using "${param.file1}",
    aside from [http://commons.apache.org/fileupload/|http://commons.apache.org/fileupload/],
    maybe using servlet style code, to get the File contents from a remote Client,
    to the remote Server servlet engine, AVOIDING ANY SUPERFLUOUS CONTENT,
    using version 1.12 of the JSTL, JSP 2.0,Tomcat 6?
    Just politely, yes, no, and how?
    Edited by: Zac1234 on Jan 29, 2009 3:27 AM
    Edited by: Zac1234 on Feb 1, 2009 8:29 PM

  • How to save uploaded image file to Apache Web Server from Tomcat

    Hi guys,
    Perhaps this is not an appropriate topic to ask under this forum but I really don't know where should I post my question. Hope you understand.
    Ok, I need to know if my web application is running in Tomcat5 and user uploading some image file where I need to save these image files to the other server, which is running Apache Web Server. Should I ftp to there or other better method ?
    Anyone got a better idea on doing this kind of process pls advice. Many Thanks !
    regards,
    Mark

    if your Apache server is running in the same computer and if your servlet have write access to the folder in apache under which you want to save the file you can just write the file there but you will have to address concurrency issues.
    Otherwise you will have to do ftp but since apache does not have abuilt in frp server you will need a seperate FTP server for this

  • Issue with permissions to upload files into Apache web server to OS 10.8.2

    Hello everyone;
    I setted up Apache web server and mysql to OS 10.8.2 Mountain Lion. It's working fine except for the permissions. I can't upload files into the web site directory. Doesn't recognize, e.g., the PHP function "move_uploaded".
    One problem for my is that I can't modify the permissions by "Terminal" app since it telling me that the "Process completed" and I can't write any script.
    Any suggestion will be welcome.
    Thanks in advance.

    My only question now would be how to speed up Safari's 6.0.1 performance in 10.8.2 or do I just accept that it's a little slower than it was, which is fine. Are other folks having this issue?
    I was primarily passing along info about my particular download speed and for the Web Confidential 3.8 people: make a backup of your passwords b4 installing 10.8.2 or be prepared to upgrade.

Maybe you are looking for

  • Opportunity Team - Owner

    Hi Folks, Using the Opportunity Team functionality: When a user creates an Opportunity against an account that they do not own, the account owner is added to the 'Opportunity Team' along with the user who created the opportunity in the first place. I

  • Communication between RAC instances in google.

    Hi, I see different answers for this Communication between RAC instances in google. 1. UDP 2.Distributed Lock Manager (DLM) which one of is correct?

  • [分享]09年1月份10大问题

    各位SAP Business One社区论坛的网友, 为了丰富论坛内容,从08年12月起我们会和B1的支持部门同事合作,定期(每月)发掘并公布上月10大常见问题及解答,希望对大家的工作能有所帮助! 09年1月份10大问题 1- 安装B1客户端时缺少"SQL Native client"组件如何解决? 关于这个问题,可以参考SAP Note 1015229. 2-如何在销售发票里面添加订单号? 1. 在销售发票行中定义一个用户自定义字段 2. 基于这个自定义字段定义一个自定义查询 3. 查询语句参

  • Turning off info in web gallery

    Is there a way to make the photo info unavailable in a web gallery? I don't want my site's visitors to have access to my photos' metadata. Thanks.

  • Change of Distribution Channel and Division

    Good day, everyone! Is there a transaction code that will allow me to change the distribution channel and division of the material? Thank you.