How to implement jsp:forward...

I included a <jsp:forward...> directive in my jsp page.
How do I tell that it has only to be executed when
a 'submit' button is pushed ?
Can I add it to the 'action' attribute of a form?

sudhabharathi, yes I tried but remember, I want to create a html-jsp-servlet-jsp environment following the MVC2 rules. Thus jsp with only Beans, servlet which changes the info inside the Bean and forward request to another JSP which display's the info, etc...
When I change the code as :
<FORM action="com.clipper.beans.FQController" method=post target=_parent>
the servlet loads but I cannot get the bean-data into the servlet.
The code in servlet is as follows:
try
     FreightQuotation fq = (FreightQuotation) req.getAttribute("FQ");
     System.out.println("fq object created");
     System.out.println("fq.getGoodsDescription =" + fq.getGoodsDescription());
     FreightQuotationCBean fqc = (FreightQuotationCBean) req.getAttribute("FQC");
     System.out.println("fqc object created");
     System.out.println("fqc.aAS400data.getGoodsDescription() value =" + fqc.aAS400data.getGoodsDescription());
     getServletConfig().getServletContext().
          getRequestDispatcher("../jsp/quotagentdetail.jsp").
          forward(req, res);
catch (Exception e)
     System.out.println("FQController ended abnormally");
     e.printStackTrace();
where executions stops after the message 'fq object created'. The servlets fails at statement:
System.out.println("fq.getGoodsDescription =" + fq.getGoodsDescription());and prints the "FQController ended abnormally" message.
The fq.getGoodsDescription() is a valid getter!
This leads me to the fact that the servlet doesn't receive the bean...

