Jsp:forward URL problem

Hi,
I have 2 pages X.jsp and Y.jsp
The content of X.jsp is a simple
// send an email here
<jsp:forward page="Y.jsp">
</jsp:forward>
The content of Y.jsp is only "Mail is sent" message.
The problem is that everytime page X is loaded,
the browser displays Y.jsp content, but the URL in the Address box of the browser still displays X.jsp
This leads me to reload problem, even though the page displays the "Mail is sent" message, the URL still shows X.jsp, and everytime the browser is reloaded, another mail is sent.
How to make the URL change to Y.jsp ?
TIA.

Hi,
I have 2 pages X.jsp and Y.jsp
The content of X.jsp is a simple
// send an email here
<jsp:forward page="Y.jsp">
</jsp:forward>
The content of Y.jsp is only "Mail is sent" message.
The problem is that everytime page X is loaded,
the browser displays Y.jsp content, but the URL in the
Address box of the browser still displays X.jsp
This leads me to reload problem, even though the page
displays the "Mail is sent" message, the URL still
shows X.jsp, and everytime the browser is reloaded,
another mail is sent.
How to make the URL change to Y.jsp ?
TIA.Thats the natural behavious of forward.
One simple solution is not to use forward. You can use HTTP redirection rather than forward.
Hope it helps.

