URGENT: redirect response with cookies to another URL

I get a sessionID in a JSP on my server http://server1.com and then i create a cookie containing this sessionID.
I want to send this cookie to redirect my client to another server http://server2.com.
here is part of my code, it doesn't work:
It's a JSP:
<jsp:include page="hautPage.jsp" flush="true" />
Cookie webiCookie = new Cookie("WebIntelligenceSession",webiSession.getSessionID() );
webiCookie.setPath("/");
response.addCookie(webiCookie);
//webiServer.onEndPage();
<%
response.sendRedirect("http://" + ConstGen.WEBI_SERVER_URL + ConstGen.WEBI_HSALPATH + "/WIGenerator/wigenerator/generator/ExecuteWIS?sWIS=DefaultWelcomeFrame");
%>
<body onLoad="window.open('<%=ConstGen.WEBI_SERVER_URL%><%=ConstGen.WEBI_HSALPATH%>/WIGenerator/wigenerator/generator/ExecuteWIS?sWIS=DefaultWelcomeFrame')">
</body>
<%
%>
<jsp:include page="basPage.jsp" flush="true" />

try using return after the response.sendRedirect..something ike this
[cdoe]
response.sendRedirect("url");
return;
Hope this helps ( assuming your link is correct)
Cheers
Khalid