Similar Messages

  • How to use jsp:forward

    I would like to show my code, because i'm not sure what u mean at the moment...i want to display the error message on the registration.jsp page and not on a new page...
    registration.jsp:
    <HTML>
    <HEAD>
    <TITLE>New Player</TITLE>
    <content = "registration.html">
    <LINK REL=stylesheet TYPE="text/css" HREF="style.css">
    <SCRIPT>
    function validateText(regForm)
    if(regForm.firstName.value=="")
    return false;
    if(regForm.surname.value=="")
    return false;
    if(regForm.email.value=="")
    return false;
    if(regForm.teamName.value=="")
    return false;
    if(regForm.pass1.value=="")
    return false;
    if(regForm.pass2.value=="")
    return false;
    return true;
    function validatePass(regForm)
    if(regForm.pass1.value!==regForm.pass2.value)
    return false;
    return true;
    function validatePassw(regForm)
    var pWord = regForm.pass1.value;
    if(pWord.length > 8)
    return false;
    else if(pWord.length < 4)
    return false;
    return true;
    function validateTeamn(regForm)
    var tName = regForm.teamName.value;
    if(tName.length > 15)
    return false;
    return true;
    function validateEmail(email)
    var result = false
    var theStr = new String(email)
    var index = theStr.indexOf("@");
    if (index > 0)
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
    result = true;
    return result;
    function doSubmit(regForm)
    if(validateText(regForm)==false)
    alert("Please complete all text fields");
    return false;
    else if (!validateEmail(regForm.email.value))
    alert("Please enter email address in the form: [email protected]");
    return false;
    else if(validateTeamn(regForm)==false)
    alert("Team Name too long");
    return false;
    else if(validatePass(regForm)==false)
    alert("Passwords did not match, please retype password");
    return false;
    else if(validatePassw(regForm)==false)
    alert("Incorrect password length, please retype password");
    return false;
    //alert("Your details are being submitted");
    //return;
    </SCRIPT>
    </HEAD>
    <BODY>
    <FONT size=4>
    Please enter the following information in the space provided below:
    </FONT>
    <CENTER>
    <FORM NAME="regForm" ACTION="confirm.jsp" METHOD=POST onSubmit="return doSubmit(regForm);">
    <B><U>Personal Details:</U></B><BR>
    <FONT SIZE=2 color="blue">(Your Team Name should be no more than 15 characters long<BR>
    & Your Password should be between 4-8 characters)</FONT><BR>
    <TABLE>
    <TR>
    <TD ALIGN="right">
    First Name:
    </TD>
    <TD ALIGN="left">
    <INPUT TYPE="text" SIZE=20 NAME="firstName">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right">
    Surname:
    </TD>
    <TD ALIGN="left">
    <INPUT TYPE="text" SIZE=20 NAME="surname">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right">
    Email Address:
    </TD>
    <TD ALIGN="left">
    <INPUT TYPE="text" SIZE=20 NAME="email">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right">
    Team Name:
    </TD>
    <TD ALIGN="left">
    <INPUT TYPE="text" SIZE=20 MAXLENGTH=30 NAME="teamName">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right">
    Password:
    </TD>
    <TD ALIGN="left">
    <INPUT TYPE="password" SIZE=8 MAXLENGTH=20 NAME="pass1">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right">
    Re-enter Password:
    </TD>
    <TD ALIGN="left">
    <INPUT TYPE="password" SIZE=8 MAXLENGTH=15 NAME="pass2">
    </TD>
    </TR>
    </TABLE>
    <INPUT TYPE="submit" VALUE="Register">
    <INPUT TYPE="reset" VALUE="Clear Form">
    </FORM>
    </CENTER>
    </BODY>
    </HTML>
    confirm.jsp:
    <html>
    <head>
    <basefont face="Arial">
    </head>
    <body>
    <center>
    <%@ page language="java" import="java.sql.*" %>
    <%
    // load driver
    Class.forName("org.postgresql.Driver");
    // create connection url
    String URL = "jdbc:postgresql://dbhost/ug59sxn";
    // pass database parameters to JDBC driver
    Connection Conn = DriverManager.getConnection(URL, "ug59sxn", "hupeswop");
    boolean verify = false;
    String email;
    String email2;
    email = request.getParameter("email");
    // query statement
    Statement SQLStatement = Conn.createStatement();
    // generate query
    String Query = "SELECT email FROM usertable " +
    "WHERE email = '"+email+"'";
    // get result
    ResultSet SQLResult = SQLStatement.executeQuery(Query);
    // check for email
    while(SQLResult.next())
    email2 = SQLResult.getString(1);
    if(email.equalsIgnoreCase(email2))
    verify=true;
    out.println("email already exists, please type another one");
    if(verify==false)
    %>
    <jsp:forward page="reg2.jsp"></jsp:forward>
    <%
    // close connections
    SQLResult.close();
    SQLStatement.close();
    Conn.close();
    %>
    </center>
    </body>
    </html>
    So what u r saying..i should put into my confirm.jsp -
    %>
    <jsp:forward page="registration.jsp">
    <jsp:param name="errorMessage" value="Email already exist" />
    </jsp:forward>
    <%
    but the part where i'm abit confused, what am i supposed to put in the registration.jsp page?
    thanx for the help in advance.

    Hi,
    In confirm.jsp You can put the error message in a header with response.setAttribute(sMsg, "Please type proper values"); or you can put it in session or cookie.
    And get this information in the regestration.jsp and display it.

  • How to Implement jsp:useBean tags

    Hi,
    I hav a trouble with using the Tag jsp:useBean
    Actually im using Tomcat4.1 webserver'
    I created a java file and compiled that
    When i included that class file,The Jsp Compiler seeming me a error that the Required class in not found
    Actually wht my problem is that i cannot find out the storage locations for the corresponding files
    I know where to save the jsp
    but i need to know where to put the class file and its source.Bcz that one which i want to use in that tag{<jsp:useBean>}
    I want to know what should i do
    With Regards
    Ganesh B

    Beans are regular Java classes that follow particular conventions defined by the JavaBean's specification. The don't extend from a particular class, they aren't packaged in a particular package, and - germane to the question - they aren't located in a special place on the server. The classes which are loaded into the JSP by the <jsp:useBean> construct are located in the same location as other classes in a web application. They are located in the classes directory of the WEB-INF directory of the web application directory itself. Or, if you bundle your classes into a jar file, then the jar file will be located in the lib directory of the WEB-INF directory. In either case, remember to use packages for your classes including your beans.

  • How to implement content caching for jsp page ?

    Hello everyone,
    I am reading an article <Servlets and Jsp Best Practice>,at
    http://developer.java.sun.com/developer/technicalArticles/javaserverpages/servlets_jsp/#author, on one section it is saying :
    "Cache content: You should never dynamically regenerate content that doesn't
    change between requests. You can cache content on the client-side, proxy-
    side,or server-side. "
    Now I am working on a project. For every user, some of the content servlet generated will be the same for at least a week . I am thinking if I implement caching for these jsp pages, that would increase performace a lot.
    But I have no idea how to implement it either client-side or server-side, can someone give me a hint ?
    Thanks,
    Rachel

    You mean actually you are caching the response stream
    and the key to distinguish between different response
    streams are made of user's different request
    parameters. And the filter's function is to intercept
    the request to see if this request parameter's
    combination already exists in the Hashmap,then either
    use the cached response or forward to
    servlet.....really interesting...Do I get it right ?Yes that's it in a nutshell.
    >
    Then how do you build those response streams in
    advance ? You did it manually or have some mechanism
    to build it automatically ?
    The data gets cached the first time somebody visits the page.
    Find some examples on Filters, and take a look at the HttpServletResponseWrapper class. You need to cache response headers as well as the body. Another pitfall that you might run into is handling an If-modified-since header on the request. Don't cache the results of those requests.
    -Jonathan
    >
    Thanks again !
    Rachel

  • How to get JSP to forward a request over SSL?

    I'm new to JSP and servlets, although I've been working with Java for a long time. I'm trying to write a simple user registration and login system to teach myself JSP. I would like to set things up so that the user is able to login securely over https. I'm not sure how to do that, though. There seems to be no place in the relative URLs to indicate that you should be forwarding a request over SSL. I've got sample login page below - would anyone know how to modify it so that it happens securely?
    Also, do I need to install a certificate on my web server?
    index.jsp
    <html>
        <body>
            <h1>Index</h1>
            <a href="login.jsp">Login</a>
        </body>
    </html>login.jsp
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <body>
            <h1>Login</h1>
            <jsp:useBean id="userLogin"
                         class="com.kitfox.webrpg.UserLogin"/>
            <jsp:setProperty name="userLogin"
                             property="*"/>
            <%if (userLogin.isValid()) {%>
            <jsp:useBean id="userId"
                         class="com.kitfox.webrpg.UserIdent"
                         scope="session"/>
            <jsp:setProperty name="userId" property="*"/>
            <jsp:forward page="index.jsp"/>
            <%} else {%>
            <form action="login.jsp" method="post">
                <fieldset>
                    <legend>Enter login information</legend>
                    <label for="login">Login</label>
                    <input type="text" name="login" value="${userLogin.login}"/> <br/>
                    <label for="password">Password</label>
                    <input type="password" name="password"/> <br/>
                    <input type="submit" value="submit">
                </fieldset>
            </form>
            <%}%>
        </body>
    </html>

    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Secure Login</web-resource-name>
    <url-pattern>/login.jsp</url-pattern>
    </web-resource-collection>
    <user-data-constraint>
    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    This code is used basically for different authentication type . Forward to any jsp under any layer works with <jsp:forward> or else try with request.getRequestDispatcher(" url (can be absolute or accurate path)").forward(request,response);
    Edited by: user8483670 on Mar 13, 2011 9:46 PM

  • How to implement this function in JSP/Servlet env?

    Hi all,
    I working on a project, it provides functionality to upload file using JSP/Servlet. In the first JSP page, there is file location and submit button. After user select a file to upload and click submit button, a message, like "sending file to XXXX", will be shown on the screen. Once uploading and validation are done on the server-side, a successful/error msg will be shown to user.
    Here I have a question for the "sending..." msg and the successful/error msg. They should be put in one jsp page or in two separate page? how to implement them?
    Thanks for any help!
    Tranquil

    For the sending message... Well, the thing is, when you click submit, it's sending the file to the server and the server is processing it, and this is all done before the "complete" page is sent to the server. So one would need to use some Javascript on the page before the actual submit happens to show some message. This is done on Ebay when you put something for sale, you can upload an image, and there is a little popup message telling you that it's uploading, and it is removed when the process is done. Now, I'm not sure the exact details of how this works, but my educated guess is this:
    1) The onsubmit function of the form checks that the file upload fields have a value (no need to popup a message if no file upload, since that's what usually takes the time, although it could just be assumed there is a file). If a file is to be uploaded, or just want to show the message anyway, a new popup window is opened with the window.open method and the "sending" message is shown (either written via Javascript or just load a small web page to the window).
    2) The popup window, since you can't transfer the window object from the form page to the next page, has to check window.opener for some value that the success/error page would have to set. The success/error page could use it's body onload function to set a variable in it's own window object to denote that the page is loaded. The popup window can use a looping check using setTimeout or setInterval in Javascript to check for window.opener.isLoadedVariable to be present, and if so, close itself.
    I've never done that, but I see no reason why it wouldn't work.

  • 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

  • How to use TARGET in jsp:forward ???

    In a link I can use TARGET to display the page in another frame like this:
    <a href="http://localhost:8080/cars/Menu.jsp TARGET=FrameRight>Counties</A>
    Is it possible to do something similar when forwarding a page with the jsp:forward standard action??
    <jsp:forward page=SomePage" /">Would help me out if it was possible.</a>

    No. It is not possible, '<jsp:forward' is not meant for opening the page in a said location. It simply forwards the request to the target jsp. Then your taget JSP will take care of resonding to the request.
    If you want to open the page (jsp) in another frame, just stick on to the anchor tag and append your query string to the target jsp.
    <% String query = "?name=xxx&age=30&dept=22"; %>
    <a href="Target.jsp<%=query%> target="frameright">Counties</a>
    Sudha

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

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

  • How to implement a single sign on  feature using java.

    Hi,
    I have a question like , How to implement **single sign on** feature in java without using any third party framework or tool like LDAP or any other which is available in the market.
    Actually the situation is i have all security information into the table and those information is used for single sign on . If a user logged in from a jsp loging page all the security role should be assigned to that particular user.
    We can do this using LDAP but i am not supposed to use the LDAP or any third party tool . I have to write a java class for that .
    please suggest me the method , how to implement this in a web application.
    Edited by: Rakesh_Singh on Mar 19, 2008 11:55 AM

    you could setup a token that specifies a user is authenticated. other applications that u want SSO can check for existance of this token
    if it is HTTP - you can save the token as a cookie and downstream apps look for this token
    yr code needs to validate that the token/cookie was indeed a valid one and not subject to man-in-the middle attack.

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

  • Help!!! How to implement a special useful button in tool bar?

    How to implement a special useful button in tool bar, when the button is clicked, then a menu shows under the button, just like the Internet Explorer's back button and forward button, there is a black arrow at the two buttons right, when click the black arrow, a menu shows under the back button or forward button, how to implement this in java?
    Please help!!!
    Thanks!!!

    Like an enhanced JComboBox?
    ;o)
    V.V.

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

  • How the implementation differs between BW and BI , Is BI takes more time fo

    Hi All,
    I would like to know difference between implemenation and time lines for MM as mentioned below.
    How the implementation differs between BW and BI , Is BI takes more time for implementing MM module  than on BW?
    Thanks in advanced. (Full points will be awarded)
    With Regards,
    PCR

    Hi Timo,
    Thanks for response!
    But as i read from the following url: http://docs.oracle.com/cd/E15051_01/apirefs.1111/e10653/oracle/jbo/ViewObject.html, the setQueryTimeOut(int timeOutMills), the timeOut is mentioned in milliseconds. Please correct me if I am wrong.
    and i have overriden the executeQuery() method in the View Object Impl class as shown below:
    public void executeQuery() {
    Map sessionScope = ADFContext.getCurrent().getSessionScope();
    sessionScope.put("MyQuery", this);
    try {
    super.executeQuery();
    } finally {
    sessionScope.remove("MyQuery");
    throw new JboException("Query Taking too long to respond");
    and in the JAVA class i am calling the above method like this:
    monitor.setQueryTimeOut(6);
    monitor.executeQuery();
    But the issue is:
    1. The above exception message is getting carried forward to other pages as well. I mean somewhere in the session/ADFContext this message is being saved and error comes up/pops up when i click on other tabs of the page. How do i clear this?
    2. The above exception message is coming for the first time but when i click the 'Submit' button second time, i am getting the results and also the message that 'Query is taking too long to respond'. This should not be the case, everytime it should show the same message as the timeout limit is less and the query should end without fetching the results.
    Kindly let me know how to resolve the above issues, any pointers will be helpful.
    Thanks in advance.
    Edited by: user9223904 on Nov 3, 2012 4:42 AM

Maybe you are looking for