How to handle FTP request in Servlet

Hi,
can anyone tell me how to handle FTP operations in Servlet? I mean to ask whether we can handle FTP request in Servlet.
Thanks
Subs

Your servlet should extend from GenericServlet and not HttpServlet to handle ftp requests.

Similar Messages

  • How to handle multiple request in the servlet

    how to handle multiple request in the servlet...
    Example:
    java forum...
    i'm login in the java forum at this time 1000 members make login in this....how happended in servlet?
    if we use thread how to implement in servlet ?

    Serlets are already threaded. The application container instantiates the servlet, then uses this instance in a new thread for every use.
    This is the reason that you should use (almost) no instance variables in a Servlet, but rather that (almost) everything should be local to the method.

  • How to handle multiple requests to the same servlet at one time?

    Hi,
    I am new to Servlets. I have doubt regarding ... Handling multiple requests to a servlet at a time.
    If we send a single request to a servlet, as know that group of objects such as servlet, servletContext, servletConfig, request, response and etc are created in the server, And if 1000's of requests are sent to a same servlet at a time, and if server memory capacity is less, then 1000's of objects are created in a server which would be heavy burden to Server. How to handle the application and development in such situation?
    Kind regards,
    veerendra

    Hi veerendra reddy ,
    By default any web server can will have a thread pool to handle client req's.
    In your point also heavy burden to server you are telling that depends on this.
    we can configure this min & max size of this thread pool.
    by default it will be 0-1000 for tomcat server.
    I am not sure in which file this configuration will be.
    But I hope in server.xml or some xml file consists this info.
    If You what you can edit accordingly. to overcome your heavy burden to server.
    Thanks & Regards
    Nagendra

  • How to send  a request to servlet from a java client.

    I called a servlet from java client using URL object.
    I could establish a connection with server and display
    the content(like req.getservername etc.,)
    of servlet on client side(DOS prompt).
    My question is how do i send a request to servlet from the client.
    let me say, i have to send a value as 10 to servlet and do some processing
    ( like 10*2 = 20) display the output (20) on client side..
    It will be appreciated if u can mention the syntax...

    just add the query string to the url you use to create the URL object from.

  • How biztalk handle multiple request at a time ?

    can TCP/IP adapter or biztalk handles multiple request at a time ?
    If yes,then how it process multiple request ? 
    Can TCP/IP send ports sends multiple request ?
    Prakash

    Yes.
    It processes multiple requests using THREADS. Each Connect starts off a thread that handles the receipt of the message, submission to BizTalk, wait for the response (matching two-way subscription) and then respond back to the client.
    TCP/IP Send ports handle multiple requests by creating fresh sockets (RPC High-end ports). As an example, in your browser you open multiple tabs and access different sites, each tab results in your browser opening a fresh socket connection for the request.
    Regards.

  • How to handle second request for addition to same AD group at code level?

    I am using custom java code for adding group memberships to users based on multiple multi-valued attributes.
    Example: Location Code is a comma separated multi-valued field in OIM User Form and I need to kick off my code each time the attribute is updated.
    If only 1 value in the LocationCode changes, I want to only add users to the group for this value not the older values that have not changed.
    How do I handle this scenario where the code adds the user to the same group twice in OIM. In AD the user is only added once. Do I need to write additional code to read all existing groups of the user, compare them with the new requests and then add new groups?

    Not a big deal.
    Create a trigger in Xellerate users process defn. There u'l get option for old and new value. take both values and compare both values using stringtokenizer and update the child form or group membership.

  • How to Handle RMA Requests through EDI?

    Hi Folks,
    I have a quick question.
    In general, how do RMA Requests are handled through EDI.
    I don't want RMA requests created in SAP (through VA01) send via EDI.
    How can i handle this situation.
    Please reply in detail.
    Awaiting for your answer,
    Creasy Matt

    Hi veerendra reddy ,
    By default any web server can will have a thread pool to handle client req's.
    In your point also heavy burden to server you are telling that depends on this.
    we can configure this min & max size of this thread pool.
    by default it will be 0-1000 for tomcat server.
    I am not sure in which file this configuration will be.
    But I hope in server.xml or some xml file consists this info.
    If You what you can edit accordingly. to overcome your heavy burden to server.
    Thanks & Regards
    Nagendra

  • Handling multiple requests in servlets

    Dear friends,
    in my application i have a html form and a servlet
    From LAN 60 students(clienst) will access the form simultaneously
    i have to collect data from all clients and generate a report based on their inputs
    how do i collect data from 60 clients
    regards
    Ram Mohan

    Your using html and a servlet? I suggest JSP and a servlet. I also suggest reading book on JSP that also covers servlets. Keep in mind that in proper MVC design, the JSP pages only displays data and submits back to the servlet. It doesn't contain business logic. The servlet calls business logic, gets data from business logic, puts it in request scope, then dispatches to the appropriate JSP page. The JSP page reads the data from request scope and displays it. If your not too familiar with JSP and servlets, I suggest you first create a hello world JSP page, and a hello world servlet.

  • How to handle the Request more information in workflow notification

    Dear All,
    I am developing a custom workflow which has 3 different options to be handled like approve, reject and request more information. approve and reject scenarios i have done and working as expected. However I would like to know how we can capture that the notification is requested for more information so that i can design approvals according to business requirement.
    Thanks for yiur replies in advacne
    Best Regards,
    Maheshkumar.M

    Hi,
    When a user uses the request information functionality, the notification can execute a post notification function with a funcmode of QUESTION. When the question is answered, the PNF runs with a funcmode of ANSWER.
    Additionally, while the notification is awaiting an answer, the MORE_INFO_ROLE on WF_NOTIFICATIONS will be populated. When the answer has been provided, this is set to null.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • How to handle muliple request

    Hi all,
    I'm having with some issue of socket server programming.
    In fact, this is switch which is used for routing banking transactions to regarding banking server.
    [Transaction initiator POS ]-----tcpip connection---->[hardware unit NAC]-----------tcpip connection------->[MY server SWITCH]---------tcpip---->[Banking server]
    I'm developing SWITCH part. so it is listening some port for incoming request from NAC and
    after processing the request I will read that data to the banking server.
    In additionally, when the system is up, the connection in between NAC and SWITCH has already established.
    problem is
    When the NAC is receiving multiple transactions at the same time, SWITCH can be handled the load
    can you give me an idea what i can do for it ?
    my some coding so far ,
    public class Server implements Runnable{
         public static void main(String[] args) throws Exception{
              new Thread(new Server()).start();
         public void run() {
              while (true) {
                   try {
                        Socket client = service.accept();
                        client.setKeepAlive(true);
                        SessionRunner ses = new SessionRunner(client);
                        new Thread(ses).start();
                   } catch (Exception e) {
                        LogFileCreator.writErrorTologs(e);
    public class SessionRunner extends HelperMethodFortxn implements Runnable {
         public SessionRunner(Socket clients) {
              client                     = clients;
         public void run() {
              while (true ) {
                   try {
                        synchronized(this) {
                             in = new DataInputStream(client.getInputStream());
                             out = new DataOutputStream(client.getOutputStream());
                             in.read(header, 0,InitConfigurations.POS_HEADER_SIZE);
                             in.read(request, 0,InitConfigurations.POS_PACKET_SIZE);
                             SessionFactory.findProcessRunner(request, con);
                             byte response[] =getNacResponse(SessionFactory.getResponse());
                             out.write(response);
                             out.flush();
                   } catch (SocketException e) {
                        LogFileCreator.writErrorTologs(e);
    I think that I should implement some process for coming request to queue on "SessionRunner" class
    Hope soon reply
    Kapila

    problem is
    When the NAC is receiving multiple transactions at the same time, SWITCH can be handled the load I don't understand this sentence.
    can you give me an idea what i can do for it ?Please restate the problem in standard English.
                        Socket client = service.accept();
                        client.setKeepAlive(true);Don't do anything with the socket in the accept thread. Move the setKeepAlive() call into the thread's run() method.
         public SessionRunner(Socket clients) {
              client                     = clients;Here you should call setKeepAlive() etc and also construct the input and output streams. Presently you're doing that every time around the loop, which is wasteful at best and erroneous at worst.
                             in.read(header, 0,InitConfigurations.POS_HEADER_SIZE);Here you are ignoring the result of the read() method. Don't do that.
                             in.read(request, 0,InitConfigurations.POS_PACKET_SIZE);Ditto.
                   } catch (SocketException e) {
                        LogFileCreator.writErrorTologs(e);
                   }You don't seem to be catching IOException, which can't be correct as your code wouldn't compile. If you get any exception other than SocketTimeoutException you should close the socket and exit the loop.
    I think that I should implement some process for coming request to queue on "SessionRunner" class Why?

  • How to handle multiple requests from single client??

    hi all
    I wrote a client server program to handle requests from client.I have 2 types of requests, one is to submit comments to the server other is to view comments on the server.I have tested the app and it works fine for either of them(independently) but they don't work both together i.e when i submit a comment and view it,it's stuck and when i close the program it gives SocketException :Connection reset.
    on client side:
    My request is just a string
    on the server side:
    I check the string and give the client what it wants.
    I want to know if there's any other way to send requests other than passing it as a string.
    I can post my code if needed.
    thanks,
    Sree

    Here is my client code,minimized it to the extent possible and it might give some compilation problems since i didn't include all the functions needed but i think you should be able to get an idea if i'm doing something wrong.
    Can give you my server code if needed.
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.Socket;
    import java.net.UnknownHostException;
    import javax.swing.JButton;
    public class Test {
         JButton submit_button;
         JButton view_button;
         Socket client;
          JButton get_submit_button() {
                   if (submit_button == null) {
                        submit_button = new JButton();
                        submit_button.setText("Submit");
                        submit_button.addActionListener(new java.awt.event.ActionListener() {
                             public void actionPerformed(java.awt.event.ActionEvent e) {
                                  send_comments_to_server();
                   return submit_button;
               Socket check_client_connection(){
                   String host = "C001192097";     //server host name
                   if(client == null || client.isClosed()){
                    try {
                         client  = new Socket(host, 4321);
                    }catch (UnknownHostException exception){
                         System.err.println(host + ": unknown host.");
                    catch (IOException exception){
                         System.err.println("I/O error with " + host);
                   return client;
              void send_comments_to_server(){
                    try
                         Socket client = check_client_connection();
                         DataOutputStream output_stream = new DataOutputStream(client.getOutputStream());
                         BufferedReader stream_input = new BufferedReader(new InputStreamReader(client.getInputStream()));
                         String comment_report = "comments";
                         Comments comment = new Comments();
                         User_Data user_data = new User_Data(); //function that returns client details such as host name and stuff
                         String user_info = "User Name: "+user_data.user_name+" "+"Host Name: "+user_data.host_name+" "+"Domain Name: "+ user_data.domain_name;
                         comment.user_info = user_info;
                         comment.summary = comment_report;
                         comment.comments = "passing comments";
                         String report = user_info+" "+comment_report+" ";
                         output_stream.writeBytes(report+"\n");
    //                     output_stream.close();
    //                     stream_input.close();
    //                     client.close();
                    }catch(IOException e){
                         e.printStackTrace();
              void receive_comments_from_server(){
                   String line;
                   StringBuffer comments = new StringBuffer();
                   try
                         Socket client = check_client_connection();
                         DataOutputStream output_stream = new DataOutputStream(client.getOutputStream());
                         BufferedReader stream_input = new BufferedReader(new InputStreamReader(client.getInputStream()));
                         String msg = "view comments";
                         output_stream.writeBytes(msg);
                         System.out.println("waiting for response");
                             while((line = stream_input.readLine()) != null){
                                  comments.append(line);
                              System.out.println("Comments from server "+comments);     
                        } catch (IOException e) {
                             e.printStackTrace();
              JButton get_view_button() {
                   if (view_button == null) {
                        view_button = new JButton();
                        view_button.setText("View Comments");
                        view_button.addActionListener(new java.awt.event.ActionListener() {
                             public void actionPerformed(java.awt.event.ActionEvent e) {
                                  System.out.println("request sent");
                                  receive_comments_from_server();
                   return view_button;
    }thanks
    Sree

  • How to unlock the request ?

    Hi all,
    I have made some changes to an ods. And made a request to those changes in the development. But while i am trying to transport it to quality. I find that ods has been changed and its request is been created by another user.
    So, how to handle those request. Should i ask the other user to release it nor should i change the ownership of those request?
    thanxs
    haritha

    Hi Haritha,
    You may change the owner of the request and release it.
    Khaja

  • How to handle more than one submit buttons on servlets

    Hi:
    anyone know how to handle the multiplet submit button on servlet,
    such as next, previous, add and so on.
    Thank you

    Don't worry about because only the button that is clicked will get submitted. In the servlet you just test for the existance of a parameter:
    if (request.getParamter("SubmitButton1") != null) { ..... }
    if (request.getParamter("SubmitButton2") != null) { ..... }
    Save the following HTML code, open in IE and click on the buttons to see what will get sent to the servlet:
    <html><head></head><body>
    <form method="GET">
       <input type=text name=text1>
       <input type=submit name="Submit1" value="Me">
       <input type=submit name="Submit2" value="you">
    </form>
    </body></html>

  • How to go back on page by not sending request to servlet

    Hello,
    I have create web application using JSP and servlets. When I press a button I send request to servlet and it redirects me to jsp page where the results are displayed, then in that page I press a button and go to other servlet which redirects me to other JSP.
    I want to make a button on the third JSP page to go back to second JSP page by not sending request to servlet. For e.g. in FireFox, I press back button and it takes me back. But I want that the same action like in firefox would work with my created button.
    How can I do that?
    Edited by: peliukasss on Sep 14, 2010 3:28 PM

    evnafets wrote:
    You wnat your created button to act the same as the "back" button in the browser?Yes, thats exactly what I need.
    Then all you need to do is invoke some javascript on it.
    After a quick google search, the most commonly suggested solution appears to be:
    onclick="history.go(-1)"
    Thanks for your reply.

  • How to Handle Unwanted Contact Requests

    Unfortunately, there is currently no method to sort or filter incoming contact requests.   I think it would be very difficult for Skype to determine if a certain person is a potential scammer or spammer, unless they receive relevant reports from users who receive suspicious contact requests from them.  Below are some suggested steps on how to deal with unwanted, random, unknown, or suspicious contact requests.
    1.       Take note of the username and display name of the user (please see image sample below)
    2.       Open the Contact request then click the Block Button. 
    3.       The Block This Person window will also appear, you can click the Report Abuse box if you feel that that contact is indeed a highly potential scammer or spammer.  Click the Block button to confirm your action.
    4.       You can also report them to [email protected]
    Then Skype will be notified of the suspicious activities of the reported user/s and will most likely prompt them to check and investigate those users.  Their account might be put under suspension, termination, or prevent them from creating new accounts or using Skype services.
    Note:  Setting your account's privacy settings to allow messages and calls from people in your contact list only will only prevent the ability of non-contacts to call you or send you instant messages.  It will not stop unwanted contact requests from random users.
    IF YOU FOUND OUR POST USEFUL THEN PLEASE GIVE "KUDOS". IF IT HELPED TO FIX YOUR ISSUE PLEASE MARK IT AS A "SOLUTION" TO HELP OTHERS. THANKS!
    ALTERNATIVE SKYPE DOWNLOAD LINKS | HOW TO RECORD SKYPE VIDEO CALLS | HOW TO HANDLE SUSPICIOS CALLS AND MESSAGES
    SEE MORE TIPS, TRICKS, TUTORIALS AND UPDATES in
    | skypefordummies.blogspot.com | 

    I think the problem results from the level of visibility Skype users present. For these random requests to come in, there must be some way of trawling for Skype IDs, which would allow would-be scammers and spammers to make the requests. My wife gets many of them and I get virtually none, so they obviously target women.
    If Skype users could manage their level of visibility to prevent random trawling or browsing, but allow targeted searches, that should reduce the incidence of this problem enormously.
    Another way would be to create an option for a "Contact Token" which could be forwarded to people you allow to make contact requests. They would need to supply the correct token (matching your individual "Contact Token") in order for the request to be submitted. ie. in Privacy Settings, add the followng option:
    "Only accept and display contact requests from users supplying the following Contact Token: _____"
    This may seem overly heavy-handed, but it would suit many people who don't want to be bothered by nuisance contact requests, and if they like spam and scam, they don't have to enable the option!

Maybe you are looking for

  • ODS and Infocube showing different results

    Hi, I loaded same data to Infocube and ODS but they are both showing different result in BEX. ODS ODS report is showing summarised values e.g vendor               order value                   invoice value        date 00001                    20    

  • When I right-click on a link, can I have "open in new window" first, like it used to be?

    I prefer to open in new window when I right-click on a link. In this new version of firefox, open in tab is now on top. Can I have open in new window the first of the options?

  • Need information about OBIEE report XML

    Does Oracle provide document on OBIEE report XML information (such as element , sub element and property for each element)?

  • Reformatting external HD with Disk Utility doesn't seem to work?

    I've got two external hard disks - one Samsung 250GB and one 40GB which were previously formatted for and used with a PC. I'm trying to erase them and reformat them for Mac, using the 'erase disk' option in Disk Utility, but each time I try, for each

  • Adding Weather Link

    Hi, Is there some way to either paste in or add the code to have a live weather reading on a site with iWeb? I was able to open the html in Dreamweaver and paste it in there but was hoping I could do things like that directly in iWeb. Thanks, Carl