SendRedirect( )

Hi ,
I am using sendRedirect( ) method in jsp . ( redirecting to a servlet to generat an image) .
It works on most of the places , I tested. On some machine it's not working tough the browser
version is same (IE 5.00) , but it works in Netscape on same machine I am not able to solve/identify the problem , any help is appreciated .
Thanks
Kamlesh

Can we see the code that's not working?

Similar Messages

  • SendRedirect - can not find server

    Hi,
    I have a jsp page with a form.
    This form's action is another jsp.
    This jsp checks some values in the request
    and redirects the call to a servlet.
    I am using response.sendRedirect.
    The application works well if the webserver is running in port 80.
    IF i try to run the applicaiton in some other port other than 80,
    i am geting "Page can not be displayed" error.
    Any idea of what the problem might be?
    Thanks for the help!!!

    hi,
    thanks for the reply.
    I did that too.
    Still same problem.
    This is what i am doing in the jsp
         int port = request.getServerPort();
         StringBuffer url = new StringBuffer(request.getScheme());
         url.append("://").append(request.getServerName());
         if (port != 80) {
              url.append(":").append(port);
         url.append(request.getContextPath()).append("/");
    url.append("my servlet path");

  • HttpServletResponse.sendRedirect bug in Release 2

    I think I've come across a bug with the HttpServletResponse.sendRedirect() method and OC4J in 9iAS R2.
    I've constructed the following statement:
    response.sendRedirect("http://www.myurl.com/index.jsp?src1=http://www.abc.com&src2=http://www.somewhere.com
    What happens when the servlet containing this method is invoked is the redirect attempts to connect to:
    http://www.myurl.com/index.jsp?src1=http:/www.abc.com&src2=http:/www.somewhere.com
    The double forward slashes in the query string portion of the request URL are replaced with a single slash!
    I've tested this on different R1 and 10g OC4J versions and it works perfectly. The bug only arises in R2. Unfortunately for me, I have to get this working in an R2 environment.
    Has anyone come across this problem before, and worked around it?
    Thanks very much in advance.
    Lawrence

    Vikas,
    all clear but that v('P102_ID') call is bothering me!
    And other thing....I was debugging in first function (with number parameter)...and if API is making VARCHAR2 value, then in no circumstances first function (with number) cannot be called but only second one (with two VARCHAR2)...which was not called !!!!
    To make more clear, create two function (in this order in package):
    FUNCTION update_password (
                p_id       IN HTMLDB_USERS.ID%TYPE
               ,p_password IN HTMLDB_USERS.PASSWORD%TYPE
              ) RETURN PLS_INTEGER;
    BEGIN
      dbms_output.put_line(v('P102_ID'));
      dbms_output.put_line('Number called function "'||to_char(p_id)|'"');
      return null;
    END;
    FUNCTION update_password (
                p_username       IN HTMLDB_USERS.USERNAME%TYPE
               ,p_password IN HTMLDB_USERS.PASSWORD%TYPE
              ) RETURN PLS_INTEGER;
    BEGIN
      dbms_output.put_line(v('P102_ID'));
      dbms_output.put_line('VARCHAR2 called function "'||p_username||'"');
      return null;
    END;and make a call like in my case.
    This is most interesting of all! Intersting which function will be called!
    Maybe this note helps someone to be mislead...
    Message was edited by:
    Funky

  • Difference between sendRedirect and RequestDispatcher?

    Difference between sendRedirect and RequestDispatcher?

    I have a situation of needing to redirect a request to a URL that is outside of the container. The scenario is the following, we have a simple logging in servlet that takes some POST parameters (username, password, and other values.) Depending on the username and password, the logon request along with all its POST parameters need to be redirected integrally to another machine. How do i do a redirect with all my parameters intact? sendRedirect does not seem to have any (visible to me) mechanism to do this. We cannot send them on the URL as this will reveal things too easily to our users and we don't want them to bookmark the resulting page.
    Thanks for any help,
    t

  • SendRedirect is not working properly in WebSphere 6.0.2.21

    hi: I am using WebShpere 6.0.2.21 as my application server. (using JVM 1.4)
    One of my servlet call response.sendRedirect("/SecondPage");
    Given that my Host is www.test.com and context root is "test".
    I expect that it will call page with http://www.test.com/test/SecondPage.
    It is redirect to the page http://www.test.com/SecondPage
    Does anyone know how to fix this? Appreciate.
    Wayne

    From the JavaDocs (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html#sendRedirect(java.lang.String)) : This method can accept relative URLs; the servlet container must convert the relative URL to an absolute URL before sending the response to the client. If the location is relative without a leading '/' the container interprets it as relative to the current request URI. If the location is relative with a leading '/' the container interprets it as relative to the servlet container root.
    So you should change it to response.sendRedirect("SecondPage") if your current request is at http://test.com/test/something

  • 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.

  • How to use sendRedirect jsp page to client in the backed bean

    Hi,
    i'm unable to sendRedirect the page in baking bean method it is throwing error as
    javax.servlet.ServletException: Cannot forward after response has been committed
    <h:selectOneMenu value="#{surveyList.actionValue}" onchange="submit();" valueChangeListener="#{authorHomeBean.onChangeActionType}">
                                                           <f:selectItems value="#{surveyList.actionValueListItems}" />
                                                      </h:selectOneMenu>
    public void onChangeActionType(ValueChangeEvent event)
              if(((String)event.getNewValue()).split("~")[0].equals("Edit Survey"))
                   System.out.println("inside the Edit Survey 1");
                   try
                        FacesContext context = FacesContext.getCurrentInstance();
                        HttpServletResponse res =(HttpServletResponse)context.getExternalContext().getResponse();
                        res.sendRedirect("/feedback/author/surveyinfo/surveyinfo.jsf");
                        catch(Exception e)
                        e.printStackTrace();
    it is giving error as
    javax.servlet.ServletException: Cannot forward after response has been committed
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
         org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
         org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
         org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    root cause

    else if(((String)event.getNewValue()).split("~")[0].equals("Copy"))
                   try
                        res.sendRedirect("/feedback/author/surveyinfo/copysurvey.jsf");
                        context.responseComplete();          
                   catch(Exception e)
                        e.printStackTrace();
    it is giving error like this, when i use session scope for one of the bean in my faces config..so i'm unable to sendRedirect the page..
    OpenSessionInViewFilter.getSession() invoked...
    OpenSessionInViewFilter.closeSession() invoked...
    OpenSessionInViewFilter.getSession() invoked...
    inside the Edit Survey 1
    java.lang.NullPointerException
         at org.apache.coyote.tomcat5.CoyoteResponse.toAbsolute(CoyoteResponse.java:1450)
         at org.apache.coyote.tomcat5.CoyoteResponse.sendRedirect(CoyoteResponse.java:1213)
         at org.apache.coyote.tomcat5.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:357)
         at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:125)
         at stanford.gsb.app.feedback.view.bean.author.AuthorHomeBean.onChangeActionType(AuthorHomeBean.java:530)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
         at javax.faces.component.UIInput.broadcast(UIInput.java:200)
         at javax.faces.component.UIData.broadcast(UIData.java:338)
         at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
         at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:143)
         at org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:240)
         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    OpenSessionInViewFilter.closeSession() invoked...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with sendRedirect using relative URL in WebLogic 5.1 with SP7 & 8

    I patched to SP 7 (and also 8), and the request.sendRedirect() with relative
              URL failed. The browser simply displayed "404 - Page not found".
              This problem only happens in a cluster environment attached to a web server.
              SP6 or earlier does not have such problem.
              I noticed that the latest SP always formats the URL and returns it as a full
              absolute URL to the browser. The problem is it uses the Weblogic Server host
              URL where the request is processed (not the Web Server host URL) which is
              not visible to the internet.
              Is it possibly a bug in SP?
              

    I patched to SP 7 (and also 8), and the request.sendRedirect() with relative
              URL failed. The browser simply displayed "404 - Page not found".
              This problem only happens in a cluster environment attached to a web server.
              SP6 or earlier does not have such problem.
              I noticed that the latest SP always formats the URL and returns it as a full
              absolute URL to the browser. The problem is it uses the Weblogic Server host
              URL where the request is processed (not the Web Server host URL) which is
              not visible to the internet.
              Is it possibly a bug in SP?
              

  • SendRedirect in custom tag

              Hi,
              I have a custom tag that invokes sendRedirect() in the doAfterBody(). I'm curious
              as to why the redirection output is not complete. Here's what I always got:
              start of output ---------------------------------
              HTTP/1.1 302 Moved Temporarily
              Location: http://xenon:7001/ctl/error?WebLogicSession=OtCL5lprXh5wN0S5JJF4GFsDfU
              BKZk40AQ8mluIVsHKw2TcG5xpz|6804183543513756739/167846717/6/7001/7001/7002/7002/7
              001/-1
              Server: WebLogic 5.1.0 Service Pack 8 12/20/2000 16:34:54 #95137
              Content-Length: 481
              Content-Type: text/html
              Set-Cookie: WebLogicSession=OtCL5lprXh5wN0S5JJF4GFsDfUBKZk40AQ8mluIVsHKw2TcG5xpz
              |6804183543513756739/167846717/6/7001/7001/7002/7002/7001/-1; path=/
              Connection: Close
              <html><head><title>302 Moved Temporarily</title></head>
              <body bgcolor="#FFFFFF">
              <p>This document you reque
              -- end of output-------------
              As you can see, the Content Length is huge compared to the incomplete returned
              document.
              Can anyone help please?
              Thanks,
              Iwan
              

    you can pass the response object as argument to your
    method..Thanks for your response!
    Unfortunately I can't change the doEndTag() method parameters as doEndTag() is defined in the Tag interface. But if you mean pass the response object as an attribute of the tag i suppse that is possible.
    However, that's pretty close to the hack I currently have to work around this problem except I'm putting the response object in a request attribute in the page and then retrieving it in the doEndTag() method.
    But I am after something a little cleaner than either of these options..... I'm hoping I can just get the response object from another object I have access to. Any more thoughts?

  • Basic authentication with sendRedirect doesn't work

    Hello from the school of hard knocks:
    Following is my web.xml file. It doesn't ask for a username/password but instead gives a "Page not found 404" error. Behind the scenes the unauthorized page is being accessed via sendRedirect(). If I take out the unauthorized page URL in the web.xml and use in-page authentication (see code below), then the browser prompts 3 times and gives the access anyway!!! This is absolutely ridiculous for Tomcat 4.1.29. Can anyone help me out?
    <code to force authentication in page gleaned from a thread in this form >
    response.setStatus(response.SC_UNAUTHORIZED);
    response.setHeader("WWW-Authenticate", "BASIC realm=\"tomcat\"");
    <web.xml as prescribed by Martin Bond and Debbie Law in Tomcat - KickStart -- should have been kick in the ass >
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>CewolfServlet</servlet-name>
    <servlet-class>de.laures.cewolf.CewolfRenderer</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>CewolfServlet</servlet-name>
    <url-pattern>/cewolf/*</url-pattern>
    </servlet-mapping>
    <error-page>
    <error-code>401</error-code>
    <location>/trnkxref/*</location>
    </error-page>
    <security-constraint>
    <display-name> Web App Access Control - Administrators </display-name>
    <web-resource-collection>
    <web-resource-name> Administration </web-resource-name>
    <url-pattern>/trnkxref/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name> administrator </role-name>
    <role-name> patron </role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee> NONE </transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    <login-config>
    <auth-method> BASIC </auth-method>
    <realm-name>tomcat </realm-name>
    </login-config>
    </web-app>

    Found this in the logs. What does it mean? tomcat-users.xml appended below. Has anyone been reading this lameass thread?
    WARNING: Security role name patron used in
    an <auth-constraint> without being defined in a <security-role>
    tomcat-users.xml:
    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
    <role rolename="patron"/>
    <role rolename="administrator"/>
    <role rolename="manager"/>
    <user username="ldp" password="hello" roles="administrator,patron"/>
    </tomcat-users>
    ~

  • 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

    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 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 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.

  • Problem with SP6 + IE + sendRedirect

    Hello,
              We've had this problem with the sendRedirect method. Under IE (all versions
              we tested), a sendRedirect would take a considerable amount of time to
              actually perform the redirection; in fact the time it took was approximately
              equal to the KeepAliveTimeout setting within the httpd.conf file of our
              front end Apache webservers (Redhat 6.2 btw). We have two Apache servers in
              front of a cluster of two Weblogic 5.1 servers (SP6).
              Now the interesting thing is when we "downgraded" the mod_wl.so file back to
              the SP5 version, the problem disappeared. Obviously i'm not happy with
              running the SP5 version of the apache/weblogic bridge due to the various
              documented issues, so am wondering if a) anyone has seen this themselves,
              (b) got it working correctly under SP6, or c) when the hell is SP7 coming
              out. ;)
              thanks
              Carl
              

              Yes, I'm having this problem too with IE, i.e. taking some amount of time until
              redirection happens. But with Netscape, the redirect is fast, i.e. normal.
              I'm using Weblogic server 5.1 with SP9 (I tested with SP8 with the same result),
              Apache 1.3.12, Redhat 6.2, IE 5.0.
              When I captured the HTTP response from the server, the content-length header showed
              533. Actually the body of the response is nothing, just a line, I think. So I
              guess IE tried to receive all 533 bytes of content until the Keep alive timed
              out, after which it followed the redirection.
              I think this is a bug in Weblogic, it shouldn't spit out 533 bytes with no content.
              Iwan
              "Joe Bella" <[email protected]> wrote:
              >
              >How can we make this work if we are using just servlets? To get around
              >the problem, I have resorted to the cheesy solution of spitting out
              >javascript redirect code. This obviously is a sub-optimal solution.
              >
              >Any other ideas for workarounds until sp7 comes out?
              >
              >thanks
              >
              >joe
              >
              >"Mike Reiche" <[email protected]> wrote:
              >>
              >>I've seen this as well. We fixed it by using a jsp:forward instead of
              >the sendRedirect.
              >>
              >>Mike Reiche
              >>
              >>"Carl Ansley" <[email protected]> wrote:
              >>>Hello,
              >>>
              >>>We've had this problem with the sendRedirect method. Under IE (all
              >versions
              >>>we tested), a sendRedirect would take a considerable amount of time
              >to
              >>>actually perform the redirection; in fact the time it took was approximately
              >>>equal to the KeepAliveTimeout setting within the httpd.conf file of
              >our
              >>>front end Apache webservers (Redhat 6.2 btw). We have two Apache servers
              >in
              >>>front of a cluster of two Weblogic 5.1 servers (SP6).
              >>>
              >>>Now the interesting thing is when we "downgraded" the mod_wl.so file
              >back to
              >>>the SP5 version, the problem disappeared. Obviously i'm not happy
              >with
              >>>running the SP5 version of the apache/weblogic bridge due to the various
              >>>documented issues, so am wondering if a) anyone has seen this themselves,
              >>>(b) got it working correctly under SP6, or c) when the hell is SP7
              >coming
              >>>out. ;)
              >>>
              >>>thanks
              >>>Carl
              >>>
              >>>
              >>
              >
              

  • 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.

Maybe you are looking for

  • Issue in SAP-query

    hi all, i have transported the infoset , user group and query in the production server from the test server through the download/upload feature of report RSAQR3TR all of the above infoset , query , user grp are transported properly. but when i am exe

  • PDF Printing using BI Publisher

    Hello, I'm using APEX 4.2 and trying to export some classic reports to PDF. I followed these directions to install BI Publisher: http://www.oracle.com/technetwork/developer-tools/apex/application-express/configure-printing-093060.html Entered these v

  • GL ACCOUNT BLOCKED

    Hi gurus,         When i give the posting the GRN ,The following error appear G/L ACCOUNT BLOCKED FOR POSTING IN COMPANY CODE. Pls help me Regards, T.Murugu

  • Content Copier Freezing

    I've backed up my phone previously but today when I tried to use content copier to back it up the program just kept freezing on the section saying phone model-specific backup and wouldn't go past 66%. Any ideas apart from re-installing PC Suite?

  • DuplicateKeyException is not thrown

    I have WL7, SP1. Trying to create a duplicate entry into the db using an entity bean.Instead of throwing a DuplicateKeyException, it always throw EJBException. Is it a bug?