About  parameter length in response.sendRedirect()

I want to pass a long String in response.sendRedirect(), but it failed.
Is the length limited?
Can i change it? If not, how i pass the String?
Thanks!
coral9527

The sendRedirect command always sends a GET request. GET requests do have a limited length to their parameters.
How you pass the String is dependent on where you are redirecting to...
If you are redirecting to a source in the same web app, then the first thing you should try is to not pass the string at all. Perhaps pass some key words, send the redirect and let the other side generate the full String. Or you could put the long String in the user's session, send a redirect with the attribute name as a parameter, then retrieve it from the session on the other side.
If you are redirecting to a source outside of your control, you may need to do an HTTPURLConnection using the POST method and copy the results to the user's browser...

Similar Messages

  • Response.sendRedirect(URL), problem if '&' is usd as part of paramete value

    i have to redirect to a page having following URL
    http://www.citease.com/afc/d&o_coverage.htm
    now & is part of value rather than a separater of parameters.
    whenever i redirect it as
    strURL = "http://localhost:8080/cms/redirector.jsp?ckUrl=http://www.citease.com/afc/d&o_coverage.htm";
    response.sendRedirect(strURL);
    it will not work properly, will try to access only
    http://www.citease.com/afc/d
    Please help.
    Best regards,
    Waseem Aslam

    Encode the URL, the & should be & amp;.
    You may find the URLEncoder useful.

  • Response.sendRedirect doesn't work

    Hi,
    I implemented the post authentication class. I added some code to the onLoginFailed method and i am trying to redirect user for my own page and not the standard error page of opensso (IdP). When using response.sendRedirect("/my_page") i got an error message telling me that redirection has failed because record already committed.
    I think the problem is due to the original redirection done by the IdP, isn't it? Is there a solution to redirect user for my own login failure page?
    Thanks.

    How about this.
    Do a combination of the two.
    Use the post auth plugin to do your work with LDAP it has access and has all the needed information.
    Add the attributes to the ?session?header? in the post auth plugin maybe?
    Use the default failrue url you are sending them to to pull the info out of the session headers and do whatever is needed at that point?
    I would try just populating one attribute first and redirecting using the default failure url to some simple page that prints out to validate if it would work.
    J

  • Response.sendRedirect doesn't work with IAS 10g

    Hello,
    I'm moving my application to JDK 1.4 and IAS 10g.
    It's alright, but I noticed one problem.
    For long operation I created my way to display my "Working in progress..." page.
    I create an HTML file into a cache folder and I redirect to that file that reload itself every five seconds.
    Once the operation is terminated it change a session variable that is loaded by the HTML page and it ends the "Working in progress..." message.
    The problem is that in IAS 10g it doesn't redirect to the HTML file immediately, it seems that "wait" the operation is almost finished: il redirect to the HTML file, and after 5 seconds it loads the end message of the operation.
    This is the part of the code:
    [WRITE FILE IN c:\application\tools\template\cache as tempxyz.html]
    String urlToLoad = "/myApp/tools/template/cache/tempxyz.html";
    response.sendRedirect(urlToLoad);
    [OPERATIONS]
    [CHANGE SESSION VALUE]
    -END-
    The "response.sendRedirect(urlToLoad);" instruction pass without errors.
    I hope I explained my situation.
    Thanks in advance for any suggestions,
    EP

    Thanks Qiang,
    Ive done exactly as youve said and it must be a rewriting problem as you suggested. Here is the header from accessing the servlet on the Linux host machine (IP 192.168.5.121 called 'BEAST')
    --10:12:27-- http://192.168.5.121:7780/webapp/test
    => `test'
    Connecting to 192.168.5.121:7780... connected.
    HTTP request sent, awaiting response...
    1 HTTP/1.1 302 Moved Temporarily
    2 Date: Wed, 11 May 2005 09:12:27 GMT
    3 Server: Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server
    4 Content-Length: 183
    5 Cache-Control: private
    6 Location: http://BEAST:7779/webapp/testJ.jsp
    7 Keep-Alive: timeout=15, max=100
    8 Connection: Keep-Alive
    9 Content-Type: application/octet-stream
    Location: http://BEAST:7779/webapp/testJ.jsp [following]
    --10:12:27-- http://beast:7779/webapp/testJ.jsp
    => `testJ.jsp.3'
    Resolving beast... done.
    Connecting to beast[127.0.0.1]:7779... connected.
    That worked fine. Here is the header on my windows machine on the network ( IP 192.168.5.120) :
    HTTP/1.1 302 Moved Temporarily
    Date: Wed, 11 May 2005 09:03:21 GMT
    Server: Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server
    Content-Length: 183
    Cache-Control: private
    Location: http://BEAST:7779/webapp/testJ.jsp
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Content-Type: application/octet-stream
    I think the problem must be that the response is telling it to redirect to BEAST (which is the name of the server) but the windows box cant resolve the name. Must be why i get the page cannot be displayed.
    The code in the servlet 'test' to redirect is just:
    response.sendRedirect("testJ.jsp");
    Any ideas would be much appreciated on how I can fix this other than setting up a local DNS server?!
    Cheers,
    Rob.

  • Wrong content length in response header, ICM

    Hello,
    When i checked in the SMICM log file i got the error message:
    [Thr 1085303104] *** ERROR => HttpClntHdlResponse: client: premature EOS (28980/59150) - wrong content length in response header
    Kindly let me know what may be the cause of this error.
    Kind regards
    Lutz

    Hi Raghu and Anil,
    here are some more information:
    Kernel-Release    700
    Compilation       Linux GNU SLES-9
    Patch-Level       201
    SAP_ABA     700     0019     SAPKA70019
    SAP_BASIS     700     0019     SAPKB70019
    PI_BASIS     2005_1_700     0019     SAPKIPYJ7J
    ST-PI     2008_1_700     0000          -
    SAP_BW     700     0021     SAPKW70021
    SAP_AP     700     0016     SAPKNA7016
    SAP_APPL     600     0015     SAPKH60015
    SAP_HR     600     0038     SAPKE60038
    ST-A/PI     01L_ECC600     0000          -
    ICM Parameter
    Services
    icm/server_port_0     = PROT=HTTP,PORT=8022
    icm/server_port_1     = PROT=SMTP,PORT=0
    Hard limits
    icm/max_services               = 30
    icm/listen_queue_len           = 512
    icm/req_queue_len              = 500
    icm/max_conn                   = 500
    icm/max_sockets                = 2048
    Thread handling
    icm/min_threads                = 10
    icm/max_threads                = 50
    icm/min_spare_threads          = 3
    Tracing and statistic
    rdisp/TRACE                    = 1
    icm/tracefile                  = dev_icm
    icm/log_level                  = 0
    icm/stat_level                 = 1
    icm/security_log               = LOGFILE=dev_icm_sec,MAXSIZEKB=500
    icm/accept_remote_trace_level  = 0
    Monitoring
    icm/ccms_monitoring            = 1
    icm/ccms_refresh_rate (sec.)   = 30
    Timeout handling
    icm/keep_alive_timeout (sec.)  = 60
    icm/conn_timeout (msec.)       = 5000
    HTTP settings
    icm/HTTP/max_request_size_KB   = 102400
    icm/HTTP/server_cache_0        = PREFIX=/, CACHEDIR=/usr/sap/PF1/DVEBMGS22/dat
    a/cache
    icm/HTTP/admin_0               = PREFIX=/sap/admin,DOCROOT=/usr/sap/PF1/DVEBMG
    S22/data/icmanroot/admin,AUTHFILE=/usr/sap/PF1/SYS
    icm/HTTP/auth_0                = PREFIX=/,FILTER=SAP
    HTTP(S) error handling
    is/HTTP/show_detailed_errors   = 1
    HTTPS (SSL) settings
    icm/HTTPS/verify_client        = 1
    ssf/name                       =
    ssf/ssfapi_lib                 =
    sec/libsapsecu                 =
    ssl/ssl_lib                    =
    Context Quotas
    icm/HTTP/context_quota         = 90%
    icm/HTTPS/context_quota        = 90%
    icm/SMTP/context_quota         = 90%
    Memory Pipe settings
    mpi/total_size_MB              = 80
    mpi/buffer_size                = 65536
    J2EE settings
    rdisp/j2ee_start               = 0
    is/HTTP/default_root_hdl       = J2EE
    Content Filter settings
    csi/enable                     = TRUE
    csi/SAP/csa_lib                = /usr/sap/PF1/DVEBMGS22/exe/libsapcsa.so
    Misc
    icm/host_name_full             = cipf122.ikk.local
    icm/cancel_strategy            = cancel requests without session (stateless)
    rdisp/plugin_auto_logout       = 1800
    is/HTTP/virt_host_0            = :;
    is/SMTP/virt_host_0            = :;
    Best regards
    Lutz

  • How to handle response.sendRedirect(url) in a portlet w/ webflow?

    I am using a webflow to navigate within a portlet. There are three jsp pages or
    nodes in the portlet. One of the jsp pages has the following logic:
    if (A) { response.sendRedirect(url1)}
    else if(B) { response.sendRedirect(url2)}
    else{display rest of this jsp page}
    I think I have the correct portlet urls. I used WebflowJSPHelper.createWebflowURL(...).
    The problem is when it tries to redirect, the whole portlet disapears leaving
    only the title bar. I check the weblogic log file and there is an exception about
    RuleSetNotFoundException. Does anybody know how to handle this problem? Can
    I use sendRedirect method in a portlet?
    thanks,

    Go to dev2dev.bea.com source code library and copy the redirect sample code in
    your application domain. This program expects you to make come changes in the
    portal workflow.
    ciao
    "Edoardo Boechat" <[email protected]> wrote:
    >
    Dear James,
    Maybe I'll be boring, but I'll give you my expirience with "sendRedirect".
    When you use sendRedirect you send back to the browser a new URL that
    him will
    use to obtain the content that will be exposed, in other words, It's
    a client
    side operation.
    The portlet machanism work on the server side of the application. So
    why you are
    using sendRedirect? If one of that conditions happen, are you interesting
    in expose
    a content of another web site?
    If you want to expose the content of another web site, use the wizard
    to generate
    a example jsp page who do this correct in a portlet and adapt the code
    to your
    situation.
    Otherwise, you are using a wrong concept. If it's a server side operation
    you
    need to use "forward" or "include" operation to do what you want.
    I expect be helpfull,
    Edoardo Boechat.
    "James" <[email protected]> wrote:
    I am using a webflow to navigate within a portlet. There are threejsp
    pages or
    nodes in the portlet. One of the jsp pages has the following logic:
    if (A) { response.sendRedirect(url1)}
    else if(B) { response.sendRedirect(url2)}
    else{display rest of this jsp page}
    I think I have the correct portlet urls. I used WebflowJSPHelper.createWebflowURL(...).
    The problem is when it tries to redirect, the whole portlet disapears
    leaving
    only the title bar. I check the weblogic log file and there is an exception
    about
    RuleSetNotFoundException. Does anybody know how to handle this problem?
    Can
    I use sendRedirect method in a portlet?
    thanks,

  • Response.sendRedirect throws IOException

    I am using jsdk2.0 and I am using servlet runner to test this servlet.
    In my servlet if a person is authorized I am sending the person to a particular URL.
    if(rs.next())
    response.sendRedirect(response.encodeRedirectUrl("https://xyz.com"));
    It does go to the URL but It throws a exception which I can see in the servlet runner... IT Says java.io.IOException: Tried to write more than the content length..
    sun.servlet.HttpOutputStream.check(HttpOutputStream:java:282)..Dont have a 282 line...
    Can someone tell me...I know I am using deprecated method but why is it giving an exception?

    your using https which is not supported by sendRedirect as far a i know. There is a special package for ssl afaik.

  • Should I return after a response.sendRedirect?

    I have this code in the beggining of my JSP page and it seems to work okay. My question is: is it okay to use the return keyword in a JSP page or does it cause problems. Would this practice be considered safe?
    <%@page import="javax.sql.*,javax.naming.*" %>
    <%
        // Don't let the browser cache this
        response.setHeader("cache-control", "no-cache");
        response.setHeader("pragma","no-cache");
        response.setIntHeader("expires", -1);
    %>
    <%
        // Determine if this web application is properly configured
        boolean notConfigured = false;
        Context i = new InitialContext();
        DataSource ds = (DataSource) i.lookup("java:comp/env/sqlServer");
        if (ds==null) notConfigured = true;
        i.close();
        String dataBase = application.getInitParameter("database");
        if (dataBase == null) notConfigured = true;
        if (notConfigured)
          response.sendRedirect("notConfigured.jsp");
          return;
    %>

    Since the JSP gets converted into a Servlet and whatever code that you write in your JSP effectively goes into the service() method of the generated servlet, it may not be appropriate to call return. This will not give any chance for the rest of the code (may be for cleanup) that may have been inserted by the JSP -> Servlet converter (or whatever it is called) to be executed.
    However, I am not 100% sure on this. Very much interested to know more about this from somebody more knowledgeable on this.
    Jay

  • Differences between (response.sendRedirect and Requestdispatcher.forward)

    Hi All,
    I have 3 queries
    *1> I wanted to know the "Differences" between*
    response.sendRedirect and Requestdispatcher.forward
    *2> when do we Opt for response.sendRedirect?*
    *3> when do we Opt for Requestdispatcher.forward?*
    Thanks,
    Deepak AL

    The fundamental difference is that sendRedirect is a client based direction, while forward is a server based one.
    SendRedirect forces the client to make a new request. In effect you are telling the client browser "What you are looking for is over there"
    RequestDispatcher forward, is purely an internal server transition. The client knows nothing about the forward happening.
    Example
    Lets say you request the page www.myserver.com/myPage.jsp
    Example A: Redirect
    We send a redirect to www.myserver.com/thatPageOverThere.jsp
    The browser receives this message, and its address url changes to www.myserver.com/thatPageOverThere.jsp, and it sends a new request over there.
    Note that it is a completely new request, so any parameters that were sent with the old request are irrelevant. If you want to send them again you have to put them into the sendRedirect url.
    You can also send a redirect to www.myOtherServer.com/thatPageOnACompletelyDifferentServer.jsp
    Example B: Forward to thatPageOverThere.jsp
    We obtain a request dispatcher to "thatPageOverThere.jsp" and forward to that resource.
    The server instead of running myPage.jsp now executes and returns thatPageOverThere.jsp
    The client browser knows nothing of this. As far as it knows it asked for myPage.jsp, and it is getting that response back.
    So if you forward to something like "my/page/inASubFolder.jsp" you have to be very careful with relative links on the page.
    The browser requested myPage.jsp, so it will resolve relative links from that Url.
    When to use one or the other?
    Redirect would need to be used when the resource is on another server.
    Another common usage is the "Post-Redirect-Get" pattern. (you might want to look that up)
    Hope this helps you understand a little.
    cheers,
    evnafets

  • Response sendRedirect is not working in JSF

    Hi,
    I am getting an error on calling response.sendRedirect() method in my backing bean. This piece of code is for redirecting:
                if (userCredentials.isExpired() || userCredentials.isInThreshold()  ) { // Just checking for some boundary conditions
                    ViewHandler vh = ctx.getApplication().getViewHandler();
                    String viewUrl = vh.getActionURL(ctx, PATH_FOR_CHANGE_USER_PAGE);               
                    ExternalContext ectx = ctx.getExternalContext();
                    HttpServletResponse response =
                        (HttpServletResponse)ectx.getResponse();       
                    response.sendRedirect(viewUrl);   /// This is where the error is thrown.
                }Here is the stack trace:
    SEVERE: Error Rendering View[/xhtml/home/AppHomePage.xhtml]
    javax.faces.el.EvaluationException: /layout/header.xhtml @27,78 value="#{UserInformation.userName}": Error getting property 'userName' from bean of type com.mrc.web.infrastructure.login.UserInfo: java.lang.IllegalStateException: Response has already been committed, be sure not to write to the OutputStream or to trigger a commit due to any other action before calling this method.
         at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:60)
         at javax.faces.component.UIOutput.getValue(UIOutput.java:167)
         at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:102)
         at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:221)
         at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:199)
         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:740)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:304)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:321)
         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:64)
         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:142)
         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:119)
         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:78)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:224)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:693)
         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:252)
         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:594)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:262)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:219)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:173)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:644)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:226)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:127)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:116)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    *Caused by: java.lang.IllegalStateException: Response has already been committed, be sure not to write to the OutputStream or to trigger a commit due to any other action before calling this method.*
         at com.evermind.server.http.EvermindHttpServletResponse.sendRedirect(EvermindHttpServletResponse.java:1545)
         at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:170)
         at com.sun.faces.context.ExternalContextImpl.redirect(ExternalContextImpl.java:357)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.redirect(ExternalContextDecorator.java:253)
         at com.mrc.web.infrastructure.login.UserInfo.getPasswordThreshold(UserInfo.java:547)
         at com.mrc.web.infrastructure.login.UserInfo.getUserName(UserInfo.java:231)
         at sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99)
         at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
         at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
         at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
         at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
         at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
         ... 39 moreI dont think i am calling the 'sendRedirect' method anywhere before this code(if i understood the error message).
    Please help me with some pointers.
    Thanks,
    Srikanth
    Edited by: sriki79 on Jul 26, 2010 5:06 PM
    Edited by: sriki79 on Jul 26, 2010 5:06 PM
    Edited by: sriki79 on Jul 26, 2010 5:07 PM

    Yep, content has already been flushed to the browser and then the redirect cannot work anymore. Move the redirect logic to a filter I'd say.

  • Problem in response.sendredirect()

    Hi
    I am using response.sendredirect() to forword a request to an absolute URL out side my current environment.
    but it's not working....it still tries to process the request in the same environment...
    what can be the problem???

    yes i am passing the absolue URL to the Method.
    "http://blrkec30386:9080/ececWeb/BANKAWAY?Action.Admin.Init=Y&AppSignonBankId=024"
    .

  • Response.sendRedirect() doesn't work immediately

    Hello,
    I'm moving my application to JDK 1.4 and IAS 10g.
    It's alright, but I noticed one problem.
    For long operation I created my way to display a "Working..." page.
    I use response.sendRedirect() to an HTML page, with the "Working..." message, that reload itself every five seconds (due to the fact that the message will be replaced, as I explained later).
    Once the operation has terminated it change a session variable that is loaded by the HTML page and it replace the "Working..." message with a "Done!" message.
    The problem is that in IAS 10g it doesn't redirect to the HTML file immediately, it seems that "wait" the operation is almost finished: il redirect to the HTML file displaying "Working...", and after the first reload of the page (5 seconds) it display "Done!".
    This is the part of the code:
    String urlToLoad = "/myApp/tools/template/cache/tempxyz.html";
    // SESSION VALUE: "Working..."
    response.sendRedirect(urlToLoad);
    response.flushBuffer();
    // OPERATIONS
    // CHANGE SESSION VALUE WITH "Done!"
    // END OF METHODThe "response.sendRedirect(urlToLoad);" instruction is executed without any error.
    I also tried to use the absolute path with "http://name_server", but it still doesn't work.
    I hope I explained my situation.
    I already read many post in this and others forums, but I didn't found any working solution.
    Thanks in advance for any suggestions,
    EP

    You could try putting your operations into a new thread... but I don't see why that would be necessary...
    String urlToLoad = "/myApp/tools/template/cache/tempxyz.html";
    // SESSION VALUE: "Working..."
    response.sendRedirect(urlToLoad);
    response.flushBuffer();
    Thread t = new Thread( new Runnable() {
      public void run() {
        // OPERATIONS
         // CHANGE SESSION VALUE WITH "Done!"
    t.start();
    // END OF METHOD(Or put the operations in a method in another class that implements the Runnable interface, ... whatever)

  • Response.sendRedirect is not working for IE5.5

    Hi All,
    I am using response.sendRedirect method to go to different page from jsp file. It was working file before IE was upgraded to version 5.5. It is still working fine with Netscape.
    With IE, it remains on the same page even after executing response.sendRedirect method. IT ACTUALLY GOES TO ANOTHER PAGE AFTER SELECTING REFRESH. Could this be a CACHE problem. However, I tried to append the URL with some random number every time it executes response.sendRedirect method just to make it a different URL and still getting the same result.
    Any Help will be greatly appreciated.
    Thanks.

    Every time I clear the History Cache, It works for the first time and after that it remains on the same page.
    I tried to set the days to store the hist pages as 0.
    please let me know if any other browser settings OR program changes required.
    Thanks.

  • Response.sendRedirect() problem

    Hi all,
    I in facing a problem during using response.sendRedirect() or there is some mistake, please help me...
    I have written two jsp files:
    i.e. first.jsp and second.jsp
    FIRST.JSP is as follwing:
    <%@ page import="java.io.*" %>
    <%
         response.sendRedirect("http://192.168.0.4:9999/mylogo/second.jsp");
    %>
    and SECOND.JSP is as follows:
    <%@ page import="java.io.*" %>
    <%
         String coding=request.getParameter("name").trim();
    %>
         My name is <h1><%= coding %></h1>
    but when i write the follwing in address bar:
    http://localhost:9999/mylogo/first.jsp?name=jake
    an error occurs:
    NullPointerException messae is received. I am using Apache Tomcat/4.1.29.
    Please help me, and tell if ther is any thing missing in this code....
    Thankx in advance...

    When you use redirection, you are sending a header back to the browser which tells it to go somewhere else. This results in an entirely new request. Because of this, any request info from the first page will not be in the second. The advantage of redirects is you can tell the browser to go to any other server.
    If you want to maintain the same request info, you can use forward. Forward only passes control in the server to another page. The browser will have no idea that this is happening, and it cannot go to another server.

  • Is it a bug in WLS6.0 of response.sendRedirect()?

    I got a very strange problem that I found that the code like that:
              response.sendRedirect("../error/error.jsp?url=../hello.jsp&err=hello");
              runs well, but the code like that:
              response.sendRedirect("../error/error.jsp?url=../../hello.jsp&err=hello");
              doesn't work, WLS tells me page not found! Its mean WLS can't go back more than one lever directory!! It's not fun!! Can somebody help me?
              

    Where can I download my test ear file.
    Any way I am keep my source here.
    My Servet Source
    =============================================
    package com.ritesh.tempwork;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class MyServlet extends HttpServlet {
    * Initialize global variables
    public void init(ServletConfig config) throws ServletException {
         super.init(config);
    * Service the request
    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         //getAction
         request.setAttribute("result",new ActionResult());
         this.getServletContext().getRequestDispatcher("/test.jsp").forward(request, response);
    * Get Servlet information
    * @return java.lang.String
    public String getServletInfo() {
         return "com.aclcargo.servlet.ActionMultiplexer Information";
    * Insert the method's description here.
    * Creation date: (7/13/2001 5:30:57 PM)
    public void destroy()
    ====================================================
    My Action Result class
    =====================================================
    package com.ritesh.tempwork;
    i[i]Long postings are being truncated to ~1 kB at this time.

Maybe you are looking for

  • HP C4780 will not connect to wireless router

    I have the HP C4780 printer and a MacBook Pro with Mountain Lion OS X 10.8.5. I have been able to install the printer software to my computer with the USB cable, and I am able to print as long as it is hooked up with the USB cable. I want to set it u

  • Acrobat Pro 7 Suddenly Won't launch

    I'm trying to print a PDF I made last week, and Acrobat Pro 7 won't launch. I get the standard "The application Acrobat quit unexpectedly." message - no codes like some others I've seen. I'm planning to upgrade to CS4 in January, but I have to get wo

  • How do I total expenses per month

    I am using the check register template in numbers.  I added a table to calculate a running total of expenses per category per month.  I can get the table to keep a running total of expenses per category, but have not been able to add the per month va

  • Radeon HD 7690M XT and HP dv7-6c47cl

    My dv7 laptop works, for the most part, completelly fine. Granted I have sent it in for repairs multiple times....and honestly don't doubt I will need to again.  The main concern with it is this dreaded dedicated graphics card. The Radeon HD 7690M XT

  • Problem: Mac OS X Photoshop 2014, cut and paste shortcuts intermittent?

    I've been suffering this since I installed CC, and just found out my colleagues have the same problem. Cut and paste shortcuts for Photoshop are intermittent. I have two open documents (single layer JPGs I've just opened), CMD A to select all, then C