Similar Messages

  • Urgent help needed with  cookie question

    Hi guys,
    my question is:
    if any servlet generate a cookie object ( during http connection, of course ), so it will always store this cookie on the client side ( the user' browser) , which called the servlet ( of course). Is it right? If yes, what happens if the browser doesnt accept cookies?
    Thanks in advance, Euclides.

    Hi
    According to me The values will not store if Cookies are disabled by client untill and unless u do,nt use any other mechanism to store it e.g Session , UrlRedirection
    Regards
    Saurabh Singhal

  • How does ISE choose which IP to put in URL redirect response?

    Hello,
    does anyone know how does ISE choose which IP to put in URL redirect response if it has more than one interface with an IP address and all interfaces are enabled in the portal configuration?
    I have a single ISE 1.3 PSN with all four interfaces configured, enabled, each on unique VLAN, and each with unique IP address.
    In the CWA portal configuration, all four interfaces are enabled.
    Wired clients connect to NAD, NAD sends RADIUS request to ISE, ISE responds with a RADIUS response including the URL-Redirect parameter which specifies the web redirect URL. ISE configuration uses "ip:port" in the URL. 
    My question is how does ISE choose which of its four interfaces to put in this URL? Is it always the same interface that RADIUS packets were received on? Or does it always choose the first portal enabled interface? Or is there another logic? Configurable or unconfigurable?
    Thanks!

    ISE uses the first interface enabled for that portal, so if want to use a specific interface, then only enable that interface.  If interface is GE0, then default behavior is to redirect with ip value set to node's FQDN.  If interface other than GE0, then default behavior is to return the IP address of the associated interface. 
    Aliases can be configured for each interface using the CLI 'ip host' command to associate a hostname/FQDN to the IP address of a given interface.  When configured, ISE will return that value rather than IP address in redirect.  This is critical if want to avoid certificate trust warning on connecting clients.
    Be sure that certificate assigned to interface includes the correct FQDN or optionally wilcard value in the CN or SAN fields to avoid cert warnings.

  • Need help with cookies....Urgent..

    We are internationalizing our application. Externalized all the message string and its working fine. But I am getting some weird exceptions..
    I am storing my language code and country in cookies. I am first trying to read the locale from the session. If it is not there in the session then I am reading the language code and country code from the cookies and creating the locale.. I am doing this becuase we have load balancing in production..
    Now let me explain my problem...
    I have a jsp page(1.jsp) which has a button on it. When this button is clicked it calls a servlet that opens another jsp(2.jsp) in a new window (like a pop up window) that will display some details. Now the problem is I am getiing null pointer exception on the second page. I am losing all the cookies that I have set. If I try to read the cookies and print their values , they are null. I have no clue why it is happening. I am forwarding to the 2.jsp from the servlet using RequestDispatcher.
    Someone please help me as it is very important .. I would really appreciate the help..
    TIA,

    I think a probable reason is that a new session is being created when you create the new window, i.e. the new window probably is starting a new session....try retrieving the session id, that may give you more insight into the bug.
    IF it does not work even after that, then it is possible that the cookies are disabled in the target system. In that case, wherever you have written a URL, replace it with 'res.encodeURL(<URL>)' where res is the Response object. This will change the session tracking from cookie based to URL based.
    You can store the values in an application bean, where you keep the session id and their preferences, but I would have preferred the other two ways ( i.e. cookies or URL based session values ).
    Its easier to have them in an application level bean due to easier handling, and only if the load and the memory are not your primary concerns.
    Hope this works,
    All the best

  • After re-directing to another URL the page control buttons on the top right don't response (minimize, full screen and close X)

    Hello,
    From about a week ago, when I redirect from a given site to another URL (A link in the first site), the new site is opens and all controls such as "go back one page", "reload current page", "Print" etc. are working (responses) well. Only the top right 3 buttons - "minimize", "restore up/maximize" "close" are not responding (hanging) – actually the first top line of the webpage doesn’t show the proper site name (on the top left) but keeps the header of the previous window (A site, Windows navigator, windows player, etc. – the last one that was open before the hang-up). i.e., the top line of the Firefox browser doesn’t show up but I see the header of the previous window…
    Also I opened the help "about Mozilla Firefox" to learn about my version and I can't close it.
    Also, after it happened, any new Firefox browser window I opened (clicking the browser button for additional browser), it encountered same problem.
    It happened also when an advertising popup happens when I open a site...
    If I navigate not from a link on an open site, but by choosing new sites only from my bookmarks list, everything is working properly.
    I tried help suggestions about add-ons, Spybot-SD immunization, etc. but can't solve the problem
    I can close the opened hanged windows only by using the “Windows Task Manager” Window
    Thanks
    Shlomo

    It looks like you have some malware.
    Have you tried running an antivirus scan?
    Some free antivirus options:
    [http://www.avast.com/eng/programs.html]
    [http://www.avira.com/en/download/index.html]
    Malware program recommendations:
    Malwarebytes' Anti-Malware - [http://www.malwarebytes.org/mbam.php]
    SuperAntispyware - [http://www.superantispyware.com/]
    AdAware - [http://www.lavasoftusa.com/software/adaware/]
    Spybot Search & Destroy - [http://www.safer-networking.org/en/index.html]
    If these don't find it or can't clear it, post in one of these forums for specialized malware removal help:
    [http://www.spywarewarrior.com/index.php]
    [http://forum.aumha.org/]
    [http://www.spywareinfoforum.com/]

  • Redirecting to another url when seesion expires... or on closing browser wi

    is it possible in servlet/jsp using tomcat to redirect to another URL so that i can delete my objects that are stored in ServletContext ?
    i want to redirect when the session get expire or when a user close its window ..
    is it possible using javascript ?
    if any info Plz mail at gmail ..[email protected]

    public class sessionManager implements HttpSessionListener {
         public void sessionCreated(HttpSessionEvent se) {
         public void sessionDestroyed(HttpSessionEvent se) {
    In this class for the sessionDestroyed() function i want to write RequestDispatcher .. so that i can redirect or forward my request to another URL so that i can delete my object that r present in ServletContext.
    because for requestDispatcher i need to implement HttpServlet
    which overrides service method ( doGet()/doPost()).which receives HttpServletRequest/HttpServletResponse object ...
    Plz let me know if possible .... the main thing is that i want to go to that particular URL for delting my objects
    any Plz let me know

  • Livecycle Designer 8 - Is it possible to have button to clear fields after user has clicked submit by email button so user can reuse form to send another response with different answers?

    Users will use form to fill in stats for enquiries so they want to keep form open, complete a form, click button to submit by email, then click another button to clear form, form now ready to accept form's responses.  They dont' want to keep opening form each time form needs to be completed.
    Hope you help.
    Thanks Sandra

    Hi,
    Thanks for your response, not sure what you mean by a loop.  I put together
    a draft form to show staff in our Knowledge Centre the sort of thing
    Livecycle Designer can do.
    (See attached file: Library  Request  Form_pub_0001.pdf)
    They are currently writing out on form and manually putting into excel to
    keep stats on the requests.
    Due to current Global Financial Crisis my section does not want to spend
    extra money at the moment seeking assistance from our tech heads.  So we
    are looking for least work no expense option for keeping stats.  I am a PA
    who just happens to have Livecycle program on my computer.
    We use Lotus Notes so I thought the staff could save copy of Library
    request form in the stationery folder.  The staff using the form want to be
    able to do the following:
    1. open the Library request form at the beginning of the day;
    2. when a request comes in, complete the form and click on Send by email
    button
    3. click on a Clear Data button to clear all data from all fields so the
    form is open ready for when the next request comes in.
    Staff are time poor and, as this is only one of their numerous duties, they
    don't want to keep going to a location and opening a file which can be very
    slow on some days
    Each day form may be filled out by approximately 15 staff who may receive
    anything from 0 - 4 requests a day.
    I am not a tech head so script writing is a deep, dark mystery.  Can you
    help using the form above as an example for achieving step 3 above.
    Thanks,
    Sandra Smith
    Personal Assistant
    PricewaterhouseCoopers Australia
    Office: ++61 (2) 8266 9069
    Fax: ++61 (2) 8286 9069
    [email protected]
    http://www.pwc.com/au
                                                                                    Kacyndra                                                 
                 <[email protected]                                        
                 >                                                          To
                                           Sandra K Smith/AU/TLS/PwC@AsiaPac
                 08/08/2009 12:25                                           cc
                 AM                                                                               
    Subject
                                           Livecycle 
                 Please respond to         Designer 8 - Is it possible to have
                 clearspace-200985         button to clear fields after user
                 0098-481178-2-216         has clicked submit by email button
                 [email protected].         so user can reuse form to send 
                     adobe.com             another response with different
                                           answers?                                                                               
    if i understand this correctly, you just want everything cleared whena
    buttons is pressed?
    you can either do it individually:
    on button click:
    mytextField.rawData=""
    or do a loop, using child/paretns..

  • How to invalidate session when i browse another url with out closing browse

    Hi,
    How can i find when i type another url and browse to that site without closing the browser.when i left the site i have to invalidate the session.
    how can i recognise this event.
    thanks

    You might be able to do this by catching a javascript event, then you'd need to submit a request back to the server before any session invalidation could occur. Basically, the server never know when the user is gone - that's why there's a timeout in sessions. The only other way is to have a logout button that the user clicks on to send the request to invalidate the session.

  • Flash interprets 3xx redirect responses as errors.

    Hi I am trying to upload videos to the YouTube API, it used to work great, butsomething has changed and now Flash interprets 3xx redirect responses as errors!
    I found a post on another forum where somebody has commented on the issue much better than i can, but there is still no answer
    Help please? I think this is an actual BUG in flash though...
    [ANOTHER GUYS QUESTION]
    Please help us to solve the following issue:
    We are uploading a video to YouTube using the FileReference.upload()
    method in AS3/Flex.  When it finishes, YouTube sends a status 302,
    which causes FileReference to trigger an IOErrorEvent. ResponseURL
    parameter is empty with no any data to extract. Of course, we expect
    here status 200 and after some tests we noticed the problem is
    connected with versions of Flash Player.
    We tested on next versions and:
    10.0.42.34 worked (received status 200)
    10.0.42.45 didn't work (received status 302)
    10.1.53.64 didn't work (received status 302)
    Also we found some older post from July 7, 2009 on
    http://blog.curiousmedia.com/?q=blog/upload-youtube-flash which
    describes the same problem in section "The Mac problem" but with no
    correct solution.
    Something similar about status 302 was said and for Youtube API for
    Python where the one should set ssl param to False to receive correct
    status back, but we are not sure how this can be implemented in
    context of flash. Here is the post about it:
    http://stackoverflow.com/questions/2863785/gdata-youtube-api-302-the-...
    We tried to search alot all over the internet and Youtube's Docs, but
    there is no any mention about the solution for this problem.
    Thanks for any reply in advance!
    [YOUTUBES ANSWER]
    Hi there,
    I ran the example you are referring to and I'm getting 302, as expected
    since it is basically utilizing the browser-based uploading mechanism which
    triggers a redirect.
    From AS3 documentation I gather that, ioError event always follows
    httpStatus event :
    http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/n...
    and this is what I see while running the uploader in Flex 10.x plugin :
    [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false
    eventPhase=2 status=302 responseURL=null]
    [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2
    text="Error #2038: File I/O Error. URL:
    http://uploads.gdata.youtube.com/action/FormDataUpload/AIwbFARxu-IiTy...
    The file does get uploaded to YouTube, as expected. However, it looks like
    Flash interprets 3xx redirect responses as errors.
    The challenge of coming up with a better solution is related to limitations
    of flash.net.FileReference, currently it does not allow one to set custom
    request headers in Flash (from docs I gather that it is possible in Adobe
    Air though) to implement, for example, resumable uploads.
    Thanks,
    Jarek Wilkiewicz, YouTube API Team
    Any ideas gurus????
    Cheers

    HI, i'm currently facing tha same issue, succesfull uploads but a non usable response object from event:
    [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=302 responseURL=null]
    Did u ever solved it or found a solution for this?
    this is my actual code:
    package com.theguaz {
        import flash.display.*;
        import flash.events.*;
        import flash.net.*;
        import flash.system.*;
        import flash.external.ExternalInterface;
        import com.adobe.serialization.json.*
        import com.greensock.TweenMax;
        import com.greensock.easing.*
        import com.greensock.plugins.*;
        public class FinalConnector extends MovieClip {
            private const _getTokenURL:String = "http://clientloginsolverUrl/youtube.php";
            private var _fileReference:FileReference;
            private var _uploadComplete:Boolean;
            private var _postUrl:String;
            private var _nextUrl:String;
            private var _token:String
            public function FinalConnector() {
                // constructor code
                addEventListener(Event.ADDED_TO_STAGE, configUI);
            private function configUI(e:Event):void {
                stage.scaleMode = StageScaleMode.NO_SCALE;
                stage.align = StageAlign.TOP_LEFT;
                setupBtns();
            private function setupBtns():void{
                login_btn.addEventListener(MouseEvent.CLICK, clickEventHandler);
                upload_btn.addEventListener(MouseEvent.CLICK, clickEventHandler);
                upload_btn.alpha = .1; upload_btn.mouseEnabled = false;
            private function clickEventHandler(e:MouseEvent):void{
                switch(e.currentTarget){
                    case login_btn:
                        youTubeLoginGateway();
                    break;
                    case upload_btn:
                        doUploadClick();
                    break;
                    /*case logout_btn:
                        doLogoutClick();
                    break;*/
            private function youTubeLoginGateway ():void {
                var urlRequest:URLRequest = new URLRequest(_getTokenURL);
                urlRequest.method = URLRequestMethod.GET;
                var urlLoader:URLLoader = new URLLoader();
                urlLoader.addEventListener(Event.COMPLETE, authCompleteHandler);
                urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, authFailedHandler);
                urlLoader.addEventListener(IOErrorEvent.IO_ERROR, authFailedHandler);
                urlLoader.load(urlRequest);
            private function authCompleteHandler(event:Event):void {
                var urlLoader:URLLoader = URLLoader(event.target);
                var result:Object = JSON.decode(urlLoader.data);
                _token = result.token;
                _postUrl = result.postUrl;           
                upload_btn.alpha = 1; upload_btn.mouseEnabled = true;
                label_txt.text = urlLoader.data;
            private function authFailedHandler(event:ErrorEvent):void {
                var loginErrorEvent = event;
                ExternalInterface.call("console.log", loginErrorEvent);
            private function doUploadClick():void {
              _fileReference = new FileReference();
              _fileReference.addEventListener(Event.SELECT, fileSelectHandler);
              _fileReference.addEventListener(ProgressEvent.PROGRESS, progressHandler);
              _fileReference.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
              _fileReference.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
                  var videoFilter:FileFilter = new FileFilter("Video", ".*f4v; *.flv; *.wmv; *.mpeg; *.mpg; *.f4v; *.vp8; *.webm; *.3gp; *.mp4; *.mov; *.avi; *.mpegs; *.mpg; *.3gpp;");
                _fileReference.browse([videoFilter]);
            private function httpStatusHandler(event:HTTPStatusEvent):void {
              // Browser-based uploads end with a HTTP 302 redirect to the 'nexturl' page.
              // However, Flash doesn't properly handle this redirect. So we just use the presence of the 302
              // redirect to assume success. It's not ideal. More info on browser-based uploads can be found at
              // http://code.google.com/apis/youtube/2.0/developers_guide_protocol_browser_based_uploading. html
                  if (event.status == 302) {
                    trace(event);
                    _uploadComplete = true;
                    label_txt.text = 'File uploaded successfully.';
                    TweenMax.to(label_txt, .25, {alpha:1});
            private function fileSelectHandler(event:Event):void {
                _fileReference.addEventListener(Event.COMPLETE, uploadCompleteHandler);
                uploadFile();
            private function uploadCompleteHandler(event:Event):void {
                label_txt.text = "File Uploaded: " + event.target.name;
            private function progressHandler(event:ProgressEvent):void {
                  var percent:Number = Math.round(100 * event.bytesLoaded / event.bytesTotal);
                label_txt.text = String(percent);
            private function ioErrorHandler(event:IOErrorEvent):void {
                  // uploadComplete is set in the httpStatusHandler when the HTTP 302 is returned by the YouTube API.
                  if (!_uploadComplete) {
                    trace('An error occurred: ' + event);
            private function uploadFile():void {
                var variables:URLVariables = new URLVariables();
                variables.token = _token;
                variables.nextUrl = "http://whatsoever/success.php";
                label_txt.text = "uploading...";
                TweenMax.to(label_txt, .25, {yoyo:true, repeat:-1, alpha:.5});
                var fileUploadUrl:URLRequest = new URLRequest(_postUrl);
                fileUploadUrl.contentType = "multipart/form-data";
                fileUploadUrl.method = URLRequestMethod.POST;
                fileUploadUrl.data = variables
                  _fileReference.upload(fileUploadUrl, 'file');
            //////////// END OF CLASS
    regards

  • Redirect page with POST method in JSTL

    how to redirect page with POST method in JSTL.
    below is the code that i make, but the page redirected with GET method,
    so, the URL shown as http://localhost:8080/tes2/coba2.jsp?nama=saya
    how to hide the parameter, so it didn't show at the URL..??
    anybody help me..??
    server1 -> coba1.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <title>coba1</title>
    </head>
    <body>
    <c:url value="http://localhost:8080/tes2/coba2.jsp" var="displayURL">
      <c:param name="nama" value="saya"/>
    </c:url>
    <c:redirect url="${displayURL}"/>
    </body>
    </html>server2->coba2.jsp
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <html>
    <head>
    <title>coba2</title>
    </head>
    <body>
    <c:forEach items="${param}" var="currentParam">
            <li><c:out value="${currentParam.key}" />
                = <c:out value="${currentParam.value}" /></li>
          </c:forEach>
    </body>
    </html>

    There are other two way communications methods as well. One such would be:
    Server1Page1: Take response with parameters.  Use HttpURLConnection to make a request to DataInputServlet
                  on Server2 and send the parameters there with a POST operation
    Server2DataInputServer: Takes request with data in it and starts a new session.  Puts the data into the session and
                  returns the session id to the requester
    Server1Page1: Reads the response from the DataInputServer (the session id) and generates a sendRedirect to
                  Server2's display page using the session id.  Server1Page1 is now done.
    Server2Page1: Gets a request from the client with the session id, and pulls the parameters out of the session.  Then
                  can continue as normal.Server2Page1 can also do a quick refresh to itself not using the session id as well, which will keep the URL visible by the client relatively clean.

  • CSS Load Balancing with Cookies

    We are trying to load balance 2 backend servers hosted on Websphere with advance balance cookies method.
    Restrictions
    ServerA is unable to accept cookies generated from ServerB.
    ServerA and ServerB are generating random cookies
    Unable to modify cookie string with a constant.
    How can we load balance based on cookies considering the above restrictions?
    We have attempted to do hash based load balancing with cookies but the problem we run into is the servers do not accept cookies generated from another server.
    The configuration we tried is written below:
    service ServerA
    ip address 192.168.10.2
    keepalive type tcp
    keepalive port 80
    active
    service ServerB
    ip address 192.168.20.2
    keepalive type tcp
    keepalive port 80
    active
    content ABC
    url "/*"
    add service ServerA
    string prefix "JSESSIONID="
    advanced-balance cookies
    port 80
    add service ServerB
    string skip-length 5
    string process-length 16
    string operation hash-xor
    protocol tcp
    vip address 172.16.32.1
    active
    Can we change the string prefix to JSESSION instead of JSESSIONID= ?
    The only place the app guys can add a constant string to match on is before the = sign.
    Is it possible for CSS to match on a constant string before = sign e.g below:
    service ServerA
    ip address 192.168.10.2
    keepalive type tcp
    keepalive port 80
    string id567=
    active
    service ServerB
    ip address 192.168.20.2
    keepalive type tcp
    keepalive port 80
    string id123=
    active
    content ABC
    url "/*"
    add service ServerA
    string prefix "JSESSION"
    advanced-balance cookies
    port 80
    add service ServerB
    string skip-length 0
    string process-length 6
    protocol tcp
    vip address 172.16.32.1
    active

    It should work.
    There is no reason for it not to work...
    This is the best method you can have on the CSS for stickyness.
    Get a sniffer trace on the client and server with arrowpoint cookie configured on the CSS and capture a failure so we can see what is going on.
    also send me the config so I can verify everything is ok.
    If you have a service request open with the TAC, you can also give the SR # so I can review what has been done.
    Gilles.

  • How to exit from a WebDynpro ABAP application and open another url

    Hi Friends,
    How to exit from a WebDynpro ABAP application and open another url like (www.yahoo.com) in the same window of the WD4 application on click of a Button?
    Regards,
    Xavier

    Hi,
    First of all you should create outbound plug in the window you are trying to exit with plufg type "Exit"
    Then create method handler in the view with this code
            data lo_view_cntr type ref to if_wd_view_controller.
            data lo_win_cntr type ref to if_wd_window_controller.
            data: l_parameter_list type wdr_event_parameter_list,
                  l_parameter type wdr_event_parameter,
                  l_val type ref to data,
                  l_val_url type REF TO data.
            field-symbols: <fs> type any,
                           <fs_url> type any.
            lo_view_cntr  = wd_this->wd_get_api( ).
            lo_win_cntr = lo_view_cntr->get_embedding_window_ctlr( ).
            CREATE DATA l_val type c.
            CREATE DATA l_val_url type string.
            ASSIGN l_val->* to <fs>.
            ASSIGN l_val_url->* to <fs_url>.
            <fs> = 'X'.
            <fs_url> = 'http://your-link.com'.     
            l_parameter-name = 'URL'.
            l_parameter-value = l_val_url.
            INSERT l_parameter INTO TABLE l_parameter_list.
            lo_win_cntr->if_wd_view_controller~fire_plug( EXPORTING plug_name = 'EXIT_PLUG'
                                                                    parameters = l_parameter_list ).
          You can easily change this logic to exit application instead of redirecting to the site
           just changing to
           l_parameter-name = 'CLOSE_WINDOW'.

  • Reading http redirect response headers in swf

    Hi all,
    I have a URL requested by a ULRLoader object. I know that the URL will redirect to another URL (HTTP 307). What I need to know is the URL the URLLoader is redirected to, not so much the data it receives (which works fine).
    The HTTPStatus event only fires once and only for the status 200 when the data comes in. I was hoping it would fire for the http status 307 as well with some additional info, but no such luck.
    AIR has the httpResponseStatus event which seems to do just what I need, but waddayaknow, I need it in the Flash player.
    Thanks in advance,
    Manno

    I've spent most of the day with this problem and the only solution I could find was to disable KeepAlive support on our Apache web server. I haven't been able to find anything else relating to this problem and would appreciate anyone who could comment because I'm sure Java Web Start should work with KeepAlive (shouldn't it be using HTTP 1.1 and persistent connections anyway?)

  • Receive POST data from another URL and process using Struts

    Hi there
    We have a website and as of now we are receiving some data from another URL which is received as an appended part of the URL. My application uses Struts and we process the received data and send back a response.
    Now my question is, I have been asked to change this behavior because there are more parameters now which cannot be passed through the URL. I am supposed to get the data from the other URL as POST data (as a form) and I have to create a new Struts action to receive this data, process it and send the response back to the requesting URL.
    Please explain me how to do this using some example code snippets.
    Thanks a lot

    Lookup in XI is used to call the target data storage system and get data from there to your mapping programme.
    In XI you can do Lookup in Message Mapping, Java Mapping and in XSLT Mapping. Previously Lookup in XI was system dependent. But now what ever the system are i.e. SAP system or non-sap system(Oracle,MS SQL etc) lookup API are same.
    Overview of Lookup
    - Lookups are used to identify/request the data from mapping program.
    - It interrupt the process and looking for data which was stored in target system.
    - It get that data and comeback to process and continue with that data.
    Types of Lookups in XI
    - JDBC Lookup: JDBC lookup is used for accessing data from database (non SAP).
    - RFC Lookup: RFC lookup is used for accessing the SAP Data.
    - SOAP Lookup: SOAP lookup is used for accessing data from Webservice
    Steps to perform Lookup in Mapping
    Import package com.sap.aii.mapping.lookup.*;
    Create connection to the target Database system.
    // Determine communication channel created in ID
    Channel channel = null;
    channel = LookupService.getChannel("DB-SYSTEM-NAME","DB-CHANNEL-NAME");
    // Get system accessor for the channel.
    DataBaseAccessor accessor = null;
    accessor = LookupService.getDataBaseAccessor(channel);
    Build the Query String.
    Getting Result
    // Execute Query and get the values.
    DataBaseResult resultSet = null;
    resultSet = accessor.execute(Query);

  • How to 'tunnel' requests/response with servlet?

    Hallo!
    I have the following problem.
    Tomcat is used as ServletEngine. Here should work a servlet for authorization. The web application resides on another webserver.
    After authorization all request go to Tomcat where a servlet should get (via HTTP) the HTML-pages from the other webserver and sends them to the client. The customer wants to act the Tomcat as Server to the client and as client to the other webserver. For me it seems to be some kind of proxy functionality.
    How can I achieve this?
    Kind regards
    Jochen

    Hi,
    I am currently writing almost the same thing. And I have a partial success with something like ProxyServlet. What it does:
    1. creates a URL object
    2. creates HttpURLConnection through the URL
    3. copies servlet's request parameters to the HttpURLConnection's request
    4. copies the HttpURLConnection's response to the servlet's response
    It works, but it is very - very slow.
    I am currently struggling with the Keep-Alive feature in HTTP 1.1 that the remote server sends. If I copy that header onto the response, the client sends another request to the same channel, that is mean while broken - the servet is used only by one to one.
    I am trying to find something like URL Connection pool, but still I am not successful. I am going to try not to trasfer the Keep-Alive headers to the client - perhaps this sort of downgrading Http 1.1 to 1.0 will limit the timeout delays ...
    Did you succeed in your work ?
    Ales

Maybe you are looking for

  • Lost all my calendars in ical - help!

    I recently attempted to set up Google Calendars as a link between my wife's calendar in Outlook and my ical. Having set up a Google Calendar account in ical I tried to get the calendars to sync without success. The next day when I booted up my Mac ic

  • Change Item Quantity in the Billing Document ( Proforma Invoice )

    Hi, There is a requirement from the client to change the quantity at item level in the billing document ( Order based Proforma Invoice ) after it is saved. As SAP does not allow to change in the VF02 transaction, Please let me how to change quantity

  • After System Copy warning file not found

    Hi experts, I got warning in my db2diag.log after performing system copy. My current SID is Q01 and previous one is P01. 2010-08-05-15.01.07.680835+420 E719728A497        LEVEL: Warning (OS) PID     : 1703936              TID  : 1           PROC : R3

  • ItemField Conversion Agent - ContentMaster Studio

    Hi I'm trying to convert an XI-XML Message to HL7-XML Message and not HL7 Flat file . I would like to use ItemFiled ContentMaster Studio and develop a Serializer to read the XI-XML Document and Convert it to HL7 XML Document which needs to sent acros

  • What File Type we have to pass to get the pipe delimeter ?

    Hi Sir, Am fetching data from sap and downloading it on to the desktop or any drive, here am using GUI_DOWNLOAD function module in the am passing separetor = '|' filetype = 'ASC' but in output file am not getting the pipes, see the following code. *F