Similar Messages

  • Jsp parameters - url problem

    hello,
    I have a problem with the maximum length of an url.
    I have to submit a parameter (which is a list of elements) from a jsp to a servlet. But, for IE, there's a maximum length of the url and it doesn't allow a such longer parameter (for netscape, it's ok).
    I would like to have a button on my jsp which open another jsp which use the parameter of the first jsp. I have thought to use javabeans but I don't know how to keep a same javabean in several JSPs...
    Can you give me some ideas please ?

    // JSP 1
    <form name=fastaForm action=/EHTDb_interface/servlet/EXHServlet>
    <input type=hidden name=clNames value=<%=clNames%>>
    <!-- clNames is a String of 1 to several hundreds of characters long-->
    </form>
    // SERVLET (/EHTDb_interface/servlet/EXHServlet)
    String clNames = (String) request.getParameter("clNames");
    String redirect = "/result/fasta.jsp";
    Fasta f = new Fasta (clNames);
    request.setAttribute("fasta", f.getFasta());
    RequestDispatcher dispatcher;
    dispatcher=getServletConfig().getServletContext().getRequestDispatcher(redirect);
    dispatcher.forward(request, response);
    //JSP 2
    <% HashMap hmFasta =(HashMap) request.getAttribute ("fasta"); %>

  • Problem in jsp:forward

    hi,
    i have a jsp page from where i have to call my servlet.but it is mapped in xml by other name.so what should i do?can i call that servlet using named mapped into the xml.
    can i do this?
    <jsp:forward page="/servlet/web.xml mapping"></jsp:forward>
    it's urgent.
    so please help me.
    kamlesh solanki

    hey man,
    how u doin?
    your problem is quite funny. here in servlet configuration in the xml file there is what we call servlet mapping<servlet-mapping>.
    here is how we map a servlet to a kind of url:
    <servlet-mapping>
    <servlet-name>
    havet
    <servlet-name>
    <url-pattern>
    /havva.jspa
    </url-pattern>
    </servlet-mapping>
    nbow when calling this servlet using this url pattern it now behaves as if its in the main application directory just like where jsps are so u will forward to it like a jsp.
    thats the shizzy.
    ok call it like this now
    <jsp:forward page="havva.jspa" />
    or
    <jsp:forward page="havva.jspa"></jsp:forward>
    since u may be used to this style of calling the tag.
    stay cool and let me know if u had any problems.

  • Problem using jsp:forward in java script

    hi,
    when I use jsp forward tag inside java script i'm getting a problem that
    when the jsp is invoked it is getting forwarded to the page specified in the forward tag, without checking the if conditions. Following code may give you a better idea.
    <html>
    <script>
    function test()
    if(document.f.htemp.value=="true")
    alert("jus");
    else
    var s=document.f.htemp.value;
    alert(s);
    <jsp:forward page="success.jsp" />
    </script>
    <body>
    <form name="f" method=post>
    <input type=text name=htemp value="true">
    <input type=button onclick="test()">
    </form>
    </body>
    </html>
    please help me,thanks inadvance
    regards
    chandu

    What pgeuens means is that you can't mix javascript and jsp/java code in this way.
    ALL of the jsp/java code gets executed at the server end.
    This produces an HTML page (with embedded javascript) which gets sent to the client.
    The client then runs javascript code in response to events (onLoad, onClick, onChange etc etc)
    So in this case, the jsp:forward will always be executed, because as far as the server is concerned, the javascript is just template text.
    If you WANT to do a conditional forwarding on the server side you do it in java ie (horribly using scriptlet)
    <%
    if (testCondition){
    %>
      <jsp:forward>
    %<
    %>Or if you want to test what the client has entered client side, all you can do is submit the form, or navigate to a URL
    <script>
    function test()
    if(document.f.htemp.value=="true")
    alert("jus");
    else
    var s=document.f.htemp.value;
    alert(s);
    document.f1.action="success.jsp";
    document.f.submit();
    </script>You cannot run JSP code based on your javascript code.
    Java. Javascript. Not the same thing.
    Hope this helps,
    evnafets

  • How to make browser aware of new URL after JSP:forward

    When I use JSP:forward (or pageContext.forward() for that matter) to forward from a.jsp to b.jsp, the browser still seems to think he's at a.jsp. Assumably because the request for the new URL didn't originate with the browser. This causes problems when I try to use relative URL's in b.jsp (the forwarded URL) since the client kindly tries to resolve them for me using the wrong base URL.
    For example:
    I log in at <mysite>/Security/login.jsp.
    Here, I do some login magic and then forward to /Accounts/index.jsp.
    The state of the browser is now:
    a) the URL is <mysite>/Security/login.jsp
    b) the page displayed is <mysite>/Accounts/index.jsp
    Is there a better mechanism I can use to keep browser URL and displayed page synched up?
    BTW, in this simplified example I could use JavaScript history.go(-1) to let the browser do the forwarding itself. This won't work in my actual scenario because I actually forward to a page stored in the session several requests back.
    Any help would be very much appreciated!
    Andy

    Assumably because the request for the new URL didn't originate with >the browserThis is correct.
    One way for the browser to show the URL is by using a sendRedirect() after doing all the necessary processing. But you will loose all request attributes during a sendRedirect(). To overcome this, after you have done all processing and are ready to process the accounts jsp, you can put the required info in the session. The accounts jsp can get the info from the session instead of from the request, and then reset these in the session to prevent further use.

  • How do i pass a url with query string using the jsp:forward tag

    This snippet of code gives a 403 error
    <jsp:forward page="testpage.jsp?test=1" />
    How do i rectify it?

    Well better way to go about for the job is to use
    setAttribute("name","value");method in the first page
    and then in next page use method
    String s=getAttribute("name");to retreive the value.
    Url rewritting or using Query String has some disadvantages ,which are handled by above mentioned approach.
    Ashish

  • Jsp forward problem, I think.....

    I have a default.htm page that takes in a feild, EMP_NUM. Once the user
              hits the Submit button, I run a select statement(select.jsp) to see if that
              number exists. If it does then I forward the contents to correct.jsp, if the
              number doesn't exist then I forward to failed.jsp.
              Today is Tuesday, and last Friday I was working on this and everything
              worked fine, in fact perfect. I came in this morning to do some more
              testing, specifically catching errors in my try and catch, example - to make
              sure they enter in a number, and after I type in a number and hit the submit
              button, it trys to go to the next page, but displays nothing, the page is
              blank. Where has before, when everything was working fine on Friday, my
              correct.jsp page or my failed.jsp page would be displayed.
              From Friday to Tuesday I had not made any changes to my files. The only
              thing different, that I can think of, would be that on Friday I would have
              stoppped weblogic and this morning I started weblogic again. This is why I
              think this is a weblogic issue or syntax on my part. I have tried to restart
              my computer, restart weblogic, and I even deleted the .java files that
              weblogic creates and places in the weblogic/myserver/classfiles/jsp_servlets
              folder.
              Below is my source code.
              Please help!
              Thanks, jl.
              <% try {
              <%@ include file = "db_conn.jsp"%>
              <%
              // A Statement object is what sends your SQL statement to the db
              Statement stmt = conn.createStatement();
              // Retrieve the user id number from the previous form.
              int EMP_NUM = Integer.parseInt(request.getParameter("EMP_NUM"));
              //SQL prepared statement
              String selectEMP_NUM = "SELECT NAME, COMPANY_KEY FROM WTS_PROFILE WHERE
              EMP_NUM=?";
              PreparedStatement psEMP_NUM = conn.prepareStatement(selectEMP_NUM);
              psEMP_NUM.setInt(1, EMP_NUM);
              ResultSet rsEMP_NUM = psEMP_NUM.executeQuery();
              String NAME = "";
              int CompanyKey = 0;
              while (rsEMP_NUM.next()) {
              NAME = rsEMP_NUM.getString("NAME");
              CompanyKey = rsEMP_NUM.getInt("COMPANY_KEY");
              }// end of while
              psEMP_NUM.clearParameters();
              psEMP_NUM.close();
              conn.close();
              String sEMP_NUM = Integer.toString(EMP_NUM);
              String sCompanyKey = Integer.toString(CompanyKey);
              if (NAME.equals("")) {
              request.setAttribute("EMP_NUM", sEMP_NUM);%>
              <jsp:forward page="failed.jsp">
              <% }// end of if
              else {
              request.setAttribute("NAME", NAME);
              request.setAttribute("EMP_NUM", sEMP_NUM);
              request.setAttribute("CompanyKey", sCompanyKey);%>
              <jsp:forward page="creditcard.jsp">
              <% }// end of else
              }// end of try1
              catch(Exception e) {
              <% if(e.toString().equals("java.lang.NumberFormatException: ")) { %>
              <font face="Arial" size="2" color="red"><center><strong>Please enter in a
              EMPLOYEE ID NUMBER.<br><br></strong></font></CENTER>
              <%}// end of if
              %>
              </TD></TR></TABLE></DIV>
              <font color="red">"<%=e.toString()%>"</font>
              <%
              }// end of catch1
              %>
              

              Sounds like you have some debugging to do. If you didn't reinstall WLS and it worked fine before,
              then I doubt it is a WLS problem.
              Is your page really blank? Try show source in your browser? I think you have some mismatched
              <table> </table>. Try it in both IE and Netscape - one of them forgives you for mismatched table
              tags.
              Add some System.out.println() in your code to see what is being executed.
              "james lorenzen" <[email protected]> wrote:
              > I have a default.htm page that takes in a feild, EMP_NUM. Once the user
              >hits the Submit button, I run a select statement(select.jsp) to see if that
              >number exists. If it does then I forward the contents to correct.jsp, if the
              >number doesn't exist then I forward to failed.jsp.
              > Today is Tuesday, and last Friday I was working on this and everything
              >worked fine, in fact perfect. I came in this morning to do some more
              >testing, specifically catching errors in my try and catch, example - to make
              >sure they enter in a number, and after I type in a number and hit the submit
              >button, it trys to go to the next page, but displays nothing, the page is
              >blank. Where has before, when everything was working fine on Friday, my
              >correct.jsp page or my failed.jsp page would be displayed.
              > From Friday to Tuesday I had not made any changes to my files. The only
              >thing different, that I can think of, would be that on Friday I would have
              >stoppped weblogic and this morning I started weblogic again. This is why I
              >think this is a weblogic issue or syntax on my part. I have tried to restart
              >my computer, restart weblogic, and I even deleted the .java files that
              >weblogic creates and places in the weblogic/myserver/classfiles/jsp_servlets
              >folder.
              >
              >Below is my source code.
              >Please help!
              >Thanks, jl.
              >
              ><% try {
              > <%@ include file = "db_conn.jsp"%>
              ><%
              > // A Statement object is what sends your SQL statement to the db
              > Statement stmt = conn.createStatement();
              >
              > // Retrieve the user id number from the previous form.
              > int EMP_NUM = Integer.parseInt(request.getParameter("EMP_NUM"));
              >
              > //SQL prepared statement
              > String selectEMP_NUM = "SELECT NAME, COMPANY_KEY FROM WTS_PROFILE WHERE
              >EMP_NUM=?";
              > PreparedStatement psEMP_NUM = conn.prepareStatement(selectEMP_NUM);
              > psEMP_NUM.setInt(1, EMP_NUM);
              >
              > ResultSet rsEMP_NUM = psEMP_NUM.executeQuery();
              >
              > String NAME = "";
              > int CompanyKey = 0;
              > while (rsEMP_NUM.next()) {
              > NAME = rsEMP_NUM.getString("NAME");
              > CompanyKey = rsEMP_NUM.getInt("COMPANY_KEY");
              > }// end of while
              >
              > psEMP_NUM.clearParameters();
              > psEMP_NUM.close();
              > conn.close();
              >
              > String sEMP_NUM = Integer.toString(EMP_NUM);
              > String sCompanyKey = Integer.toString(CompanyKey);
              > if (NAME.equals("")) {
              > request.setAttribute("EMP_NUM", sEMP_NUM);%>
              > <jsp:forward page="failed.jsp">
              ><% }// end of if
              > else {
              > request.setAttribute("NAME", NAME);
              > request.setAttribute("EMP_NUM", sEMP_NUM);
              > request.setAttribute("CompanyKey", sCompanyKey);%>
              > <jsp:forward page="creditcard.jsp">
              ><% }// end of else
              >}// end of try1
              >catch(Exception e) {
              ><% if(e.toString().equals("java.lang.NumberFormatException: ")) { %>
              > <font face="Arial" size="2" color="red"><center><strong>Please enter in a
              >EMPLOYEE ID NUMBER.<br><br></strong></font></CENTER>
              ><%}// end of if
              >%>
              > </TD></TR></TABLE></DIV>
              > <font color="red">"<%=e.toString()%>"</font>
              ><%
              >}// end of catch1
              >%>
              >
              >
              

  • Secure Mobility Client Certificate Problem | scep-forwarding-url

    Hi All,
    I am having a problem configuring SCEP for my secure mobilty client.  I have created a connection profile to allow certificate requestes but when I fill in the scep-forwarding-url field I get an error. 
    The CA we are using is an internal MS CA with SCEP already enabled.  This has been configured for a long time with our current Cisco VPN client using certificate authentication.  The ASA is running 8.4.1.
    Here is the error I get when I try to enter the command into the group policy associated with my certificate enrollement connection profile:
    group-policy SSLGP attributes
    scep-forwarding-url value http://10.1.1.2/certsrv/mscep/mscep.dll
    Attempting to retrieve the CA/RA certificate(s) using the URL. Please wait ...
    Received 3 CA/RA certificate(s) using the SCEP URL.
    NON-RESIDENT CERT: serial: 11111111000100000145, subject: cn=SCEP_ADD_ON,o=OUNIT,c=UK
    NON-RESIDENT CERT: serial: 11111111000100000146, subject: cn=SCEP_ADD_ON,o=OUNIT,c=UK
    NON-RESIDENT CERT: serial: 11111111478AAB288393FAFf2a3E274, subject: cn=CERTSVR-01
    WARNING: Please check if you have all the required certificate(s) in the config to authenticate the certificates that will be issued using this SCEP URL
    Can someone explain why this is happening as it will not take the config?
    Thanks in advance.
    Ian

    Ian:
    I'am a roockie working on CA. I did the instalation over 2003 server and I checked and scep server is reachable in fact if I enter ther scep url I  get a message regarding the thumbprint and password. I got the same messege regarding the additional trustpoints, but in my environment I just have only one CA server. I notice by the certificate serial that I have the certificates generated on the CA numbered as 2 and 3 respectively but I have three questions.    
    1 .- I checked If the certificates could be exported as a .cer file but I just have two options as .dat or as text but I dont know how to import the text because the format looks different from the text chains we use to generate the trust points.
    2.- Because my config was not working I erased the ASA config and gave a different hostname to the ASA in fact I create an identity certificate with this name ¿Do i need to return to the original hostname?
    3.- Does the TAC gave You additional information on how to deal with CA server?

  • Jsp:forward won't forward to the correct URL

    I'm using JSP with an Apache2 + Tomcat4 + OpenSSL server. I have configured the web server to rewrite URLs for hyperlinks (eg. <a href="dest_page.jsp:SSL> ... </a>) to Fully Qualified URL for the purpose of facilitating SSL for the applicable links. Thus dest_page.jsp:SSL should transform into https://www.mysite.com/nirvana/dest_page.jsp.  This works fine for the links, but the page is also forwarded to by a controller JSP.
    The <jsp:forward> tag in my controller doesn't seem to except a FQDN. The orginial code follows:
    <%
       String op = (String) request.getParameter(operation");
    if( op.equals("buyitem") )
    if( !userObj.LoggedIn() )
    %>
    <jsp:forward page="register.jsp"
    <%
    else ....
    The desired affect is to transform the page param from "register.jsp" to "https://www.mysite.com/nirvana/register.jsp". The URL rewriting has no effect on the forward tag "register.jsp:SSL" results in "/nirvana/register.jsp:SSL" where "/nirvana" is an alias configed in the webserver that forms a relative path to the URL. Needless to say this won't work.
    If I try to use the FQDN ("https://www.mysite.com/nirvana/register.jsp") in the page param then I get "/nirvana/https://www.mysite.com/nirvana/register.jsp" which is also wrong.
    To sum it up, rewrite doesn't work for forwarding. So I tried a FQDN, but the forward tag always prepends an alias. What do I need to do?
    Thanks,
    Osensei

    jsp:forward is only relative, IE you can't forward to https://...
    page="{relativeURL | <%= expression %>}" A String or an expression representing the relative URL of the file to which you are forwarding the request. The file can be another JSP file, a servlet, or any other dynamic file that can handle a request object.
    You can try using this guys custom tag for sendRedirect:
    http://coldjava.hypermart.net/servlets/redirtag.htm
    or use response.sendRedirect(); which sends a HTTP 301 back to the browser with the new URL.

  • Filter problem with jsp:forward

    Greetings,
    I was trying to implement compression filter in oc4j. Basically wrap a HttpResponseServletResponseWrapper using a GZipOutputStream for supported browsers. However whenever for eg: I have a.jsp which does jsp:forward page =b.jsp I can see in TCP monitor IllegalStateException response already committed. But I dont see any stack trace in server logs. The buffer size is 2048 and I am pretty sure it did not get filled up before the forward. I would appreciate if anybody has seen such behavior using wrapped response in OC4j(the same code works fine in tomcat and websphere). Also one thing I observed is that for every jsp:include the filter is being called (to handle this I create the wrapper if its not already there and maintain entry count into filter and decrement when I exit filter and finish gzip response when entry count become 0,which works fine). I believe that this is not a part of 2.3 spec.Even in 2.4 spec if the filter config in web.xml is not set to any value by default the filter is supposed to be in request scope. I really appreciate any pointers in resolving this

    I am pasting the stack trace for broken pipe exception. Please let me know if anybody knows the resolution. Please let me know if there is any other way to enable compression of jsp in oc4j in 9 version. The same code works in Jboss/tomacat websphere ! Also from the stack trace we can see that filter is being called for each forward and its not as per 2.3 servlet specification. Even in 2.4 by default the filter is supposed to work at request level.
    Also I have another question oc4j seems to be using hard coded value: if length is more than 100k or so it uses Transfer-Encoding chunked. Is there any clean way of disabling this behaviour for .js files? the reason is for some reason Internet explore does not cache the javascript files properly (sporadically ) when chunked response is used for javascript files.
    4/26/06 4:58 PM: com.evermind.server.http.HttpIOException: Broken pipe
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindServletOutputStream.flush(EvermindServletOutputStream.java:286)
    4/26/06 4:58 PM: at java.io.FilterOutputStream.flush(FilterOutputStream.java:121)
    4/26/06 4:58 PM: at filters.gzip.GzipServletResponseStream.flush(GzipServletResponseStream.java:151)
    4/26/06 4:58 PM: at filters.gzip.GZipServletResponseWrapper.flushBuffer(GZipServletResponseWrapper.java:127)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:244)
    4/26/06 4:58 PM: at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
    4/26/06 4:58 PM: at SecondPage.jspService(_SecondPage.java:83)
    4/26/06 4:58 PM: at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    4/26/06 4:58 PM: at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    4/26/06 4:58 PM: at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    4/26/06 4:58 PM: at filters.CookieFilter.processRequest(CookieFilter.java:522)
    4/26/06 4:58 PM: at filters.CookieFilter.validateRequest(CookieFilter.java:127)
    4/26/06 4:58 PM: at filters.CookieFilter.doFilter(CookieFilter.java:51)
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    4/26/06 4:58 PM: at filters.gzip.GZipFilter.doFilter(GZipFilter.java:176)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:240)
    4/26/06 4:58 PM: at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
    4/26/06 4:58 PM: at FirstPage.jspService(_FirstPage.java:131)
    4/26/06 4:58 PM: at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    4/26/06 4:58 PM: at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    4/26/06 4:58 PM: at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    4/26/06 4:58 PM: at filters.CookieFilter.processRequest(CookieFilter.java:522)
    4/26/06 4:58 PM: at filters.CookieFilter.validateRequest(CookieFilter.java:127)
    4/26/06 4:58 PM: at filters.CookieFilter.doFilter(CookieFilter.java:51)
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    4/26/06 4:58 PM: at filters.gzip.GZipFilter.doFilter(GZipFilter.java:176)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    4/26/06 4:58 PM: at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    4/26/06 4:58 PM: at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    4/26/06 4:58 PM: at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    4/26/06 4:58 PM: at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    4/26/06 4:58 PM: at java.lang.Thread.run(Thread.java:479)

  • Jsp:forward problem, help appreciated

    hi all,
    The following piece of code from a jsp page is giving the following error
    "java.lang.IllegalStateException: Error: Attempt to clear a buffer that's already been flushed".
    updateToCompAccount is a button on the previous page
    <%
    if(request.getParameter("updateToCompAccount")!=null){
    %>
    <jsp:forward page="UpdateToCompAccount.jhtml" />
    <% } %>
    here is the stack trace:
    java.lang.IllegalStateException: Error: Attempt to clear a buffer that's already been flushed
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:376)
    at org.apache.jsp.adminUserProfileUpdate_jhtml._jspService(adminUserProfileUpdate_jhtml.java:474)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:409)
    at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:528)
    at java.lang.Thread.run(Thread.java:595)
    Anybody have any ideas?
    Thanks.

    Well, the simplest way to do this would be:
    public class MyClass extends HttpServlet {
      public void doGet(HttpServletRequest request, HttpServletResponse response) {
           String buttonName = request.getParameter("myButtonRequestVariable");
           if ("update".equals(buttonName)) {
               request.getRequestDispatcher("UpdateToCompAccount.jhtml").
                             forward(request, response)
             } else if ("delete".equals(buttonName)) {
                  request.getRequestDispatcher("DeleteCompAccount.jhtml").
                            forward(request, response)
             } else {
                  request.getRequestDispatcher("ErrorPage.jhtml").
                      forward(request, response)
      public void doPost(HttpServletRequest request,
    } But that can get unwieldy if you've loads of buttons. Have you studied the concept of Model View Controller (MVC)?

  • Login page not showing "Unable to generate forwarding URL. Exception:"

    Dear All,
    I have install the EBS R12 on RHEL 5.5 64bit. All run fine some days but one day after restart there is a issue on database we rectify that DB issue but after that we are not able to get the login page. ALL application/DB node process are end with exiting with status 0. we have tried adautocfg.sh with status 0.
    still getting login page as blank.
    showing msg:
    Unable to generate forwarding URL. Exception: oracle.apps.fnd.cache.CacheException
    I got on file javacache.log . i think this is showing error logs.
    /u02/oracle/PROD/inst/apps/PROD_apex/logs/appl/rgf
    $ vi javacache.log
    showing issue:
    correct one :
    [2013-02-25T15:10:48.994+05:30] [ias] [NOTIFICATION] [] [cache.Lifecycle] [host: apex] [nwaddr: 192.168.0.4] [tid: 11] [userId: applmgr] [ecid: 1361785246:192.168.0.4:6700:0:2,2] JOC is initialized. ver=10.1.3, distribute=true, vid=2, coordinator=[192.168.0.4:61230, pos=0, uid=0, pri=0, def=prop:NA], discover list=[[192.168.0.4:12345, pos=-1, uid=0, name=, pri=0]]
    log having problem:
    [2013-03-01T14:40:52.083+05:30] [ias] [ERROR] [] [cache] [host: apex] [nwaddr: 192.168.0.4] [tid: 12] [userId: applmgr] [ecid: 1362129052:192.168.0.4:3933:0:102,2] [[
    oracle.apps.jtf.base.resources.FrameworkException
    at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:234)
    at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:201)
    at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:176)
    at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:151)
    at oracle.apps.jtf.cache.GenericCacheLoader.load(GenericCacheLoader.java:87)
    at oracle.ias.cache.CacheLoader.callLoad(Unknown Source)
    at oracle.ias.cache.CacheHandle.findObject(Unknown Source)
    at oracle.ias.cache.CacheHandle.locateObject(Unknown Source)
    at oracle.ias.cache.CacheAccess.get(Unknown Source)
    at oracle.apps.jtf.cache.IASCacheProvider.get(IASCacheProvider.java:771)
    at oracle.apps.jtf.cache.CacheManager.getInternal(CacheManager.java:4802)
    at oracle.apps.jtf.cache.CacheManager.get(CacheManager.java:4624)
    at oracle.apps.fnd.cache.AppsCache.get(AppsCache.java:216)
    at oracle.apps.fnd.functionSecurity.User.getUser(User.java:338)
    at oracle.apps.fnd.functionSecurity.FunctionSecurity.getUser(FunctionSecurity.java:527)
    at oracle.apps.fnd.functionSecurity.FunctionSecurity.init(FunctionSecurity.java:1620)
    at oracle.apps.fnd.functionSecurity.FunctionSecurity.<init>(FunctionSecurity.java:188)
    at oracle.apps.fnd.functionSecurity.RunFunction.init(RunFunction.java:309)
    at RF.jspService(_RF.java:205)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: oracle.apps.jtf.base.resources.FrameworkException: ORA-01410: invalid ROWID
    at oracle.apps.jtf.base.resources.FrameworkException.convertException(FrameworkException.java:607)
    at oracle.apps.jtf.base.resources.FrameworkException.addException(FrameworkException.java:585)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:66)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:88)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:202)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:218)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:249)
    ... 37 more
    Pls help in this case. I am novice in EBS.
    Thanks

    Hi Yoonas,
    while login page shwoing error "Unable to generate forwarding URL. Exception: oracle.apps.fnd.cache.CacheException "
    alert logs are fin no issue from db end all rectified. pls find the application.log.
    13/02/28 18:11:58.536 html: 10.1.3.4.0 Stopped
    13/03/01 10:54:24.412 10.1.3.4.0 Started
    13/03/01 10:54:34.841 html: 10.1.3.4.0 Started
    13/03/01 12:08:50.767 html: oracle.apps.fnd.security.LeakDetectionFilter.initialized:1362119930766
    13/03/01 12:08:50.767 html: LeakSetting:
    global:true,session:false,aggressive:false,stderr:false,appslog:false,corelog:false
    ignoring:null
    13/03/01 12:08:51.980 html: Servlet error
    java.lang.ExceptionInInitializerError
    at oracle.apps.fnd.sso.AppsLoginRedirect.doGet(AppsLoginRedirect.java:613)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.4.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    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[Oracle Containers for J2EE 10g (10.1.3.4.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: oracle.apps.fnd.cache.CacheException
    at oracle.apps.fnd.cache.AppsCache.get(AppsCache.java:228)
    at oracle.apps.fnd.functionSecurity.User.getUser(User.java:338)
    at oracle.apps.fnd.functionSecurity.FunctionSecurity.getUser(FunctionSecurity.java:527)
    at oracle.apps.fnd.functionSecurity.FunctionSecurity.init(FunctionSecurity.java:1620)
    at oracle.apps.fnd.functionSecurity.FunctionSecurity.<init>(FunctionSecurity.java:188)
    at oracle.apps.fnd.sso.SSOUtil.getLocalPwdChangeUrl(SSOUtil.java:735)
    at oracle.apps.fnd.sso.SSOUtil.getLocalPwdChangeUrl(SSOUtil.java:791)
    at oracle.apps.fnd.sso.SSOManager.<clinit>(SSOManager.java:2191)
    ... 19 more
    Caused by: oracle.apps.jtf.base.resources.FrameworkException: Failure in CacheLoader: oracle.apps.jtf.base.resources.FrameworkException
    at oracle.apps.jtf.cache.IASCacheProvider.get(IASCacheProvider.java:830)
    at oracle.apps.jtf.cache.CacheManager.getInternal(CacheManager.java:4802)
    at oracle.apps.jtf.cache.CacheManager.get(CacheManager.java:4624)
    at oracle.apps.fnd.cache.AppsCache.get(AppsCache.java:216)
    ... 26 more
    Caused by: oracle.apps.jtf.base.resources.FrameworkException
    at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:234)
    at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:201)
    at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:176)
    at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:151)
    at oracle.apps.jtf.cache.GenericCacheLoader.load(GenericCacheLoader.java:87)
    at oracle.ias.cache.CacheLoader.callLoad(Unknown Source)
    at oracle.ias.cache.CacheHandle.findObject(Unknown Source)
    at oracle.ias.cache.CacheHandle.locateObject(Unknown Source)
    at oracle.ias.cache.CacheAccess.get(Unknown Source)
    at oracle.apps.jtf.cache.IASCacheProvider.get(IASCacheProvider.java:771)
    ... 29 more
    Caused by: oracle.apps.jtf.base.resources.FrameworkException: ORA-01410: invalid ROWID
    at oracle.apps.jtf.base.resources.FrameworkException.convertException(FrameworkException.java:607)
    at oracle.apps.jtf.base.resources.FrameworkException.addException(FrameworkException.java:585)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:66)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:88)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:202)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:218)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:249)
    ... 39 more
    13/03/01 16:02:42.161 html: 10.1.3.4.0 Stopped
    13/03/01 17:06:37.969 10.1.3.4.0 Started
    13/03/01 17:06:47.473 html: 10.1.3.4.0 Started
    13/03/01 18:00:40.903 html: 10.1.3.4.0 Stopped
    13/03/01 18:12:07.664 10.1.3.4.0 Started
    13/03/01 18:12:25.248 html: 10.1.3.4.0 Started
    13/03/01 18:34:41.921 html: oracle.apps.fnd.security.LeakDetectionFilter.initialized:1362143081921
    13/03/01 18:34:42.155 html: LeakSetting:
    global:true,session:false,aggressive:false,stderr:false,appslog:false,corelog:false
    ignoring:null
    13/03/01 18:57:48.659 html: 10.1.3.4.0 Stopped
    13/03/04 11:40:01.741 10.1.3.4.0 Started
    13/03/04 11:40:23.176 html: 10.1.3.4.0 Started
    13/03/04 12:09:47.660 html: oracle.apps.fnd.security.LeakDetectionFilter.initialized:1362379187660
    13/03/04 12:09:47.824 html: LeakSetting:
    global:true,session:false,aggressive:false,stderr:false,appslog:false,corelog:false
    ignoring:null

  • Jsp:forward explained ?

    Here the dir structure of my authentification module :
    /admins/login.jsp
    /admins/centralAdmin.jsp (lists all Admins)
    /admins/players/ADMPlayers.jsp
    /admins/news/ADMNews.jsp
    /templates/mystyle.css
    In my site authentification, I need to redirect people to login.jsp if they access the admin urls directly without passing by the login page.
    I have tried something like bellow in these pages
    centralAdmin.jsp:
    <% if (session.session.getAttribute("LOGGED") == null){%>
    <jsp:forward page="/admins/login.jsp"/>
    <%}
    %>
    <link rel="stylesheet" type="text/css" href="../templates/mystyle.css">
    OK
    For page like /admins/players/ADMPlayers.jsp, it redirects me to login.jsp but the css in the login file (like the above) can't be reached. It will if I use
    <link rel="stylesheet" type="text/css" href="../../templates/mystyle.css">
    instead ????
    The main goal is to put the test login file in a include file.
    I have tried to set the path to /templates/mystyle.css in the link but it doesn't work.
    Anyone can help ?

    The problem is that your web browser thinks you are at (for instance) "/admins/players/ADMPlayers.jsp", but your CSS is located in "/templates/mystyle.css". So, "../templates/mystyle.css" being called from "/admins/players/ADMPlayers.jsp" will look for "/admins/templates/mystyle.css" which does not exist. That is the reason why using "../../templates/mystyle.css" does work. What is it that you are trying to do exactly? just be able to reference the CSS? Have you tried putting in the WHOLE URL instead of just the relative URL?

  • "&" character not being sent in parameter value string with jsp:forward

    String _url =
              "controller.jsp?_page="+nextPage+"&amp_count="+sessionManager.getCounter();
              <jsp:forward page="<%= (String) pageMap.get(nextPage) %>">
              <jsp:param name="_url" value="<%= _url %>"/>
              </jsp:forward>
              Receiving page:
              <% String url = request.getParameter("url");
              application.log("\n\t[skybook:home]_url = " + _url);
              %>
              Log:
              [skybook:home]_url = controller.jsp?_page=home
              If I remove the "&" from _url, then the rest of the string will appear.
              Anyone ever seen this?
              Thanks!
              

    I'm having a similar problem where I cannot even get the params to show up in the forwarded page.
              

  • jsp:forward ... tag in servlet doesn't work in 7.0

              I have a problem with <jsp:forward ... > command.
              I found a post in the newsgroups that this is a bug traced by
              CR078071 and I am stucked because of this problem. Please, send me a patch.
              

              I have a problem with <jsp:forward ... > command.
              I found a post in the newsgroups that this is a bug traced by
              CR078071 and I am stucked because of this problem. Please, send me a patch.
              

