How to send a request ??

Hi i am developing a web application
I have two frames in my jsp page
1. left fram
2. Right frame
Left frame contains some links to add items . To display that form i.e add.jsp , the request is send from servlet by checking certain parameters .
But the problem is the add.jsp is complete different jsp page and request is forwarded with
getrequestdispatcher ()method , but the response is generated in left frame that means i am unable to transfer the request to different jsp page
Please help me
Or let me know if you need some more information
Thanks

Well, obviously until you refresh the left frame contents it will not display any new additions.
I can only think of JavaScript as the way out. After the add form is submitted and processed, as part of the response, send back a 'Please Wait' (or whatever suits you) page with JavaScript that will simply [set the location|http://www.tizag.com/javascriptT/javascriptredirect.php] to the original page containing the frameset. For example, if your main page is main.jsp, then your response (after successful addition of the entry) could be something like this:
<html>
<head>
   function redirectToMain()
        window.location = "http://hostname/main.jsp";
        //the only shortcoming of this method is that it doesn't work
        // with relative URLs; but you can always generate the complete
        // URL on the server side by getting the scheme, servername and port
       //from the HTTPServletResponse and contextpath from the ServletContext
</head>
<body onLoad="redirectToMain();">
Please Wait...
If you're not redirected for some reason, please <a href="http://hostname/main.jsp" target="_top">click here</a>
</body>
</html>Otherwise, you can consider
a. opening add.jsp in the left frame (and not in the right frame); this way, when you submit the new entry, you'll finally get back the left.jsp with the updated contents
b. opening a new window for add.jsp and use JavaScript to refresh the parent frame
Edited by: nogoodatcoding on May 28, 2009 8:51 AM

Similar Messages

  • How to send a request and get a response through xml

    How to send a request and get a response through xml files?

    This is the code that works for me. Hope you find it useful.
         public static String sendHttpGetRequest(String endpoint, String requestParameters){
              String result = null;
              // Send a GET request to the servlet
              try{
                   // Send data
                   String urlStr = endpoint;
                   if (requestParameters != null && requestParameters.length () > 0){
                        urlStr += "?" + requestParameters;
                   URL url = new URL(urlStr);
                   HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                   conn.setRequestProperty("Accept", "application/xml");
                   // Get the response
                   BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                   StringBuffer sb = new StringBuffer();
                   String line;
                   while ((line = rd.readLine()) != null){
                        sb.append(line);
                   rd.close();
                   result = sb.toString();
              } catch (Exception e){
                   e.printStackTrace();
              return result;
         }

  • How to send a request to a web server

    Hi All!
    How can I send a request to a web server using java.net package? Can any one give me a simple example?
    thanks,
    Padma.

    http://javaalmanac.com/egs/java.net/Post.html
    http://www.developer.com/tech/article.php/761521
    http://www.javaworld.com/javaworld/jw-03-2001/jw-0323-traps.html

  • 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 send SOAP request by HTTP POST?

    I want to access a SOAP webservice using mx.rpc.soap.mxml.WebService.
    Following is my code:
    <mx:WebService id="miner_service" wsdl="http://localhost:8080">        <mx:operation name="hello" result="echoResultHandler(event);"></mx:operation></mx:WebService>
    When debugging with that, I got such error message:
    [Fault] exception, information=[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://localhost:8080)"]
    Then I use Fiddler try to capture the response returned by server, it's like this:
    Error responseError code 501. Message: Unsupported method ('GET'). Error code explanation: 501 = Server does not support this operation.
    But when I use python to send SOAP request by HTTP POST, the server will return correct response.
    So how can I send SOAP request by HTTP POST?
    (I tried <mx:WebService wsdl="http://localhost:8080" method="POST">, but no luck..)

    Sorry for my late reply..
    There's no WSDL for that SOAP service

  • How to send two request in the same connection with HttpURLConnection?

    As the title, I want to send two or more requests in the same connection with HttpsURLConnection..I wish all requests are in the same session.
    My code is as following:
    package test1;
    //import javax.net.ssl.*;
    import java.net.*;
    import java.io.*;
    public class httptest {
    public httptest() {
    public void test() {
    HttpURLConnection uc = null;
    String urlStr="";
    urlStr="http://172.16.245.151/test/page1.jsp";
    try {
    URL u = new URL(urlStr);
    uc = (HttpURLConnection) u.openConnection();
    uc.setRequestMethod("GET");
    uc.setDoOutput(true);
    // uc.connect();
    OutputStream out = uc.getOutputStream();
    out.flush();
    out.close();
    catch (Exception ex) {
    System.out.println(ex.getMessage());
    public static void main(String[] args) {
    httptest tt = new httptest();
    tt.test();
    The sample class just can send a request..Now we think of the sentence :uc = (HttpURLConnection) u.openConnection();
    Obviousely, a HttpURLConnection can just have a Object of the Class URL, and the Class URL have no setURL mothed. So I can't use a HttpURLConnection to send two request.
    I just want the HttpURLConnect is the same to IE...Do you understand what I mean?
    Any helps will be appreciated...

    As the title, I want to send two or more requests in the same connection with HttpsURLConnection..I wish all requests are in the same session.
    My code is as following:
    package test1;
    //import javax.net.ssl.*;
    import java.net.*;
    import java.io.*;
    public class httptest {
    public httptest() {
    public void test() {
    HttpURLConnection uc = null;
    String urlStr="";
    urlStr="http://172.16.245.151/test/page1.jsp";
    try {
    URL u = new URL(urlStr);
    uc = (HttpURLConnection) u.openConnection();
    uc.setRequestMethod("GET");
    uc.setDoOutput(true);
    // uc.connect();
    OutputStream out = uc.getOutputStream();
    out.flush();
    out.close();
    catch (Exception ex) {
    System.out.println(ex.getMessage());
    public static void main(String[] args) {
    httptest tt = new httptest();
    tt.test();
    The sample class just can send a request..Now we think of the sentence :uc = (HttpURLConnection) u.openConnection();
    Obviousely, a HttpURLConnection can just have a Object of the Class URL, and the Class URL have no setURL mothed. So I can't use a HttpURLConnection to send two request.
    I just want the HttpURLConnect is the same to IE...Do you understand what I mean?
    Any helps will be appreciated...

  • How to send a request from a page to another

    Hello,
    I've started a project an I would like to do the following.
    I have :
    -a datasource included in my project
    -a page customer_list.jsp with a list (and data binding a datasource table)
    -a page customer_search.jsp with a text field(where i write my sql request) and a ok button
    -a link (page navigation) between ok button and customer_list.jsp
    I would like, when I clic on the ok button, to go to the customer_list page with datas in the list that result from my sql request.
    What I think :
    -in the ok buton event, create a requestBean object and .... (don't know how to specify it a request, but i'm searching)
    -return "customer_list"
    -in the customer_list.java constructor : recover the requestBean Object (how to do ?) and bind the result to the list.
    I think it's not a good way to do, this is my first project and I don't know yet how to do a good work with JSC2.
    Can you tell me where are the "bugs" with what I want to do ?
    Thanks for your answers
    Nicolas

    I've found !
    let's see my ok button code :
    public String b4_action() {
            String sql = e1.getText().toString();
            try
            getSessionBean1().getCustomerRowSet().setCommand(sql);
            getSessionBean1().getCustomerRowSet().execute();
            catch(SQLException e)
                System.err.println(e);
            return "customer_list";
        }I hope this will help someone else ...
    Nicolas

  • How to send meeting request by mail adapter

    Hi,
    I'm doing scenario from file to mail. I have a sender file adapter to pick up the meeting request standard format file(*.ics) from file system. On the other side I have a receiver mail adapter to send mail. What I want to do is the sent mail by mail adapter should be a meeting request instead of a normal email with meeting request as its attachment.
    I use localejbs/AF_Modules/MessageTransformBean as first module in mail adapter, but the sent mail is also a normal with meeting request as its attachment. This is not what I expected.
    I also created own module for mail adapter to realize it. Do I need to change the format of meeting reqeust information in payload? Actually I have chance to do it in module. But what should I do? Thanks.

    Hi, Krishna:
    Thanks for your reply.
    Actually the content of ics file is like:
    BEGIN:VCALENDAR
    PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
    VERSION:2.0
    METHOD:REQUEST
    BEGIN:VEVENT
    ATTENDEE;CN="Wu, Oscar";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:[email protected]
    ORGANIZER:MAILTO:[email protected]
    DTSTART:20070626T130000Z
    DTEND:20070626T150000Z
    LOCATION:Shanghai
    TRANSP:OPAQUE
    SEQUENCE:0
    UID:040000008200E00074C5B7101A82E00800000000F067E9BB0DB8C7010000000000000000100
    00000C7423D530FE8744687B0C7C08D4CAA58
    DTSTAMP:20070626T104913Z
    DESCRIPTION:Meeting request without attachment\n
    SUMMARY:Test appointment
    PRIORITY:5
    X-MICROSOFT-CDO-IMPORTANCE:1
    CLASS:PUBLIC
    BEGIN:VALARM
    TRIGGER:-PT15M
    ACTION:DISPLAY
    DESCRIPTION:Reminder
    END:VALARM
    END:VEVENT
    END:VCALENDAR
    this content is content of meeting request based on RFC 822, what I want is not get the content itself in mail, I want the mail adapter send a meeting request out automatically when it get this content.
    Thanks

  • How to send a request to Apple?

    Would someone please point me in the right direction to send and/or make a request to Apple. In particular, I would like to make a request to have Graphics card/energy saver selection for my MBP. It was a selection in Leopard, but not in SL. I could choose between one Graphics card for energy savings and another for higher performance, but now I do not have the ability to choose. I've searched under customer service, customer requests, etc, but I just can't seem to remember the term that has been used in this forum.
    Thanks in advance for the help.

    Better is to send a bug report or an enhancement request to Apple via its Bug Reporter system. To do this, join the Apple Developer Connection (ADC)—it's free and available for all Mac users and gets you a look at some development software. Since you already have an Apple username/ID, use that. Once a member, go to Apple BugReporter and file your bug report or enhancement request. The nice thing with this procedure over submitting feedback is that you get a response and a follow-up number; thus, starting a dialog with engineering.

  • How to send a request for new updates for BC?

    I'm looking at creating a website for a College and I'm looking at BC to manage this. My problem so far is that the admin section is nice and all but there is no way to give a new admin rights to specific page / pages. Which was so nicely done with Adobe Contribute. Since Contribute is basically going to the waste side. I need something that can work at that level.
    Any suggestions on How to request this for the admin section?
    Thanks.

    Hi,
    Unfortunately there's no option to give web page specific permissions to an admin at this stage. 
    The only workaround is to use workflow as a "content approval" workflow to monitor edits. 
    Kind regards,
    -Sidney

  • How to send a request parameter to a dialog pages with jsf

    I'm using the dialog framework of oracle, java server faces.......
    I need to open a url on a dialog page(request scope), and I must to pass request parameters. I put <f:param> objects inside the commandLink who I click.....
    If the page is not dialog, it woks fine, but when I put in a dialog way.... nothing work
    =[
    anyone know what I have to do?
    thanks

    Hi, I suppose you have already seen the ADF DIalog Framework, isn't it?
    I think there tells how to pass parameter
    A workaround is to save them in your session and then get them back and remove

  • How to send a request to other apex app users?

    HI,
    Is there any kind of function in apex can enable me to make a thing that can enable apex app end users communicating with each other?
    Like, If I input an error item no, and I wouuld like my administrator to change it, I now will write him a small text in stick paper, can we do things within apex?

    Hello,
    I don't think it's too hard to make something like that. Basically you've a table for messages and you have a region on page 0 (to show on all pages) or whatever page you want that queries that table. You could even let it query every x seconds automatically with ajax.
    Carl for ex has in his app a comments section: http://apex.oracle.com/pls/otn/f?p=11933:5
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • Sending SOAP request from XI and writing a scheduler for this

    Dear XI Experts,
    My scenario is as follows.
    We have two landscapes
    1)     XI, R/3
    2)     Client System(Remote, Other than SAP)
    Now we have to pull the data from client system using WSDL (There will be one method for pulling the data in the WSDL file). The WSDL is provided by the client. We are importing that WSDL as external definition in Integration Repository and implementing the scenario “SOAP to XI to RFC” and configuring it Integration Directory.
    Remember the client will not send the data to XI. Only we have to pull the data as mentioned above.
    Problems:-
    (i)     How to send SOAP request to the client using XI only?
    (ii)     How to write a scheduler for this?
    please help us.
    Thanks...
    Praveen Gujjeti

    Ur Suggestion
    "My proposition looks like that. in R/3 you have scheduled RFC call in some program. This RFC calls XI and XI is calling using SOAP adapter your client. Then response go back to your RFC and you can handle this data."
    As you mentioned, I am not scheduling any RFC call in R/3. If you go through my first query u can find two points where I am having some doubts......
    How to send SOAP request to the client using XI only? Is it possible to send a SOAP request from XI?
    If so,
    (ii) How to write a scheduler for this? So that it will invoke the webservice and get the data from client application(system)

  • MapViewer: send admin request using pl/sql

    Hello,
    i have a reqirement to send mapviewer admin requests to the mapviewer server using pl/sql.
    I found a java class in Re: How can I refresh the map cache for Oracle Maps ? , but i'm struggeling to replicate this functionality in pl/sql, without using java.
    Are there any examples out htere how to send admin requests to mapviewer using pl/sql?
    Thanks in advance,
    Dirk

    You may use the UTL_SMTP package to send e-mail via the SMTP protocol. This package has been available in the Oracle database since Oracle 8i Release 2 (8.1.6). For more information, please check its documentation in "Oracle8i Supplied PL/SQL Packages Reference".

  • How to send as an email the spool request?

    Dear Experts,
    My last post was Email background schedule report to gmail or yahoo mail .
    I got solution but it's work as a notification which we can say the after report run it triggers mail that report is completed as this time.
    But i required the thing how to send a spool request of a report  as an email attachment.
    it will be in .xls or .pdf or xyz format.
    It was the additional task which was required by my organization.
    I also want to know the following things.
    1. what is sap default configuration and system behind it.
    2. what the things abaper have to check.
    3. what is bcs_examples & where do i found these bcs_example8.
    Please guide me to explore my knowledge.
    Thanks & regards
    Nayan Lad
    Note for moderator : Sir, I will close request at 2:30 pm today onward, so please do not lock it.
    Moderator Message: All your questions can be answered by searching.
    Edited by: kishan P on Nov 13, 2010 3:29 PM

    need solution..

Maybe you are looking for

  • Assigning of characteristics value for a batch

    Hi All, Please help regarding the assigning of characteristics value for a batch in transaction code MSC2N or MSC2 in the classification tab. If Function modules or BAPI is available pls advise the inputs to be provided for the function modules. Here

  • EPUB file won't open in Apple iBooks

    Hi all! I'm creating ebooks for a client using InDesign CC and she reports that the most recent EPUB I've created for her won't open in iBooks. As I don't own a smartphone or tablet I can't error-test on my end, but if you can think of anything that

  • Whether any closing procedure for Special Purpose ledger

    Whether in SPL you can do the annual closing activities separately, like carry forward, closing the P & L Accounts and taking the balance to retained earnings etc? If so, how do you do that?

  • Case management - BAPI_CASE_CREATE, BAPI_CASE_ADDELEMENTS

    Hi, I want to create case with linked objects. I can link business partner, account .. but i can't link other case as case item. I have always error message Internal error: class CL_SCMG_CASE_API; method ELEMENT_INSERT. I use the same kind of paramet

  • 3850 Stack - "Authorization Failed" from Console

    Hello, I have a stack of 3 x 3850s. All connected up via the stack cables. I have the Primary Active Switch, The Standby and Member. When I connect a console cable into the Primary Active I get access to the stack. If I connect to any of the other 2