Cancel a request from Servlet

I am wanting know if there is a way to cancel a request from a servlet. I have a servlet that is being activated from a web page that runs on Websphere that create a query against DB2. I am trying to add a Cancel button to stop the query and close the connections if the cancel button is hit. The reason I want to do this is because if the user doesn't enter specific enough criteria then the search may take a while. I want to give the user the ability to stop the search not just redisplay the form and execute another.

Are you saying have a randomly generated key as a hidden field that a search object would hold onto. If I cancelled the search, another servlet would take that key and communicate with the search object, telling it to stop.
But then how do I make it stop.
Currently I have a servlet for cancel that changes a boolean from false to true when executed. The search servlet is running through a loop that is going through a ResultSet to fill a vector with information to display. If the boolean is changed to true the loop is broken and all pieces are closed. This works on my localhost but not in our test environment. It doesn't execute the cancel servlet until after the search servlet has returned a response. We use the Strata five layer architechture not the MVC pattern.

Similar Messages

  • Cancelling  scheduled request from database

    Hi experts
    I have around 200 similar request scheduled with diff parameters
    and i want to cancel it from database.If i go to application it will
    take long time and i want to cancel from database or update the concurrent tables
    instead of going to application and cancelling one by one.How can i acheive it
    rgds
    rajesh

    i use the following
    update fnd_concurrent_requests r
    set r.hold_flag='Y'
    where r.phase_code not in ('R','C')
    and r.concurrent_program_id not in
    (select p.concurrent_program_id
    from fnd_concurrent_programs p
    where concurrent_program_name in ('FNDCPPUR','RGOPTM','CMCTCM','FNDWFBG','FNDGSCST','FNDOAMCOL','FNDWFBES_CONTROL_QUEUE_CLEANUP'));
    try first the select stament and compare it to your runing requests
    fadi hasweh
    http://oracle-magic.blogspot.com/
    Oracle is not Magic, it just takes years of experience

  • Programatically cancel concurrent request

    Hi,
    How to cancel concurrent request from plsql ?
    Thanks a lot.

    Thanx,
    but it seems that it does not work in a trigger on fnd_concurrent_requests table.
    like this one:
    CREATE OR REPLACE TRIGGER aaaa
    after insert on apps.fnd_concurrent_requests
    for each row
    DECLARE
    pragma autonomous_transaction;
    req_id number;
    BEGIN
    if :NEW.concurrent_program_id = 11111
    THEN
    req_id := :NEW.request_id;
    update fnd_concurrent_requests
    set status_code = 'D', phase_code='C'
    where request_id = req_id;
    commit;
    ELSE null;
    END IF;
    END;
    trigger fires but update does not work when i exec the concurrent. Why ??
    if i manually execute this update it works.

  • Hi, I cannot restart or shut down my MAC and get the message Geneio.it installer is cancelling your request. Please shut down and retry. However, I cannot seem to exit that application and I have no idea where it came from. Thanks

    Hi, I cannot restart or shut down my MAC and get the message Geneio.it installer is cancelling your request. Please shut down and retry. However, I cannot seem to exit that application and I have no idea where it came from. Thanks
    Could this be a virus?

    Hold down the Power button until the computer shuts down.
    The Safe Mac » Adware Removal Guide - Genieo
    The Safe Mac » Adware Removal Guide
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection Thomas Reed recommends using Dr.Web Light from the App Store. It's free, and since it's from the App Store, it won't destabilize the system. If you prefer one of the better known commercial products, then Thomas recommends using Sophos.(Thank you to Thomas Reed for these recommendations.) If you already use Sophos, then be aware of this if you are using Mavericks: OS X Mavericks- Sophos Anti-Virus on-access scanner versions 8.0 - 9.1 may cause unexpected restarts
    From user Joe Bailey comes this equally useful advice:
    The facts are:
    1. There is no anti-malware software that can detect 100% of the malware out there.
    2. There is no anti-malware that can detect anything targeting the Mac because there
         is no Mac malware in the wild, and therefore, no "signatures" to detect.
    3. The very best way to prevent the most attacks is for you as the user to be aware that
         the most successful malware attacks rely on very sophisticated social engineering
         techniques preying on human avarice, ****, and fear.
    4. Internet popups saying the FBI, NSA, Microsoft, your ISP has detected malware on
        your computer is intended to entice you to install their malware thinking it is a
        protection against malware.
    5. Some of the anti-malware products on the market are worse than the malware
        from which they purport to protect you.
    6. Be cautious where you go on the internet.
    7. Only download anything from sites you know are safe.
    8. Avoid links you receive in email, always be suspicious even if you get something
        you think is from a friend, but you were not expecting.
    9. If there is any question in your mind, then assume it is malware.

  • How can I forward a request from to another servlet?

    If I would like to forward a request from a servlet to another one, but they are not located in the same machine.
    Could I use the following code to do it?
    getServletConfig().getServletContext().getRequestDispatcher("XXXXX").forward(request, response);

    You can not do a forward to a servlet on a different server. You can do a redirect and put any parameters you want to pass in the url. If you are using JSP you may bve able to use the JSTL include tag, again passing the parameters in the URL. You could use the URLConnection or HttpURLConnection class to open a connection to the servlet, make a request, get the response and the return the response to the client.

  • Cancelled meeting requests are not removed from ICAL.

    I am currently receiveing  new and updated meeting requests through "Mail" on my mac. The email body contains a .ics icon that either adds (new appointments) or updates (changes) in my MAC's Ical.
    However when I receive a cancelled meeting request ... clicking on the same .ics icon take me to Ical, but doens't remove it from the calendar. Is this a known bug or somthing that I've got set up incorrectly?
    Please advise if you have any information on this problem - Thanks

    bump

  • 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 to transfer the http request from applet to servlet/jsp

    I use the JTree component to create a navigation of a website,but i don't
    know how to connect the tree's nodes with the jsp/servlet.
    I mean how to transfer the http request from the applet to a jsp.
    I use the "<frameset>" mark which will divide the web browse into 2 blocks.
    The left side is Applet,and the right side is the linked jsp page.
    what I say is as the weblogic console layout.
    who can help me!!!
    Thank You!

    I use the JTree component to create a navigation of a website,but i don't
    know how to connect the tree's nodes with the jsp/servlet.
    I mean how to transfer the http request from the applet to a jsp.
    I use the "<frameset>" mark which will divide the web browse into 2 blocks.
    The left side is Applet,and the right side is the linked jsp page.
    what I say is as the weblogic console layout.
    who can help me!!!
    Thank You!

  • HT4847 I am trying to uncheck the data and documents option for storing this information in iCloud, however, the only option I am given is to cancel the request or to remove them from my Mac (but not iCloud apparently). This is wrong! Any ideas?

    It seems that--now that I have purchased storage from iCloud--I will be forced to store my documents, data, etc there and do not have the option of choosing not to store information.  I tried to uncheck my documents and data option and the only choice I was given was to cancel the request or to have all the documents removed from my Mac! I cannot sign out and sign back in either.  I restarted my computer but that hasn't helped either.  Does anyone know what to do about this?  It's crazy that Apple would hold my data hostage and offer me the option of using this service or not having access to my own information EXCEPT in iCloud.  I wish I'd researched it more before I tried it.  Buyer beware.

    It seems that--now that I have purchased storage from iCloud--I will be forced to store my documents, data, etc there and do not have the option of choosing not to store information.  I tried to uncheck my documents and data option and the only choice I was given was to cancel the request or to have all the documents removed from my Mac! I cannot sign out and sign back in either.  I restarted my computer but that hasn't helped either.  Does anyone know what to do about this?  It's crazy that Apple would hold my data hostage and offer me the option of using this service or not having access to my own information EXCEPT in iCloud.  I wish I'd researched it more before I tried it.  Buyer beware.

  • Can a servlet do something without a request from a client?

    Hi,
    is a servlet only invoked when a client calls doGet() or doPost() or is there a way to let the servlet do something while it is idle.
    Maybe with a thread? Can a servlet start a thread that will work forever? And do servers usually close servlets while it has a thread running?
    thanx

    Servlets are invoked as a result of client request. But you can certainly make your servlet implement the runnable interface to do background processing.
    Imagine a servlet that is processing an image to send to the client but suppose the image processing takes 4-5 minutes to complete. You wouldn't wanna make your client to wait to see the result for 5 minutes. So you may send the partially processed image while still working on the processing in the background. All the subsequent requests from client will see a bit improved image. You can do something like this:
    public class MyServlet extends HttpServlet implements Runnable {
    public void init() throws ServletException {
    //Initialize your thread here
    public void run() {
    // do your background processing here
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
    // Handle the request here
    public void destroy() {
    // Be a good programmer and stop your thread here
    Hope it helps.

  • Send Get request from a servlet.

    Is it possible to send parameters from one servlet to another by using get? I don't want to use Post because the servlet recieving the parameters already has the post method doing something else. Any ideas?

    May you can use the RequestDispatcher for your use.
    Doc:
    public interface RequestDispatcher
    Defines an object that receives requests from the
    client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server.
    The servlet container creates the RequestDispatcher
    object, which is used as a wrapper around a server
    resource located at a particular path or given by a
    particular name.
    This interface is intended to wrap servlets, but a
    servlet container can create RequestDispatcher objects
    to wrap any type of resource.
    It send the requset with the same methode to an other resource. You don't have care about the parameter.
    Your code could look like this:
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException
            RequestDispatcher dispatcher = getServletConfig().getServletContext().getRequestDispatcher("/next");
            dispatcher.forward(request, response);
        }Dietmar

  • Error while sending a soap request from XML SPY to a webservice in XI

    Hi ,
    I published a webservice om the XI end and testing it with consuming the WSDL file in XML SPY and sending a soap request from there.
    I am getting the following error .
    <b>com.sap.aii.af.mp.module.ModuleException: either no channelID specified or no channel found for the specified party, service, and channel name</b>, MessageServlet(Version $Id: //tc/xi/645_VAL_REL/src/_adapters/_soap/java/com/sap/aii/af/mp/soap/web/MessageServlet.java#4 $)
         at com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:380)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Is this error due to the user authentication or due to some other issue .
    Please do let me know soon .
    Thanks a lot
    Nikhil

    Hi Ricardo ,
    I have the correct port now.
    the url looks like
    http://<host>:50000/XISOAPAdapter/MessageServlet?channel=:SIEBEL_DEV:SOAP_CUST
    when I am testing it in the XML spy. and send a soap server request. I am getting the popup for user authentication . once i put my user id it gives me a error saying
    <b>HTTP operation 'POST' could not be performed on URL
    '/XISOAPAdapter/MessageServlet?channel=:SIEBEL_DEV:SOAP_CUST&amp;version=3.0&amp;Sender.Service=SIEBEL_DEV&amp;Interface=http%3A%2F%2FOFCOM%2FUNIFY%2FCustomerMaster%5EMI_CUST'  due to an error :
    The connection to the server was terminated abnormally</b>
    Any Idea as to why is such a error is coming
    Thanks for the help
    Nikhil

  • Urgent....How can i redirect to my jsp page from servlet in init() method..

    How can i redirect to my jsp page from servlet in init() method..Becoz that servlet is calling while server startsup..so im writing some piece of code in init() method..after that i want to redirect to some jsp page ...is it possible?
    using RequestDispatcher..its not possible..becoz
    RequestDispatcher rd = sc.getRequestDispatcher("goto.jsp");
    rd.foward(req,res);
    Here the request and response are null objects..
    So mi question can frame as how can i get request/response in servlet's init method()..

    Hi guys
    did any one get a solution for this issue. calling a jsp in the startup of the servlet, i mean in the startup servlet. I do have a same req like i need to call a JSP which does some data reterival and calculations and i am putting the results in the cache. so in the jsp there in no output of HTML. when i use the URLConnection i am getting a error as below.
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:707)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:705)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:519)
    at com.toysrus.fns.alphablox.Startup.callJSP(Unknown Source)
    at com.toysrus.fns.alphablox.Startup.init(Unknown Source)
    at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
    so plz do let me know how to call a jsp in the start up of a servlet.
    Thanks
    Vidya

  • How to disable report's execution requests from the browser

    Hello gurus,
    We are implementing several security measures in our application, some of them are related to reports execution/visualization, we need to avoid users accessing reports that they don't have privilege to see. The reports were execute by Forms via RUN_REPORT_OBJECT, destination type CACHE and destination format PDF, then we displayed the output using the jobId provided to Forms by the Reports Server. Because these jobIds are sequential numbers any person was able to change the jobId in the URL and get the output of another report. This violated the Confidentiality of information.
    Now we generate all reports output to file, the file name is a random value, to avoid guessing. The problem is that even though the official way to execute a report is via the application, the report servlet is accepting request as URLs, and this violates the access controls we have implemented in the application.
    Is there a way to stop the reports servlet without affecting the valid requests (from RUN_REPORT_OBJET in Forms) or is there another possible way to disable URL requests?
    TIA
    Victor.

    If you are using Portal and SSO, you can assign privileges on Reports and Reports Servers to groups and/or users. For more info, see Chapter 10 of the "Publishing Reports to the Web" documentation: http://download.oracle.com/docs/cd/B14099_19/bi.1012/b14048/pbr_sec_arch.htm#i1006221

  • How to pass a HTTP request from a simple java class

    Is it possible to pass an HTTP request from a simple java class.if yes how?

    Is it possible to pass an HTTP request from a simple
    java class.if yes how?If you're talking about creating a HttpRequest object and passing it to a servlet, that would be a red flag to me that your design is flawed. You shouldn't have to do that - the application server (Tomcat, Weblogic, etc) should be the only thing that has to worry about creating that kind of object and passing it to you.

Maybe you are looking for

  • Two user accounts on one computer - syncing one library with separate apps

    I have just taken the plunge and moved over to a Macbook Pro from Windows. I am really impressed with the computer, but need some help with a particular problem. My wife has her iPhone and iPad, both of which are synced to one iTunes library on her o

  • Operations on very large binary numbers

    Hi guys, I'm trying to write a java class for manipulations of very large binary numbers. I'm representing the BN internally as boolean[] (array of booleans false for 0 & true for 1). I want to write an algorithm for the following operations : shifLe

  • Page Specific Persistence using Session Variables

    Hi, I have read a lot about using session variables to persist the ReportDocument object across page loads.  This works fine if you have just one page open with one report.  The problem I am having is I have a web application that makes 30 or 40 diff

  • Pricing condition in Info record.

    Dear All, I am facing a strange problem. We have define one condition type ZBAS-Basic Duty in %. In Developement client 300 it is appearing in drop down for maintaing condituion is info records manually & also in PO. In testing client it is not appea

  • Saving Swing Screen as a .doc document

    Hi I am facing a problem. I need to save a swing screen as a MS word document. What i mean is that within the application there should be an option to save the screen as a MS Word document. Is it possible to do so ? If yes then please let me know Tha