Maybe you are looking for

  • TERMS OF PAYMENT AND CREDIT CONTROL AREA

    WHERE AND HOW EXACTLY TERMS OF PAYMENT AND CREDIT CONTROL AREA MAINTAINED IN CUSTOMER MASTER RECORD WILL REFLECT WITH EACH OTHER?  AND HOW DOES CREDIT CONTROL AREA CONTROLS THE TERMS OF PAYMENT OF CUSTOMER MASTER RECORD?

  • Aperture, Mavericks, three monitors

    Anyone? I have a (late '13) 15" rMBP, and two external monitors.  I would like to do two things, neither of which I know how: 1.  Use the keyboard and touchpad of the laptop, but turn the laptop screen off and use only the two external monitors in a

  • Best way to rome?

    Hi, I'm trying to display a detail page on a single record showing 99% of the columns as read-only and only 2 columns editable for the use. I'm running in to problems which I would like some thought on the best way to resolve them. My first thought w

  • Drill Across fields mapping with calculate field

    I create a calculation field in one view, then when config drill across, i set the calculation field to mapping to a Parameter of target view Save report Then, i open the report in view mode, click the view which config drill across, it get JavaScrip

  • Duplicate database from Linux to sun

    Hi All, RMAN duplicate database from Linux 5.2 (Tikanga) to sun 5.9 is possible, please share link or doc.