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

Similar Messages

  • Strange behaviour with response.sendRedirect

    I have a strange problem with response.sendRedirect
    --The following is part of a class that implements Filter (its main task is to check for authentication)
    The redirect method hresponse.sendRedirect doesnot work (so i had to make it a forward method using dispatcher)
    The second one however, works!!!! how could that be?
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
          throws ServletException, IOException
               HttpServletRequest h =(HttpServletRequest)request;
               HttpServletResponse hresponse = (HttpServletResponse)response;
               ServletContext application = config.getServletContext();
            Connection con = (Connection)application.getAttribute("connection");
               String username = (String)h.getSession().getAttribute("user");
               String credentials = (String)h.getSession().getAttribute("cred");
               PrintWriter out = response.getWriter();
               if (con != null)
                   try
                   Statement     stmt = con.createStatement(
                        ResultSet.TYPE_SCROLL_INSENSITIVE,
                         ResultSet.CONCUR_READ_ONLY);
              ResultSet rs;
                        rs = stmt.executeQuery("SELECT * FROM member WHERE username = '"+ username
                                                                                              +"' AND password ='" + credentials+ "' ");
                        if(rs.next() && rs != null)
         String path = h.getServletPath() ;
              h.getSession().setAttribute("user", username);
              h.getSession().setAttribute("cred", credentials);
              //RequestDispatcher dispatcher = config.getServletContext().getRequestDispatcher(path);
    //dispatcher.forward(request,response);
              String s = hresponse.encodeURL("http://localhost:8080/support/mtext.html");
                   //out.println(s);
                   hresponse.sendRedirect(s);
                        else
         String path = h.getRequestURI();
         String query = h.getQueryString();
    //     String query_sub = query.substring(0,equalPos);
         if (!query_sub.equals("threadID"))
              out.println("error occured");
                   else
              if(query == "null")
                   query="";
              else
                   query= "?" + query;
                   hresponse.sendRedirect(hostPath + "/support/index2.jsp?"+
                   "forward="+h.getRequestURI() + query );
                   }

    Hi,
    response.sendRedirect() may throw an IOException if URL not found.So you have to write throws or try & catch.
    Ajay.

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

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

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

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

  • In Servlet, response.sendredirect using iPlanet

    I'm from INIDIA. I have some problem in using response.sendRedirect. I'm using iPlanet application server. I tested on Java Web Server and it's working fine there but please advice me, how it'll work on iPlanet.
    Thanks

    Should work the same way. If you have an actual problem when you try it, let us know.

  • Problem in esponse.sendRedirect()

    Hi All
    I am trying to write a file download, after completion of the download, I am redirecting to some other url, using response.sendRedirect
    But it throws the fallowing error
    Servlet.service() for servlet FileDownloadZip threw exception
    java.lang.IllegalStateException
         at org.apache.coyote.tomcat5.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:379)
         at FileDownloadZip.doGet(FileDownloadZip.java:32)
         at FileDownloadZip.doPost(FileDownloadZip.java:319)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
         at java.lang.Thread.run(Thread.java:536)
    Could any one tell me how to over come this problem?
    Thank you in advance
    Anbu
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
    actionZipDownloadFile(zip_filename,filename, response);
    response.sendredirect(�abc.html�);
    private void actionZipDownloadFile(String zip_filename, String filename,HttpServletResponse response) throws IOException {
              System.out.println("I am in actionZipDownloadFile");
              System.out.println("The zip_filename=="+zip_filename);
              System.out.println("The filename=="+filename);
              File f = new File(zip_filename);
              InputStream in = null;
              try {
                   jcifs.util.MimeMap mimeMap = new MimeMap();
                   response.setContentType( mimeMap.getMimeType( "zip" ));
                   response.setHeader( "Content-Disposition", "attachment; filename=\""+filename+"\"" );
                   response.setHeader( "Content-Length", Long.toString(f.length()) );
                   response.setHeader( "Accept-Ranges", "Bytes" );
                   in = new FileInputStream( f);
                   OutputStream outStream = response.getOutputStream();
                   byte[] b2 = new byte[8192];
                   int n = 0;
                   while( (n = in.read(b2)) > 0 ) outStream.write(b2,0,n);
                   outStream.close();
              catch (Exception e) {System.out.println("The exception is"+e);}
              if (in != null) in.close();
              if (f.exists()) f.delete();
         }

    actionZipDownloadFile(zip_filename,filename, response);the response is already sent to the client.
    response.sendredirect(�abc.html�);you try to redirect a response to a new resource !!
    Suggestion:
    redirect using javascript (client side)

  • 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() from doEndTag() method

    Hi there,
    I am trying to call response.sendRedirect("url") in a custom tag doEndTag() method but for or some reason I cannot get access to the javax.servlet.http.HttpServletResponse object where this method lives. Does anyone know how I can do a response.redirect from a doEndTag() method? I've searched the forum and it appears other people can do it but I'm not sure how?
    I can get access to javax.servlet.ServletResponse object by using pageContext.getResponse() but that doesn't give me the response.sendRedirect method. Can anyone help? What am I doing wrong?
    Thanks for your help.
    Cheers,
    Brent.

    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?

  • Weblogic 6.0 (SP2) generates incorrect java code for JSP with response.sendRedirect()

              Hi,
              Here are the steps to reproduce the problem with the examplesWebApp application
              bundled with wlserver6.0(sp2):
              Product: Weblogic server 6.0 (sp2)
              Browser: IE 5.0
              1. Add index.jsp as the welcome file in WEB-INF/web.xml
              2. Create index.jsp as below:
              <%
              response.sendRedirect("index.html");
              return;
              %>
              <html>
              <head>
              <title>Index JSP file</title>
              </head>
              <body>
              <font color="red">This is index.jsp file </font>
              </body>
              </html>
              3. Create index.html as below:
              <html>
              <head>
              <title>Index HTML file</title>
              </head>
              <body>
              <font color="red">This is index.html file </font>
              </body>
              </html>
              4. Run the examples server and make sure examplesWebApp is deployed on the examples
              server using the console
              5. Access the URL http://localhost:7001/examplesWebApp
              The page will display a compilation error as below:
              C:\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\_tmp_war_examplesServer_examplesServer_examplesWebApp\jsp_servlet\_index.java:89:
              unreachable statement
              out.print("\r\n<html>\r\n<head>\r\n<title>Simple html</title>\r\n</head>\r\n<body>\r\n<font
              color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
              ^
              and a look at the generated java code for index.jsp (_index.java) will reveal
              the erroneous code snippet below in the jsp service method:
              try { // error page try block
              //[ /index.jsp; Line: 1]
              response.sendRedirect("index.html"); //[ /index.jsp; Line: 2]
              return; //[ /index.jsp; Line: 3]
              out.print("\r\n<html>\r\n<head>\r\n<title>Simple html</title>\r\n</head>\r\n<body>\r\n<font
              color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
              } catch (Exception __ee) {
              while (out != null && out != _originalOut) out = pageContext.popBody();
              pageContext.handlePageException(__ee);
              The above web application works fine in Tomcat 3.2.X environment. The Weblogic
              server 6.0 servlet engine should not generate the "out.println()" corresponding
              to the html section of index.jsp. The moment it sees the "return", it should stop
              processing further.
              Can someone from Weblogic support team please verify this and let me know when
              this bug will be fixed?
              One interesting thing I noticed was when we last tried weblogic 6.0 at its beta
              stage, it worked fine after we put in a special patch jar file called "redirectfix.jar"
              we received from weblogic team but somehow it got re-introduced by the time it
              was released!!
              We are planning to migrate our product from tomcat 3.2.x to weblogic 6.0. Our
              product has a lot of pages with such conditional {response.sendRdirect("page.jsp");return;}
              blocks. We would really appreciate a faster response form weblogic team.
              Thanks in advance.
              sam...
              Sam Palanisamy
              Senior Software Engineer
              Manage.com
              2345 N. First Street First Floor
              San Jose CA 95131
              

    Why should it stop when it sees a return? Is that in the spec?
              Peace,
              Cameron Purdy
              Tangosol Inc.
              << Tangosol Server: How Weblogic applications are customized >>
              << Download now from http://www.tangosol.com/download.jsp >>
              "Sam Palanisamy" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi,
              >
              > Here are the steps to reproduce the problem with the examplesWebApp
              application
              > bundled with wlserver6.0(sp2):
              >
              > Product: Weblogic server 6.0 (sp2)
              > Browser: IE 5.0
              >
              > 1. Add index.jsp as the welcome file in WEB-INF/web.xml
              >
              > 2. Create index.jsp as below:
              > <%
              > response.sendRedirect("index.html");
              > return;
              > %>
              > <html>
              > <head>
              > <title>Index JSP file</title>
              > </head>
              > <body>
              > <font color="red">This is index.jsp file </font>
              > </body>
              > </html>
              >
              > 3. Create index.html as below:
              > <html>
              > <head>
              > <title>Index HTML file</title>
              > </head>
              > <body>
              > <font color="red">This is index.html file </font>
              > </body>
              > </html>
              >
              > 4. Run the examples server and make sure examplesWebApp is deployed on the
              examples
              > server using the console
              >
              > 5. Access the URL http://localhost:7001/examplesWebApp
              >
              > The page will display a compilation error as below:
              >
              C:\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\_tmp_
              war_examplesServer_examplesServer_examplesWebApp\jsp_servlet\_index.java:89:
              > unreachable statement
              > out.print("\r\n<html>\r\n<head>\r\n<title>Simple
              html</title>\r\n</head>\r\n<body>\r\n<font
              > color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
              > ^
              >
              > and a look at the generated java code for index.jsp (_index.java) will
              reveal
              > the erroneous code snippet below in the jsp service method:
              >
              > try { // error page try block
              >
              > //[ /index.jsp; Line: 1]
              > response.sendRedirect("index.html"); //[ /index.jsp; Line: 2]
              > return; //[ /index.jsp; Line: 3]
              > out.print("\r\n<html>\r\n<head>\r\n<title>Simple
              html</title>\r\n</head>\r\n<body>\r\n<font
              > color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
              > } catch (Exception __ee) {
              > while (out != null && out != _originalOut) out =
              pageContext.popBody();
              > pageContext.handlePageException(__ee);
              > }
              >
              > The above web application works fine in Tomcat 3.2.X environment. The
              Weblogic
              > server 6.0 servlet engine should not generate the "out.println()"
              corresponding
              > to the html section of index.jsp. The moment it sees the "return", it
              should stop
              > processing further.
              >
              > Can someone from Weblogic support team please verify this and let me know
              when
              > this bug will be fixed?
              >
              > One interesting thing I noticed was when we last tried weblogic 6.0 at its
              beta
              > stage, it worked fine after we put in a special patch jar file called
              "redirectfix.jar"
              > we received from weblogic team but somehow it got re-introduced by the
              time it
              > was released!!
              >
              > We are planning to migrate our product from tomcat 3.2.x to weblogic 6.0.
              Our
              > product has a lot of pages with such conditional
              {response.sendRdirect("page.jsp");return;}
              > blocks. We would really appreciate a faster response form weblogic team.
              >
              > Thanks in advance.
              > sam...
              > Sam Palanisamy
              > Senior Software Engineer
              > Manage.com
              > 2345 N. First Street First Floor
              > San Jose CA 95131
              >
              >
              

  • Response.sendRedirect doesn't work with Internet Explorer

    I do posts like advised here: http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost. GET-POST-REDIRECT-GET. Now I have a problem when do redirecting to the same page in Internet Explorer. It works good with Mozilla Firefox but not with Internet Explorer. When user click to "Enable"/"Disable" link and do submit, application makes changes on the database. Changes occurs, but redirect to the page doesn't work. When I refresh page, I see that, the changes was occurred. When I use Mozilla Firefox with same JSP, there is no need to refresh page, because, redirect works. When I change redirect URL to other, for example http://www.google.com/, redirect doesn,t work in Internet Explorer too.
    Code of users.jsp JSP:
    <%@ page import="az.ub.ccs.beans.User" %>
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ page errorPage="error.jsp" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <jsp:useBean id="bc" scope="page" class="az.ub.ccs.beans.BreadCrumb" />
    <jsp:useBean id="user" scope="request" class="az.ub.ccs.beans.User"/>
    <c:if test="${sessionScope.active == null}"><c:redirect url="login.jsp" /></c:if>
    <%
       if(request.getParameter("stateAction") != null)
          int state = (request.getParameter("stateAction").equals("enable")) ? 0 : 1;
          User.changeUserState(Integer.parseInt(request.getParameter("itemID")), state);
          response.sendRedirect("users.jsp");
          //response.setStatus(HttpServletResponse.SC_SEE_OTHER);
          //response.setHeader("Location", "users.jsp");
       bc.add("Users");
    %>
    <jsp:include page="top.jsp" flush="true">
       <jsp:param name="breadCrumbString" value="${bc.breadCrumbsAsHTML}"/>
       <jsp:param name="pageTitle" value="Users"/>
    </jsp:include>
    <tr>
       <td>
          <table border="1" width="100%">
             <tr class="tableHeader">
                <td>ID</td>
                <td>&#1048;&#1084;&#1103; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1103;</td>
                <td>&#1051;&#1086;&#1075;&#1080;&#1085;</td>
                <td>&#1053;&#1086;&#1084;&#1077;&#1088; &#1075;&#1088;&#1091;&#1087;&#1087;&#1099;</td>
                <td>&#1053;&#1072;&#1079;&#1074;&#1072;&#1085;&#1080;&#1077; &#1075;&#1088;&#1091;&#1087;&#1087;&#1099;</td>
                <td>Email</td>
                <td>&#1053;&#1086;&#1084;&#1077;&#1088;</td>
                <td colspan="2">&#1044;&#1077;&#1081;&#1089;&#1090;&#1074;&#1080;&#1077;</td>
             </tr>
             <c:forEach items="${user.userList}" var="user">
             <tr>
                <td align="right">"${user.userID}"</td>
                <td><c:out value="${user.userName}"/></td>
             </c:forEach>
             <tr>
                <td colspan="7"> </td>
                <td colspan="2"><a href="addEditUser.jsp">[Add new]</a></td>
             </tr>
          </table>
          <form name="stateForm" method="post" action="users.jsp">
             <input type="hidden" name="itemID"/>
             <input type="hidden" name="stateAction"/>
          </form>
       </td>
    </tr>
    <jsp:include page="bottom.jsp" flush="true"/>

    I use HttpWatch to see request and response details. Link to the report file of HttpWatch http://tasadar8.googlepages.com/CCSHttpWatch.rar

Maybe you are looking for

  • Table in nested Iterators-Tree Level Rules for ViewInstances using same VL

    Hi All , Jdev 11.1.1.6 , ADF BC , WLS 10.3.5. I have a use case wherein I need to show a table nested at 3rd level within 2 af:iterators like - <af:iterator id="i1" value="#{bindings.Location.collectionModel}"                var="locRow" varStatus="v

  • Problems with managed beans on included JSPs

    I've got a problem with managed beans within an included JSP The included page looks as follows: <f:subview id="includedPage" binding="#{testBean.component}">      <h:outputText value="Hallo from the included page"/>      <h:outputText value="#{testB

  • Where can i download Form Builder and Query Builder Aplications for Windows2000

    So that we may better diagnose DOWNLOAD problems, please provide the following information. - Server name - Filename - Date/Time - Browser + Version - O/S + Version - Error Msg

  • Button issues

    I´m having the following problem. Created some buttons to access a MSO. There are two or three buttons that when you touch near the button it jumps to another page. When you touch exactly in the button it works perfectly, but sometimes when you touch

  • Can ipod touch be used as a phone?

    I have an Ipod touch and want to know if it can be used as a mobile phone as well?\