JSP Processes

I have a JSP that contains links to other JSP pages. In my testing, when I click on one link, then click on another before the previous process can finish, my session variables are getting confused and incorrect data is being displayed. Is there a way in JSP to ensure the user cannot click on a link until the previous process is finished?
Thanks in advance.

you can try putting an invisible GIF file covering the whole page in a DIV at a high z-index to block input.

Similar Messages

  • Modify jsp content (before the jsp processing!)

    Hi!
    I would like to modify the jsp content before jsp processing (like at tags, but there the outgoing HTML content is modified not the clear jsp)
    So this is what is want: for example i would like to introduce a tag and this tag will modify the jsp content (it will put some jsp lines) and after the whole jsp will be processed and we get a HTML what is displayed in the client.
    for example this is the JSP:
    <html>
        <body>
            <mytags:grid data="apple,lemon" />
        </body>
    </html>it will change to this (for example):
    <html>
        <body>
            <% String data = "apple,lemon"; %>
            <jsf:grid data="<%=data%>" />
        </body>
    </html>the container will process this and generates a HTML page.
    So is there any chance to do this?
    Thanks!
    ric flair

    Here is an example:
    If you put the following in the JSP page, the JSP page will outtput one of the two html tags specified.
    Note this example uses java scriptlets (the html is sent to the client, not the scriplets).A better approach is to use JSTL.
    A book on JSP will better explain the use of JSP.
    <% if ( item.length()>0 ){%>
    <input type="text" name="firstName">
    <%}else{%>
    <input type="text" name="firstName">
    <%}%>

  • OAS html vs jsp processing

    Is it possible to configure OAS to process only html and not JSP temporarily or some similar setting?

    i guess i can just comment out LoadModule oc4j_module modules/mod_oc4j.so in mod_oc4j.conf right?
    Currently this is what I have there
    # Oracle iAS mod_oc4j configuration file: mod_oc4j.conf #
    LoadModule onsint_module modules/mod_onsint.so
    LoadModule oc4j_module modules/mod_oc4j.so
    <IfModule mod_oc4j.c>
    </IfModule>

  • Convert jsp processed result into a file??

    when a JSP file has been processed, it returns HTML codes to browser, so how can i get that pure HTML source code and save it in an other html files.

    If you have a good idea, open your JSP file and (in Sun ONE anyways) you can right click and do "Show JSP Code in Servlet" since a JSP is just translated into a servlet anyways (you could alos find the <Your JSP>.java file in your web server's working directory.
    Anyways you will see a lot of out.println() statements where out is the response writer. So your options are:
    1. Create a FileWriter fwOut and copy all the out.println() statements and paste them as fwOut.println()'s.
    2. Create a class (or find one) that mimics the tee functionality in the UX world ie the class myTee opens the respose writer and the FileWriter, then some method (like myTeePrintln()) would take the input as a string and write it to both the response and FileWriter (and flush the streams).
    3. http://nitric.com/jnp/source/jnp-src/Tee.java
    If helps, I'm hungry for Dukies!
    --Thunder                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Jsp processing on the palm device

    Is there a way to process jsp pages on the palm device? how is that?

    The palm can be used as a client using a web browser application to connect to a web server that uses JSP, if that's what you mean.
    I don't think that you could run a JSP/servlet web server on a palm though. Those systems are not meant for running servers, and likely there are some missing pieces of the JDK on the system if they are using J2ME, which would make it not capable of running at all.

  • Help with callback from script src= with jsp processing

    I am trying to understand several different ways to get dynamic content into a system I am building. These include:
    1. <script tags to fetch text from a jsp page
    2. <img to fetch images from a jsp page
    3. AJAX to fetch text from a jsp page.
    (In all cases, the jsp pages will eventually get the data from a MySql database, but right now I am using static code.)
    I am having a problem understanding how to use the <script option.
    I am starting with an html page with a javascript callback function and a <script with the callback passed as a parameter. The callback function is based on a sample that I found that works, but I don't have the code for the called jsp page.
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
      <title>Test javascript WebServiceCalls...</title>
      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <script type="text/javaScript">
      function ws_results1(obj)
           alert("in ws_results1");
           var myobj = obj.ResultSet.totalResultsAvailable;
           alert("The result is "+myobj);
           this.document.getElementById("showTest1").innerHTML =  "The result is "+myobj;
    </script>
    </head>
    <body >
    <h2 > #1 <SCRIPT tag with immediate loading..... </h2>
    WebServiceCalls #1: Use <script src="---.jsp?---&callback=---"> <br>
    -----------------------------------------------<br>
    Returned code gets inserted in calling page by callback function.  <br>
    NOTE: <br>
    1. Page will delay loading until response is received. <br>
    2. Target for callback function must preceed the %lt;script tag as it must be loaded first or it will not yet exist when the callback function executes.<br>
    <br>
    The following should be dynamically changed: <br>
    <div id="showTest1">Please wait..</div>
    The above line "Please wait.." should be replaced: <br>
    <script type="text/javascript" src="TestWS1.jsp?callback=ws_results1"></script>
    <br>
    <br>
    Rest of page loaded after return...
    </body>
    </html>The jsp page is below. I am pretty sure that I am missing something here...
    <%
       // TestWS1.jsp:  return a simple string.....
       //    (Other versions will return JSON structures or images)
    // For page imports, wrap each line within a pair to avoid blanks and linefeeds... 
    %><%@ page import="java.lang.String" %><%
    %><%@ page import="java.net.*"  %><%
    %><%@ page import="java.io.*"   %><%
    %><%@ page import="java.util.*" %><%
    %><%@ page import="javax.servlet.*"  %><%
       System.out.println("TestWS1.jsp: begin");
       //  Use PrintStream to allow very long content made up of strings...
       //    thanks to:  http://kickjava.com/1793.htm  
       ByteArrayOutputStream baos = new ByteArrayOutputStream (  ) ;
       PrintStream ps = new PrintStream ( baos ) ;
       ps.println("\"TestWS1: This is the returned string as HTML <br> This can be any HTML code.<br>\"");
       // now write the ByteArrayOutputStream to the outputstream   
       response.setContentType("text/html");
       response.setHeader("Pragma", "no-cache");
       response.setHeader("Cache-Control", "no-cache");
       response.setDateHeader("Expires", 1);
       response.setDateHeader("max-age", 0);
       OutputStream os = response.getOutputStream();
       baos.writeTo(os);
       os.close();
       System.out.println("TestWS1.jsp: done");
    %>When I run TestWS1.jsp, I get the expected entries in the system log and the expected output:
    "TestWS1: This is the returned string as HTML <br> This can be any HTML code.<br>"However, when I run the TestWS1Call.html, I get the entries in the system log but nothing fires the javascript function.
    What am I missing?
    Thank you

    I found a solution to loading dynamic content using the <script src= tag.
    This approach seems to be useful (a) for situations in the jsp content is dependent on client-side characteristics
    (such as window size) and (b) because it seems to work on any browser with javascript and does not require an
    ActiveX for older versions of IE.
    I wrapped the output of the jsp page inside a javascript call to the callback function
       ps.println(callback+"(\"TestWS1: This is the returned string as HTML <br> This can be any HTML code.<br>\")");I also changed the content type to javascript.
       response.setContentType("text/javascript");Now, when the script tag is found, the jsp page returns a javascript function call to the callback function and passes
    the desired content as a single parameter. The callback function then places the content in the appropriate
    location on the page.

  • Howto process non .jsp files wiht the jsp processor?

    I am building an application that uses a tag to include some resources to the page. This tag simple get in the context the bean assossiated with the tag and include it in its own stead.
    An engine process the request setting in the request scope a bean to be used by the tag. For the above example it would do:
    request.setAttribute( bean.getName(), bean );For example, in a given teen.jsp page I would have a tag:
    <sgc:resource name="menu" />One of the beans properties is the uri of the resource being included, this is configurable with a XML file, so that if I have the entry(it is cleaned out from non related stuff):
                <page name="teen.page"
                    wireframe="teen.jsp"
                    region="SP,RJ" >
                    <description>Descri��o da p�gina.</description>
                    <resource name="menu" location="menu.cnt" region="SP,RJ"/>
                    <resource name="content" location="teen1.cnt" region="SP"/>
                    <resource name="content" location="teen2.cnt" region="RJ"/>
                </page>When a request for teen.page reach the server, the engine find out the user data and create beans according to it, for example if it is from SP, the engine will populate a resource bean with the location set to teen1.cnt and will forward the request to teen.jsp. In teen.jsp there will be tag that will include teen1.cnt.
    All of this works fine as long as I don't use serverside tags in the cnt files. Yet I need the cnt files to be JSP processed.
    I searched for it in this forum and I googled for it, the closer answer I got for this was:
    http://www.jguru.com/faq/view.jsp?EID=254460
    I tryied it, but the server give me a error telling:
    javax.servlet.ServletException: Wrapper cannot find servlet class org.apache.jasper.runtime.JspServlet or a class it depends on
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)I am using tomcat 5.0.28 and this class seem to be part of it. I didn't found any solution to this. Anyone has any sugestion?
    As a side note, if I use .jsp as an extention to my resources, everything goes fine, but I would prefer to use cnt unless I cant solve this.
    Thanks for your time,
    Notivago.
    May the code be with you.

    Hello there!!
    Thanks for the help. I assigned dukes for you both. The change in the web.xml in the tomcat's conf directory did worked well. This web.xml already has a servlet defined:
        <servlet>
            <servlet-name>jsp</servlet-name>
            <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
            <init-param>
                <param-name>fork</param-name>
                <param-value>false</param-value>
            </init-param>
            <init-param>
                <param-name>xpoweredBy</param-name>
                <param-value>false</param-value>
            </init-param>
            <load-on-startup>3</load-on-startup>
        </servlet>and I just had to add mine:
    <servlet-mapping>
            <servlet-name>jsp</servlet-name>
            <url-pattern>*.cnt</url-pattern>
        </servlet-mapping>In my previous attempt I had to add both entries to the application web.xml, but as it was stated in the previous post it didn' t worked. I guess that diferent class loaders are used for eache one of this and the class org.apache.jasper.servlet.JspServlet isn't avaiable to the deployed application.
    Thanks again,
    Notivago.
    May the code be with you.

  • Request xml, process jsp..

    Hello
    My English abillity very poor. sorry...
    My homepage base on xml(not servelet, jsp)
    so user connect a.xml...
    a.xml+a.xsl combine... so user can view homepage....
    but I want to....
    user request a.xml
    a.xml call specific jsp process and make new b.xml...
    and b.xml+a.xsl... > view new page.....
    so How can I connect a.xml + process.jsp.....
    a.xml must call process.jsp...
    Help me

    Have the XML page call a servlet in the usual HTML manner passing what ever parameters needed. In the Srevlet do what ever processing needed. In the response back to the browser do:
    res.setContentType("text/xml");
    pw = res.getWriter();
    pw.print(xmlString);
    pw.flush();
    pw.close();
    where xmlString is the desired xml in a String. You could also play around with getOutputStream if you prefer.

  • Mysql update form  a form in jsp page

    <?xml version="1.0" encoding ="iso-8859-1"?>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <%-- set up database source --%>
    <c:if test="${empty sessionScope.mc07kpkDataSource}">
    <sql:setDataSource
    var="mc07kpkdbDataSource"
    driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/mc07kpkdb"
    scope="session"
    user="mc07kpk_web"
    password="beGin+35"
    />
    </c:if>
    <%-- insert details to trader table --%>
    <c:catch var="insertDetails">
    <sql:update dataSource="${sessionscope.mc07kpkDataSource}">
    INSERT into trader (dbTraderPNumber,dbTraderPwd,dbTraderName,dbTraderEmail,dbTraderProgramme,dbTraderDOB,dbTraderPhoneNum,dbTraderDepartment)
    VALUES (?,?,?,?,?,?,?,?)
    <sql:param value="${param.txtname}"/>
    <sql:param value="${param.txtdepartment}"/>
    <sql:param value="${param.txtprogramme}"/>
    <sql:param value="${param.txtphonenum}"/>
    <sql:dateParam value="${txtdob}" type="date" />
    <sql:param value="${param.txtuserid}"/>
    <sql:param value="${param.txtpassword}"/>
    </sql:update>
    </c:catch>
    <c:if test="${!empty insertFailure}">
    <p><b> User Registration Failed</b></p>
    </c:if>
    <head>
    <title>Registeres USers Login Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <body>
    <form action="" method="post" name="frmLogin" >
    <table border="0" align="right" cellpadding="2" cellspacing="0">
    <tr>
              <td width="64">Username:</td>
    <td width="60"><input name="txtLUserId" type="text" size="10"></td>
    </tr>
         <tr>
    <td width="64">Password:</td>
         <td width="60"><input name="txtLPassword" type="password" size="10"></td>
    </tr>
         <tr>
         <td colspan="2"align="center">
         <input name="btnLogin" type="submit" onclick="Traderhomepage.jsp">
         </td>
         </tr>
    </table>
    </form>
    <p> </p>
    <p> </p>
    <table width="1049" cellpadding="5" align="center">
    <tr>
    <td width="2378"><div align="center">
    <h2 align="center"> User Registration</h2>
    <p>Home | Register | Books For Sale | Buy Or Sell</p>
    </div></td>
    </tr>
    </table>
    <p align="center"> </p>
    <p>This website is only open to members of the De MontFort University.
    You will need a current @learner.dmu.ac.uk e-mail address in order to register.</p>
    <p> If you've already registered for one site you do not need to register again </p>
    <form action="userregistration.jsp" method="get" name="userfrm" id="form1">
    <table width="726" height="285" border="0" align="left" cellpadding="2" cellspacing="0">
    <tr>
    <td width="157" align="right" >Name:</td>
    <td width="561" ><input name="txtname" type="text" id="txtname" />
    </td>
    </tr>
    <tr>
    <td width="157" align="right" >Department</td>
    <td align="left" >
    <select name="txtdepartment" id="txtdepartment" >
    <option></option>
    <option>Faculty of Art and Design</option>
    <option>Faculty of Business and Law</option>
    <option>Faculty of Computing Sciences and Engineering</option>
    <option>Faculty of Health and Life Sciences</option>
    <option>Faculty of Humanities</option>
    </select>
    </td>
    </tr>
    <tr>
    <td align="right" >Programme</td>
    <td ><input type="text" name="txtprogramme" />
    (eg: BIS,SE) </td>
    </tr>
    <tr>
    <td align="right" >Telephone Number: </td>
    <td ><input name="txtphonenum" type="text" /></td>
    </tr>
    <tr>
    <td align="right" >Date Of Birth: </td>
    <td ><input name="txtday" type="text" size="15">(of format YYYY-MM-DD)</td></td>
    </tr>
    <tr>
    <td align="right" >Username</td>
    <td align="left" >
    <input name="txtuserid" type="text" size="15"/>
    (eg. p07269027 from [email protected])</td>
    </tr>
    <tr>
    <td align="right" >Password</td>
    <td align="left" >
    <input name="txtpassword" type="password" size="15" />
    </td>
    </tr>
    <tr>
    <td align="right" >Confirm Password </td>
    <td align="left" >
    <input name="txtpasswordconf" type="password" size="15" />
    </td>
    </tr>
    <tr>
    <td colspan="2" align="center">
    <input name="register" type="submit" value="register" />
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    please let me know the problem in updating data from the form to my database.

    userregistration.jsp ( view)
    <c:url value="/cw/router/userregistration" var="UregPgeURL" scope="page"/>
    <form action="${UregPgeURL}" method="get" >
    <div>
    <table width="726" height="285" border="0" align="left" cellpadding="2" cellspacing="0">
    <tr>
    <td width="157" align="right" >Name:</td>
    <td width="561" > <input name="txtname" type="text" value="${param.txtname}"/> </td>
    </tr>
    <c:if test="${!empty requestScope.reqInvalidUserName}">
    <c:out value="${requestScope.reqInvalidUserName}"/>
    </c:if>
    <tr>
    <td width="157" align="right" >Department</td>
    <td align="left" >
    <select name="txtdepartment" id="txtdepartment" value="${param.txtdepartment}" >
    <option></option>
    <option>Faculty of Art and Design</option>
    <option>Faculty of Business and Law</option>
    <option>Faculty of Computing Sciences and Engineering</option>
    <option>Faculty of Health and Life Sciences</option>
    <option>Faculty of Humanities</option>
    </select>
    </td>
    </tr>
    <tr>
    <td align="right" >Programme</td>
    <td ><input type="text" name="txtprogramme" value="${param.txtprogramme}" />
    (eg: BIS,SE) </td>
    </tr>
    <tr>
    <td align="right" >Telephone Number: </td>
    <td ><input name="txtphonenum" type="text" value="${param.txtphonenum}" /></td>
    </tr>
    <tr>
    <td align="right" >Date Of Birth: </td>
    <td ><input name="txtday" type="text" size="15" value="${param.txtdob}" >(of format YYYY-MM-DD)</td></tr>
    <c:if test="${!empty requestScope.reqInvalidDOB}">
    <c:out value="${requestScope.reqInvalidDOB}"/>
    </c:if>
    <tr>
    <td align="right" >Username</td>
    <td align="left" >
    <input name="txtuserid" type="text" size="15" value="${param.txtuserid}" />
    (eg. p07269027 from [email protected])</td>
    <c:if test="${!empty requestScope.reqInvalidUserId}">
    <c:out value="${requestScope.reqInvalidUserId}"/>
    </c:if>
    </tr>
    <tr>
    <td align="right" >Password</td>
    <td align="left" >
    <input name="txtpassword" type="password" size="15" value="${param.txtpassword}" />
    </td></tr>
         <c:if test="${!empty requestScope.reqInvalidPassword}">
    <c:out value="${requestScope.reqInvalidPassword}"/>
    </c:if>
    <tr>
    <td align="right" >Confirm Password </td>
    <td align="left" >
    <input name="txtpasswordconf" type="password" size="15" />
    </td>
    </tr>
    <tr>
    <td colspan="2" align="center">
    <input name="frmsubmit" type="submit" value="Register User" />
    <input type="reset" name="Reset" value="Reset" />
    </td>
    </tr>
    </table>
         <c:if test="${!empty requestScope.reqQueryErrorMessage}">
    <c:out value="${requestScope.reqQueryErrorMessage}"/>
    </c:if>
         <c:if test="${!empty requestScope.reqInvalidUpdate}">
    <c:out value="${requestScope.reqInvalidUpdate}"/>
    </c:if>
    proregistration.jsp(process page)
    <?xml version="1.0" encoding ="UTF-8"?>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <c:if test="${empty param.frmsubmit}">
    <c:set var="reqOutcome" scope="request" value=" " />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/> <%-- initial request --%>
    </c:if>
    <-- validate txtname --%>
    <c:if test="${empty param.txtname }">
    <c:set var=reqInvalidUserName" scope="request" value= "User Name Cannot Be Empty" />
    </c:if>
    <-- validate txtuserid --%>
    <c:if test="${empty param.txtuserid }">
    <c:set var=reqInvalidUserId" scope="request" value= "User ID Cannot Be Empty" />
    </c:if>
    <-- validate txtpassword--%>
    <c:if test="${empty param.txtpassword }">
    <c:set var=reqInvalidPassword" scope="request" value= "Password Cannot Be Empty" />
    </c:if>
    <-- validate txtdob --%>
    <c:if test="${empty param.txtdob }">
    <c:set var=reqInvalidDOB" scope="request" value= "Invalid Date Of Birth" />
    </c:if>
    <-- if userid invalid or username invalid --%>
    <-- redisplay form with originl typed-in data and with errors marked --%>
    <c:if test="${empty param.txtname or empty param.txtuserid }">
    <c:set var=reqOutcome" scope="request" value= "failure" />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/> <%-- failure --%>
    </c:if>
    <%-- check for query errors --%>
    <c:catch var="insertQueryError">
    <sql:update
    var="pgeRowCount"
    scope="page" >
    <%-- insert details to trader table --%>
    <c:catch var="pgeQueryError">
    <sql:update var="pgeRowCount" scope="page">
    INSERT into trader (dbTraderName,dbTraderDepartment,dbTraderProgramme,dbTraderPhoneNum ,dbTraderDOB,dbTraderPNumber,dbTraderPwd)
    VALUES (?,?,?,?,?,?,?,?)
    <sql:param value="${param.txtname}"/>
    <sql:param value="${param.txtdepartment}"/>
    <sql:param value="${param.txtprogramme}"/>
    <sql:param value="${param.txtphonenum}"/>
    <sql:dateParam value="${txtdob}" type="date" />
    <sql:param value="${param.txtuserid}"/>
    <sql:param value="${param.txtpassword}"/>
    </sql:update>
    </c:catch>
    <%-- check For query Error -- %>
    <c: if test="${not empty pgeQueryError}">
    <c:choose>
    <%-- check For duplicate record --%>
    <c:when test="${pgeQueryError.rootcause.errorCode == '1062'}">
    <c:set var="reqQueryErrorMessage" scope="request" value="Duplicate Record" />
    </c:when>
    <c:otherwise>
    <%-- database error --%>
    <c:set var="reqQueryErrorMessage" scope="request" value="Database Error" />
    </c:otherwise>
    </c:choose>
    <c:set var="reqOutcome" scope="request" value="failure" />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/> <%-- failure --%>
    </c:if>
    <%-- check For no rows returned --%>
    <c:if test="${pgeRowCount !=1}">
    <c:set var="reqInvalidUpdate" scope="request" value="*** rowCount not = 1"/>
    <c:set var="reqOutcome" scope="request" value="failure" />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/> <%-- failure --%>
    </c:if>
    <%-- Otherwise --%>
    <%-- Outcome is success --%>
    <c:set var="reqOutcome" scope="request" value="success" />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/login.jsp"/> <%-- success --%>
    </c:if>
    Router.jsp (mapping URL)
    <%-- setup session if one does not exist --%>
    <%@ page session="true" %>
    <%-- set up debug variable --%>
    <c:set var="sessDebug" scope="session" value="false" />
    <%-- get pathinfo information from the request --%>
    <%-- this defines which use case has been requested --%>
    <c:set var="pgePathInfo" scope="page" value="${pageContext.request.pathInfo}" />
    <%-- uc02 : Login --%>
    <c:if test="${pageScope.pgePathInfo =='/home'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/home.jsp"/>
    </c:if>
    <c:if test="${pageScope.pgePathInfo =='/login'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/login.jsp"/>
    </c:if>
    <%-- uc01 : View Details Of Books For Sale --%>
    <c:if test="${pageScope.pgePathInfo =='/viewbooksforsale'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/viewbooksforsale.jsp"/>
    </c:if>
    <%-- uc01 : User registration--%>
    <c:if test="${pageScope.pgePathInfo =='/userregistration'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/>
    </c:if>
    <%-- uc01 : debug --%>
    <c:if test="${pageScope.pgePathInfo =='/debug'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/debug.jsp"/>
    </c:if>
    <%-- otherwise --%>
    <jsp:forward page="/WEB-INF/jsp/cwjsps/home.jsp"/>
    debug.jsp
    <%-- \WEB-INF\jsp\cw\debug.jsp --%>
    <%-- debug include file --%>
    <c:if test ="${sessionScope.sessDebug == 'true'}">
    <table border="1">
    <c:forEach var="item" items="${cookie}">
    <tr>
    <td>inbound cookies</td>
    <td>${item.key}</td>
    <td>${item.value.value}</td> <%--note the .value.value--%>
    </tr>
    </c:forEach>
    <c:forEach var="item" items="${param}">
    <tr>
    <td>inbound parameter</td>
    <td>${item.key}</td>
    <td>${item.value}</td> <%--note the .value--%>
    </tr>
    </c:forEach>
    <c:forEach var="item" items="${requestScope}">
    <tr>
    <td>request scope object</td>
    <td>${item.key}</td>
    <td>${item.value.value}</td>
    </tr>
    </c:forEach>
    <c:forEach var="item" items="${sessionScope}">
    <tr>
    <td>session scope object</td>
    <td>${item.key}</td>
    <td>${item.value.value}</td>
    </tr>
    </c:forEach>
    </table>
    </c:if>
    1. cannot update mysql table with values from user registration form.
    2. if i turn the sessionScope = "true" in router.jsp i get error while accessing userregistration.jsp

  • Using JSP to stream XML to a Oracle Report .jsp file

    I created some Oracle Reports for a pdf output. Using these reports can I stream a URL XML file to it from a JSP XML read from a database? I would like to use JSP's to read the datbase and then stream the XML to the JSP report (Oracle Report Server). Is this possible?
    Any help would be great.
    Thanks in advance.

    I was able to hard code a URL running XSQL which created XML and it worked great. Then I created a Oracle Report and saved it as a JSP file. With this JSP file can you feed it XML from another JSP process that reads the database? I looked at using something like inputstream coding in this JSP report file. I am new to JSP's and Java so any examples would be great.
    What I am tring to do is change the JSP file with diffent values each time I run the report and I do not want to read from the database at report generation time. I would like to input the data from a JSP streamed process that would stream the XML to the report JSP with out hard coding the URL in the report data source. Is this possible?
    Thanks for your help in advance.

  • Include jsp file

    There are 2 jsp files: main.jsp, process.jsp.
    In the main.jsp,
    String name="java";
    <jsp:include page="process.jsp" flush="true" />
    .....In the process.jsp,
    String name="abc";
    ....My problem is the parameter - name have not changed to "abc" .
    How can I solve this problem ?
    thanks.

    Hi,
    Dont think that it should happen like that, the diffrence between <jsp:include> and <%@ include> is that jsp:include is a dymanic include i.e. the processed contents of the jsp flie are added to your page, while @ include is a static include meaning that the contents are first put together as one big jsp and then the contents are processed.
    That is why the original jsp is recompiled, and your server should automatically determine that when a parent jsp is to be recompiled when a included jsp is changed. What server are you using?
    And as in jsp:include the processed result (html) is added the variable declairations or manipulations in a child will not be accesable in the parent, while they will be in case of @include.
    Hope this helps
    Regards
    Omer

  • Opendocument.jsp path incorrect when used within Crystal

    Post Author: Tilghmank
    CA Forum: General
    I am trying to find out how to change the Opendocument.jsp path with Crystal Reports.  The problem appears to be the "Infoview/plugin" part of the path.  I am using webelements from Crystal with the WETargetPath() function. 
    undefinedhttp://mylocalname
    JSP Processing Error
    HTTP Error Code:   404
    Error Message:
    JSPG0036E: Failed to find resource /InfoView/plugin/opendoc/openDocument.jsp
    Root Cause:
    java.io.FileNotFoundException: JSPG0036E: Failed to find resource /InfoView/plugin/opendoc/openDocument.jsp     at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.findWrapper(JSPExtensionProcessor.java:268)     at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:250)     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java(Compiled Code))     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java(Compiled Code))     at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java(Compiled Code))     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))     at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))     at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))     at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))     at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))     at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

    Post Author: V361
    CA Forum: General
    You could try creating a formula, for example
    WhilePrintingRecords;PageNofM
    and use the formula, hopefully, CR will be able to calculate the correct page count.

  • JSP startup takes longer in Java4.1 w.r.t Java3.1

    Hi,
    I have a question on performance of Java4.1.
    When i start about 4 to 5 Servlet Process on a CPU, it is seen to consume more cpu cycles, in the way causing other applications running on the cpu to be non-responsive.
    This causes the clients to other process in the CPU to time out when the JSP process start up.
    The problem is seen only in Java4.1, whereas Java3.1 gives a much better performance.
    I would like to know why this regression happend, or can i do some tuning to reduce the JSP startup time.
    I appreciate for any help in this regard.
    Thanx,
    Anup

    I found the problem.
    The dtd location of the faces-config.xml had to be changed. It was pointing to the schema of 1.1.
    With the following faces-config.xml, my application worked perfectly fine.
    <?xml version="1.0"?>
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
                  version="2.0">             
    </faces-config>

  • Problems with include jsp

    Hi... my english are not good enough but im trying to explain.
    I wanna include a url using <jsp:include tag, but my url have params.... so i know i have to use <jsp:param 4 each param.... So i did a little scriptlet that takes the url and separe each param to put it in a bidimensional array then i make a string with all the result... i mean... <jsp:inlcude page="relative URL" flush="true"><jsp:param name="hi" value="2"/>... next param... next param... </jsp:inlcude>.... i write the string at the jsp but it seems doesnt work.. this i made it with a document.write...
    the problem here is... the string its ok coz if i cut and paste the result i work great... but... if i make it dynamically ... nothing happens....
    Either i did put it the bidimensional array at the request.setAttribute for catch it at the next jsp and make a bucle for... but the same trouble... nothings happen...
    Some idea? :(

    You definitely want to use a jsp include action, not a directive. The directive
    happens at translation time and does not process the requested page. An action
    happens at request time and treats the requested page as a new request, thus
    including the results of the invoked jsp.
    BTW, the include action is the tags that looks line <jsp:inculde
    page="included_page.jsp" flush="true"/> or something similar (parameters can
    also be specified).
    The JSP 1.1 spec has more details. See sections 2.7.5 & 2.7.6 (for the include
    directive and a quick comparison of the directive vs the action) and 2.13.4 (for
    the include action).
    Matt
    Gurjit wrote:
    Hi ,
    I have a typical problem. The iplanet server doesn't interpret the code
    from a jsp which is included in another jsp. For eg.
    code for main jsp
    request.getParameter("username");
    <%@ include file="/jsp/ui/left_nav.jsp" %>
    processing code.
    Now when I start the server and the first time I load this page I get a
    dearranged page which has the code of the left_nav.jsp present in the html
    output.
    On opening this page to edit, when a small modification is made and the file
    is saved, a reload of the same page gives the proper output with all the
    jsp's interpreted.
    Thanks to one and all,
    Regards,
    Gurjit

  • JSP non-lockable javamail

    HI,
    I'm using the javamail api through JSP pages. The problem comes from the Transport Object which locks when connecting to my stmp server. Therefore, if i send 10 e-mail in a loop, it takes more than 50 sec to send all the mails since the connection to my smtp server takes at least 5s per mail.
    I was wondering if there is a way to create a non-lockable transport object which would send the mail regardless if the connection succeeded or not. Or can i configure my tomcat to do this mail background thing instead. Note that making only 1 connection for the 10 email is not a valid solution since the transport object would still lock during the only connection.
    Thanks...

    Thanks for replying.
    Maybe i explained it wrong. I can't really fix the STMP server, because i don't own it...:( But the problem is that my JSP code hangs for 5 sec each time wether the connection is successfull or not.
    Is it possible to launch the Transport connection in background, or on a separate thread or handle it with a third party (tomcat) so that email processing doesn't slow down my JSP page processing. I'm not really interested in handling the smtp connection failure. If the connection fails, that's too bad i cound'nt send the mail but a least the JSP processing time is not affected. If the connection succeed, i don't want to wait the 5 sec connection time. I just want to go on with the page processing.
    The behavior i'm looking for is a transport object that would use a send mail function without waiting for a conneciton. The object itself would handle the connection and send the mail if successful and don't send it if not. All this would be non-lockable...
    i wonder if this is possible ?

Maybe you are looking for

  • Sql to find the length of the column in bytes

    Hi could some one help me in writing the sql to find the actual size of the column in bytes. thanks in advance

  • Trouble importing photos

    I recently rebuilt my Library and importted most of the photos from my backup hard disk. However some of my photos didn't import, and I get an error stating that they photos can't be imported because the files are not recognized by iPhoto. Does anyon

  • The new iTUNE GIVE ME ERROR R6034 AND ERROR 7 (WINDOWS EXE ERROR 1114)

    the new iTUNE give me error c:\program files(x86) itunes\itunes.exe r6034, and Error 7(windows error 1114)

  • IWork to new computer without migration

    I just bought a new computer, and want to transfer my old iWork license to my computer, but I can't migrate as my old computer is back in the UK with my boyfriend, and I'm in the USA. If I get him to uninstall it and give me the serial number, can I

  • Bridge CS5 freezes

    For the past few weeks, Bridge has repeatedly been freezing immediately after opening the program. The normal screen appears with either Favorites or Folders showing, but no thumbnails. In the lower left corner, only part of the little rotating circl