Left menu in a jsp page

Hi,
There is a standard jsp page, which has a menu on the left side and this menu appears on some of the pages forwarded from this page.
I have created an OA page, in this I need to call the second jsp page.
I am able to forward to this jsp page, but the menu on the left side is not getting displayed.
What could be the reason?
How can I forward to the standard page?
--Divya.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

You need to analyze the page structure and logic of the jsp which has the menu. Try to find out if the menu rendering has any dependency on any session variable or something similar.
--Shiv                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to display a combobox(dropdown menu) in a jsp page?

    Hi friends,
    I need to create a jsp page which contains three text fields and a single dropdown menu,,, . and my functionality is while loading the page itself that dropdown menu gets the data from database and holds in it..... i mean the data in theat combo box must gets from Database and based on the particular selection the remaing fields has to be filled ...... so plz helpme to solv this and any help is appriciated....
    regards
    priya......

    Hi,
    Google should definitely help you with this. I am sure that there may be people here who will guide you through each step in this forum. But, you learn only when you do things yourself. Please take some time to go through the links in google. You will definitely find all the things required to solve your problem.
    1) JDBC examples to populate your dropdown.
    2) DHTML+Javascript to handle selection/display of fields.
    You can come here for help only after you have tried to some extent and not able to proceed with something. Trust me, you should be able to do it yourself.
    Karthik.

  • How to create menu bar in jsp page using struts-tles

    I have started working with struts-tiles. I want to create menu bar using struts-tiles. please guide me.

    I've done this very recently. In fact, tiles has very little to do with the menu itself.
    In your layout, define where you want the menu to go.
    <tiles:insert attribute="menu" />Now, in the actual file, create your menu structure. This part is up to you. I've used http://www.brainjar.com/ as a starting point for the client side actions.
    On my menu page, I call a method on a custom object that returns the menu bar object. Currently, I'm working on putting this menu into some sort of cached object so it doesn't have to rebuild it on every page request.
    Perhaps I've misread your post and you're looking to use tiles, in and of itself, to simulate menus? Otherwise, I hope my post helps.

  • How to call a JSP page from Applications menu?

    Hi partners,
    I am still looking for "how to call a JSP page from Applications menu?", I mean instead of calling a form, I want to call a JSP page which is staying in a OC4J repository which is located in another server.
    Any idea will be really appreciated.
    Thanks in advance.
    Frank Mtz.

    Hi Frank,
    if u know the solution please share it with me. i'm looking for the same scenario.
    thanks in advance,
    anish

  • Menu in jsp page

    Hello!
    Here is the error I obtain while opening the jsp page where I added a menu as follow:
    <h:selectOneMenu value="#{MyNewUserWizard.name}" style="width:150px" >
    <f:selectItems value="#{MyNewUserWizard.names}" />
    </h:selectOneMenu>
    The error:
    javax.portlet.PortletException: org.apache.jasper.JasperException: Value binding '#{MyNewUserWizard.names}'of UISelectItems with component-path {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/wizard/new-user/my_person-properties.jsp][Class: javax.faces.component.html.HtmlForm,Id: person-props][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: handleMetaDataEvent_id25][Class: javax.faces.component.UISelectItems,Id: handleMetaDataEvent_id26]} does not reference an Object of type SelectItem, SelectItem[], Collection or Map but of type : null
    Does somebody know what is this error?
    Thanks.

    I've done this very recently. In fact, tiles has very little to do with the menu itself.
    In your layout, define where you want the menu to go.
    <tiles:insert attribute="menu" />Now, in the actual file, create your menu structure. This part is up to you. I've used http://www.brainjar.com/ as a starting point for the client side actions.
    On my menu page, I call a method on a custom object that returns the menu bar object. Currently, I'm working on putting this menu into some sort of cached object so it doesn't have to rebuild it on every page request.
    Perhaps I've misread your post and you're looking to use tiles, in and of itself, to simulate menus? Otherwise, I hope my post helps.

  • How we can generate dynamic menu in jsp page

    Hi all,
    how we can generate dynamic menu in jsp page.
    Thanks
    Manjinder

    by reading more about them on the web or in a good book, OR BY HIRING SOMEBODY TO DO SO. ;)

  • Problem when trying to add a link to the left menu item!!!!

    Hi everyone,
    I am trying to put a new menu group on the left menu,with a link in that group for every one.On checking with the customization guide this is what i did
    for one link i did add the following lines in each of the files
    1)xlWebAdmin.properties
    - menuGroup.Misc-Menu=Misc Menu
    - menuItem.Misc-Menu.My-Nomination=My Nomination
    2) xlDefaultAdmin.properties
    - menuItem.Misc-Menu.My-Nomination.link=mynomineefrm?showfrm
    3) repacked the war and the ear
    4) Restarted my server
    When I login into the administration(xelsysadm) page I didnt see any menu item with name "My Nomination" which i am supposed to see.
    secondly it shows the menu item when ever i select some group and click on assign menu item.
    Moreover, when I try to assign this menu item to all users group it gives me this error
    On browser it prints
    Permission Denied to Assign Selected Menu Items
    You do not have the permissions to assign one or more selected menu items.
    on console it prints
    ERROR [SERVER] Class/Method: tcDataObj/eventPreInsert Error :Insert
    permission is denied
    ERROR [APIS] Class/Method: tcGroupOperationsBean/addMenuItems encou
    nter some problems: maoRejections:You do not have permission to insert this obje
    ct.
    ERROR [APIS] Class/Method: tcGroupOperationsBean/addMenuItems encou
    nter some problems: Error occurred while adding menu items.
    ERROR [WEBAPP] Class/Method: UserGroupMenuItemsAction/commitGroupAs
    signMenuItems encounter some problems: {1}
    Thor.API.Exceptions.tcBulkException
    This problem eat my happy sunday :-(, any one has solution for this problem?
    - Also if some one can help on how to link jsp to the new link will be helpful for me!
    Thanks,
    doki

    Design Console > Form Information > add new
    Class Name Organizations.Merge
    Description Move users from one organization to another
    Type menuitem
    Add following to xlWebAdmin.properties, xlWebAdmin_en_US.properties
    Organizations.Merge=mergeOrgs.do?Display
    menuItem.Organizations.Merge.link=mergeOrgs.do?MergeOrganizations
    menuItem.Organizations.Merge=Merge
    mergeOrgs.button.display=Merge Organizations
    Even you have to assign first to System Administrator group
    First go to Manage Group
    Select System Administrator Group
    Select Menu Item
    Click Assign and select newly craeted Menu Item and click Confirm
    These are the steps to see the new menu item. To make this menu item working:
    you'll have to write action class, form bean class and you'll have to create JSPs and make their entry in struts-config as welll as in Tiles-def.xml
    Then your menu item will work.

  • How update the info on same Jsp page

    i have a Jsp page.on left side of this page having menu bar. in this menu bar having links of some colleges.
    i want when i click on link of first college name, same page should be updaed with updated menu bar where i can show the information of the concerning college.
    please focus on this.

    I have two Jsp pages named bestschool.jsp and schoolnames.jsp.
    I am calling schoolnames.jsp from bestschool.jsp.
    I want when I click the link on INDUS School. It can show all concerning link of INDUS School links like profile, result, facility etc. in the same place instead of other naming school links.
    my requiremet main is i want to update the information on same Jsp page.
    How can I implement this with in Servlets/Jsp.
    Please review below JSP’s files
    schoolnames.jsp
    <table width="200" border="0" align="center" cellpadding="5">
    <tr>
    <td height="100" bgcolor="#476bc0">
    <div align="center" class="boldhead"><font size="+1">
    School list</font></div>
    </td>
    <tr>
    <td height="30" bgcolor="#5577C6">
    <a href="" class="smalltext">INDUS School</a></td>
    </tr>
    <tr>
    <td height="30" bgcolor="#728DCF">
    <a href="" class="smalltext">Vaise School</a>
    </td>
    </tr>
    <tr>
    <td height="30" bgcolor="#728DCF">
    <a href="" class="smalltext">D.G.V School</a></td>
    </tr>
    <tr>
    <td height="30" bgcolor="#728DCF">
    <a href="" class="smalltext">D.P.S School </a></td>
    </tr>bestschool.jsp
    <html>
    <head>
    <title>Best school</title>
    <link href="mystyle.css" rel"stylesheet" type="text/css">
    </head>
    <body>
    <div align="center"><font size="+2">
    Best Schools in Rohtak</font>
    </div>
    <table width="700" height="500" border="0" align="left"
    cellspacing="0">
    <td width="200" rowspan="2" valign="top">
    <%@ include file="schoolnames.jsp" %>
    </td>
    <td height="328" bgcolor="#476BC0" valign="top">
    <p> </p><p> </p><p> </p>
    </html>please suggest.

  • Slow rendering of JSP pages

    Hello,
    We are in the process of upgrading iPlanet 4.1 to 6.1Sp2. We have made enhancements to our code to support this effort, ie making our session bean serializable, adding the context dir in jsp to jsp calls.
    Right now we are noticing slow rendering speed for jsp pages compared to iPlanet 4.1. It seems the page loads to a certain point, there is about 2-4 second delay before the page completes loading.
    I've activated the monitor for performance statistics.
    Here is the perf dump.
    webservd pid: 8109
    Sun ONE Web Server 6.1SP2 B04/07/2004 16:09 (SunOS DOMESTIC)
    Server started Tue Jul 13 10:33:08 2004
    Process 8109 started Tue Jul 13 10:33:08 2004
    ConnectionQueue:
    Current/Peak/Limit Queue Length 0/1/4096
    Total Connections Queued 11
    Average Queue Length (1, 5, 15 minutes) 0.00, 0.00, 0.00
    Average Queueing Delay 0.15 milliseconds
    ListenSocket group1:
    Address http://10.201.1.53:80
    Acceptor Threads 1
    Default Virtual Server https-infa.net
    KeepAliveInfo:
    KeepAliveCount 2/256
    KeepAliveHits 44
    KeepAliveFlushes 0
    KeepAliveRefusals 0
    KeepAliveTimeouts 8
    KeepAliveTimeout 30 seconds
    SessionCreationInfo:
    Active Sessions 2
    Keep-Alive Sessions 0
    Total Sessions Created 48/256
    CacheInfo:
    enabled yes
    CacheEntries 27/1024
    Hit Ratio 82/140 ( 58.57%)
    Maximum Age 30
    Native pools:
    NativePool:
    Idle/Peak/Limit 1/1/128
    Work Queue Length/Peak/Limit 0/0/0
    Server DNS cache disabled
    Async DNS disabled
    Performance Counters:
    Average Total Percent
    Total number of requests: 57
    Request processing time: 1.2522 71.3780
    default-bucket (Default bucket)
    Number of Requests: 57 (100.00%)
    Number of Invocations: 866 (100.00%)
    Latency: 0.0003 0.0174 ( 0.02%)
    Function Processing Time: 1.2519 71.3606 ( 99.98%)
    Total Response Time: 1.2522 71.3780 (100.00%)
    Sessions:
    Process Status Function
    8109 response service-dump
    response service-j2ee

    Here is a sample of jsp that renders partially. Each page renders to the same spot for that page, then there is a 5-10 second delay before the page finishes.
    <-- Partial Page rendered -->
    <HTML>
    <HEAD>
    <TITLE> FAST : Health Check</TITLE>
    <link rel="stylesheet" type="text/css" href="/styles/table.css">
    <script>
    <!--
    if (top.location != location) top.location.href = location.href;
    //-->
    </script>
    </HEAD>
    <BODY BACKGROUND="/graphics/BACK25.jpg" BGPROPERTIES="FIXED">
    <SCRIPT>
    var menuBarOption = "";
    </SCRIPT>
    <SCRIPT>
    <!-- Begin
    var activeColor = "#COCOCO";
    var inActiveColor = "#000066";
    var whatColor = "#000066";
    var fontColor = "#COCOCO";
    document.write('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="780" height="80">');
    document.write('<TR>');
    document.write('<TD ALIGN="right" width="300" rowspan="2" bgcolor="#FFFFFF" valign="bottom"><a href="/"><img border="0" src="/graphics/infaheadbig2.jpg" align="absbottom" width="300" height="80"></a>');
    document.write('</TD>');
    document.write('<TD ALIGN="right" valign="bottom" bgcolor="#FFFFFF">');
    document.write('<table border="0" cellspacing="0" cellpadding="2" valign="bottom">');
    document.write(' <tr>');
    document.write('<td align="center">');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a target="_blank" href="http://www.forwardair.com"  style="color: red">www.ForwardAir.com</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/" style="color: #000066">Home</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/salesCRM/logon.jsp"  style="color: #000066">Sales & Marketing</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/operations/logon.jsp" style="color: #000066">Operations</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/corporate/login.jsp" style="color: #000066">Corporate</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/fast/fast.htm" style="color: #000066">FAST</a></font>');
    document.write('</td>');
    document.write(' </tr>');
    document.write('</table>');
    document.write('</TD>');
    document.write('</TR>');
    document.write('<TR>');
    document.write('<TD ALIGN="left" bgColor="#FFFFFF" valign="bottom">');
    document.write('<table border="0" cellspacing="1" width="100%">');
    document.write('<tr>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "AIRBILLS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Airbills<br>');
    document.write('<a href="/servlet/airbills/fatnt.jsp">');
    document.write('<img border="0" src="/graphics/boxicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "EMPLOYEES") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Directory<br>');
    document.write('<a href="/directory.htm">');
    document.write('<img border="0" src="/graphics/peopleicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "BENEFITS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Benefits<br>');
    document.write('<a href="/employees/benefits.htm">');
    document.write('<img border="0" src="/graphics/moneyicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "FORMS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Forms<br>');
    document.write('<a href="/forms.htm">');
    document.write('<img border="0" src="/graphics/formicon2.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "NEWS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">News<br>');
    document.write('<a href="/news.htm">');
    document.write('<img border="0" src="/graphics/newsicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "TOOLS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Tools<br>');
    document.write('<a href="/tools.htm">');
    document.write('<img border="0" src="/graphics/toolsicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "SEARCH") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Search<br>');
    document.write('<a href="/search.htm">');
    document.write('<img border="0" src="/graphics/magglassicon.gif" width="32" height="32"></a></font></td>');
    document.write('</TR>');
    document.write('</TABLE>');
    document.write('</TD>');
    document.write('</TABLE>');
    // End -->
    </SCRIPT>
    <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD width="85" height="600" bgcolor="#000066" VALIGN="TOP">
    <BR>
    <SCRIPT>
    var publicSCRMOption  = "PROCESSES";
    </SCRIPT>
    <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="LEFT">
    <TR><TD height="15" NOWRAP>
    <FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFFFFF">
    <STRONG>  FAST Menu </STRONG></FONT>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "WEBTRENDS")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/fast/fast.htm"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG> WebTrends</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "PREMIER")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/servlet/fast/premierLogin.jsp"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG> Premier</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "PROCESSES")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/servlet/faf.unix.servlet.GetHealthCheckServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG> Processes</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "EDISTATUS")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/servlet/faf.unix.servlet.GetEDIStatusServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG> EDI</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "SANIT<--- End of Partial Page --->
    This is the complete page which take about 5-10 seconds
    <--- Beginning of Completed Page --->
    <HTML>
    <HEAD>
    <TITLE> FAST : Health Check</TITLE>
    <link rel="stylesheet" type="text/css" href="/styles/table.css">
    <script>
    <!--
    if (top.location != location) top.location.href = location.href;
    //-->
    </script>
    </HEAD>
    <BODY BACKGROUND="/graphics/BACK25.jpg" BGPROPERTIES="FIXED">
    <SCRIPT>
    var menuBarOption = "";
    </SCRIPT>
    <SCRIPT>
    <!-- Begin
    var activeColor = "#COCOCO";
    var inActiveColor = "#000066";
    var whatColor = "#000066";
    var fontColor = "#COCOCO";
    document.write('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="780" height="80">');
    document.write('<TR>');
    document.write('<TD ALIGN="right" width="300" rowspan="2" bgcolor="#FFFFFF" valign="bottom"><a href="/"><img border="0" src="/graphics/infaheadbig2.jpg" align="absbottom" width="300" height="80"></a>');
    document.write('</TD>');
    document.write('<TD ALIGN="right" valign="bottom" bgcolor="#FFFFFF">');
    document.write('<table border="0" cellspacing="0" cellpadding="2" valign="bottom">');
    document.write(' <tr>');
    document.write('<td align="center">');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a target="_blank" href="http://www.forwardair.com"  style="color: red">www.ForwardAir.com</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/" style="color: #000066">Home</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/salesCRM/logon.jsp"  style="color: #000066">Sales & Marketing</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/operations/logon.jsp" style="color: #000066">Operations</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/servlet/corporate/login.jsp" style="color: #000066">Corporate</a>&nbsp</font><b><font size="3" color="#D3D0D5" face="Verdana"> | </font></b>');
    document.write('<font face="Arial" size="1" color="#FFFFFF"><a href="/fast/fast.htm" style="color: #000066">FAST</a></font>');
    document.write('</td>');
    document.write(' </tr>');
    document.write('</table>');
    document.write('</TD>');
    document.write('</TR>');
    document.write('<TR>');
    document.write('<TD ALIGN="left" bgColor="#FFFFFF" valign="bottom">');
    document.write('<table border="0" cellspacing="1" width="100%">');
    document.write('<tr>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "AIRBILLS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Airbills<br>');
    document.write('<a href="/servlet/airbills/fatnt.jsp">');
    document.write('<img border="0" src="/graphics/boxicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "EMPLOYEES") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Directory<br>');
    document.write('<a href="/directory.htm">');
    document.write('<img border="0" src="/graphics/peopleicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "BENEFITS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Benefits<br>');
    document.write('<a href="/employees/benefits.htm">');
    document.write('<img border="0" src="/graphics/moneyicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "FORMS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Forms<br>');
    document.write('<a href="/forms.htm">');
    document.write('<img border="0" src="/graphics/formicon2.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "NEWS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">News<br>');
    document.write('<a href="/news.htm">');
    document.write('<img border="0" src="/graphics/newsicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "TOOLS") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Tools<br>');
    document.write('<a href="/tools.htm">');
    document.write('<img border="0" src="/graphics/toolsicon.gif" width="32" height="32"></a></font></td>');
    whatColor = inActiveColor;
    fontColor = activeColor;
    if (menuBarOption == "SEARCH") {
       whatColor = activeColor;
       fontColor = inActiveColor;
    document.write('<td align="center" bgcolor="' + whatColor + '" valign="top" width="70"><font face="Arial" size="1" color="' +  fontColor + '">Search<br>');
    document.write('<a href="/search.htm">');
    document.write('<img border="0" src="/graphics/magglassicon.gif" width="32" height="32"></a></font></td>');
    document.write('</TR>');
    document.write('</TABLE>');
    document.write('</TD>');
    document.write('</TABLE>');
    // End -->
    </SCRIPT>
    <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD width="85" height="600" bgcolor="#000066" VALIGN="TOP">
    <BR>
    <SCRIPT>
    var publicSCRMOption  = "PROCESSES";
    </SCRIPT>
    <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="LEFT">
    <TR><TD height="15" NOWRAP>
    <FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFFFFF">
    <STRONG>  FAST Menu </STRONG></FONT>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "WEBTRENDS")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/fast/fast.htm"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG> WebTrends</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "PREMIER")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/servlet/fast/premierLogin.jsp"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG> Premier</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "PROCESSES")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/servlet/faf.unix.servlet.GetHealthCheckServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG> Processes</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "EDISTATUS")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/servlet/faf.unix.servlet.GetEDIStatusServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG> EDI</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "SANITYCHECK")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/servlet/faf.unix.servlet.GetSanityCheckDiagnosticServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG>Sanity Check</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "FASTBOOK")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/fast/fastBook.htm"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG> FAST Book</STRONG></SPAN></FONT></A>
    </TD></TR>
    <TR><TD height="15" NOWRAP>
    <SCRIPT>
    if (publicSCRMOption == "AWBREPORT")
         document.write('  <img border="0" src="/salesCRM/graphics/rarrow.gif" width="8" height="12">');
    else
         document.write(' ');
    </SCRIPT>
    <A HREF="/servlet/faf.unix.servlet.AWBCountReportServlet"><FONT SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FFCC66">
    <SPAN STYLE="{text-decoration:none}"><STRONG>AWB Report</STRONG></SPAN></FONT></A>
    </TD></TR>
    </TABLE>
    </TD>
    <TD width="715" VALIGN="TOP">
    <DIV ALIGN="right">
    <font size="1" color='black'><script LANGUAGE="JavaScript" SRC="/date.js"></script></font>
    </DIV>
    <H4>   Process - Health Check</H4>
    <form  name="processes" method="POST">
    <BLOCKQUOTE>
    AS400 DATA PULL - HEALTH CHECK (For IT Personnel Use)
    <BR><BR>
    <table border="1" bordercolordark="#003366" bordercolorlight="#003366" cellpadding="4" cellspacing="0" width="90%">
    <tr bgcolor="#003366">
    <TD align="center"><b><font color="#ffffff" size="2">NAME</b></font></TD>
    <TD align="center"><b><font color="#ffffff" size="2">RUN</b></font></TD>
    <TD align="center"><b><font color="#ffffff" size="2">STARTED</b></font></TD>
    <TD align="center"><b><font color="#ffffff" size="2">FINISHED</b></font></TD>
    <TD align="center"><b><font color="#ffffff" size="2">FLAG</b></font></TD>
    <TD align="center"><b><font color="#ffffff" size="2">RECOVERY</b></font></TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> CLIENTAR </TD><TD align='center'> Daily </TD><TD align='left'> 6/30/04 9:56 AM </TD><TD align='left'> 6/30/04 10:00 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> CONTAINERALERT </TD><TD align='center'> DAILY </TD><TD align='left'> 6/23/04 6:00 AM </TD><TD align='left'> 6/23/04 6:00 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> DAYMONTHREVENUE </TD><TD align='center'> Daily </TD><TD align='left'> 6/23/04 5:20 AM </TD><TD align='left'> 6/23/04 5:39 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'>   </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> FADAILYREVENUE </TD><TD align='center'> Daily </TD><TD align='left'> 6/30/04 10:13 AM </TD><TD align='left'> 6/30/04 10:19 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> FAONTIMECOMPLIANCE </TD><TD align='center'> Daily </TD><TD align='left'> 7/15/04 2:44 PM </TD><TD align='left'> 7/15/04 2:47 PM </TD><TD align='center'> SUCCESS </TD><TD align='left'>   </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> FAPAYROLLLOCS </TD><TD align='center'> WEEKLY </TD><TD align='left'> 6/18/04 4:30 PM </TD><TD align='left'> 6/18/04 4:30 PM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> FAPROCESS </TD><TD align='center'> Daily </TD><TD align='left'> 6/23/04 4:00 AM </TD><TD align='left'> 6/23/04 4:02 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> FATIMESHEET </TD><TD align='center'> WEEKLY </TD><TD align='left'> 6/18/04 4:30 PM </TD><TD align='left'> 6/18/04 4:39 PM </TD><TD align='center'> SUCCESS </TD><TD align='left'> CLEAR DB AND RESTART PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> FAVOLUME </TD><TD align='center'> Daily </TD><TD align='left'> 6/30/04 10:30 AM </TD><TD align='left'> 6/30/04 4:15 PM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> HP_EMPEXTRACT </TD><TD align='center'> Daily </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> HP_HOURSLOAD </TD><TD align='center'> Daily </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> HP_PUNCHPROCESS </TD><TD align='center'> Daily </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='left'> 7/26/04 7:10 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> MONTHLYVOLUME </TD><TD align='center'> Monthly </TD><TD align='left'> 6/1/04 12:00 AM </TD><TD align='left'> 6/1/04 12:11 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <tr bgcolor="#FFFFFF">
    <TD align='center'> PREPAIDRATEMAP </TD><TD align='center'> DAILY </TD><TD align='left'> 6/29/04 10:26 AM </TD><TD align='left'> 6/29/04 10:38 AM </TD><TD align='center'> SUCCESS </TD><TD align='left'> RESTART THE PROCESS </TD>
    </tr>
    <TR bgcolor="#FFFFFF">
    <TD colspan="6" align="center">
    <B>Total records returned : 14</B>
    </TD>
    </TR>
    </TABLE>
    </form>
    </BLOCKQUOTE>
    <script LANGUAGE="JavaScript" SRC="/publicFooter.js"></script>
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML><--- End of Complete page --->

  • Issue in applying SSL selectively to Login JSP Page--Session getting lost.

    Hi,
    I am facing some issues with SSL configuration on my web site running on tomcat 5.5. I am using jdk 1.5 and form based authentication with JAAS framework.
    The SSL configuration is working perfectly when applied to complete web site, but starts giving problem when applied selectively to some JSP pages. At present I am trying to apply SSL just on the login page.
    When the login screen loads up, the URL in the browser has a protocol "*https*", as expected, but it doesn't gets changed to "*http*" once the user has successfully logged in. Why is the automatic change from https to http not ocurring?
    Also I want to know which is the default page, tomcat will direct the logged in user to, once successfully authenticated using form based login; Is there any way to change this default page to some other page. It looks like that tomcat automatically directs to index.html , once the user has been successfully authenticated, but I am not so sure. My index.html page is having 4 frames; the source of these frames are different JSP pages, which are not under SSL.
    My aim is to apply SSL just on login.jsp so that password doesn't travel in clear text. Once the user is authenticated he should see index.html and the address bar's URL should change it's protocol from https to http.
    Please, find below the code in my web.xml
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>CWA Application</web-resource-name>
    <url-pattern>/about.jsp</url-pattern>
    <url-pattern>/admin_listds.jsp</url-pattern>
    <http-method>DELETE</http-method>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>*</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    <security-constraint>
    <web-resource-collection>
    <url-pattern>/*login.jsp*</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>*</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>CWA Application</realm-name>
    <form-login-config>
    <form-login-page>/login.jsp</form-login-page>
    <form-error-page>/login.jsp?error=true</form-error-page>
    </form-login-config>
    </login-config>
    <welcome-file-list>
    <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>
    My login. jsp has below code:
    <form name="login" method="POST" action='<%= response.encodeURL(*"j_security_check*") %>' >
    <tr>
    <td width="100%">
    <table width="260" border="0" cellspacing="0" cellpadding="1">
    <tr>
    <td align="left" valign="top" rowspan="4"><img src="images/space.gif" width="15" height="5"></td>
    <td align="right" class="login-user" nowrap ><p>User name: </p></td>
    <td align="left" valign="top"><input maxLength="64" name="j_username" size="20"></td>
    </tr>
    <tr>
    <td align="right" nowrap class="login-user"><p>Password: </p>
    </td>
    <td align="left" valign="top">
    <input maxLength=\"64\" tabindex="2" type="password" name="j_password" size="20">
    </td>
    </tr>
    </form>
    The entries in my server.xml are following:
    <Connector port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
    maxThreads="150" scheme="https" secure="true"
    keystoreFile="${java.home}\lib\security\cacerts" keystorePass="changeit"
    clientAuth="false" sslProtocol="TLS" />
    I have gone through the http://forums.sun.com/thread.jspa?threadID=197150 and tried implementing it; The filter as explained in the thread does gets called but the session values are still lost.
    Please note I am using javascript to go from secure "https" to "http" once the user has successfully logged in The javascript code is as below:
    top.location.href="http://localhost:8080/qtv/index.html." ;
    If I use response.sendRedirect("http://localhost:8080/qtv/index.html") for going to non-secure mode, the index.html page does not gets loaded properly. (Please note that my index.html is made of *4 frames*, as explained earlier. This is a legacy code and frames can't be removed).
    The reason for index.html not getting loaded properly is that the Address bar URL does NOT change its URL and protocol from https (https://localhost:8443/qtv/index.html ) to "*http*" (http://localhost:8080/qtv/index.html) when esponse.sendRedirect() is used ;this is the default behaviour of response.sendRedirect(). And because the protocol in address bar is https, index.html is not able to load the other JSP's in it's frames because of cross-frame-scripting security issues (The other JSP's to be loaded in frames are are NOT secure as discussed earlier).
    Please let know if any way out.
    Thanks,
    Masaai

    Hi
    try to set the maximum interval between requests
    eg:
    session.setMaxInactiveInterval(6000);
    vis

  • Help needed urgently to get the values from the jsp page.

    hi,
    I am badly stuck into this problem.Please help me and find a solution.
    I am using ms-access and jsp.
    my database structure is as given below:
    m_emp_no | from_date | to_date | approver| status |
    1002 | 22/9/2008 | 23/9/2008|1003 |pending
    1004 | 29/9/2008 | 30/9/2008|1003 |pending
    2044 | 15/9/2008 | 16/9/2008|3076 |pending
    now this is exactly a leave apply scenario where a page is displayed and the user has to fill in the details to apply leave.then the approver has to approve that leaves so even, he should get the details in his account.
    for example here 1003 has to approve leaves for 1002 & 1004.i am able to fetch data from database for the particular approver here is the coding:
    <html>
    <body>
    <h2 align="center"><u><b><span style="background-color: #FFFFFF"><font color="#C0C0C0" face="Comic Sans MS">Leave
    Approval Requests</font></span></b></u></h2>
    <form method="POST" name="f1" action="update.jsp">
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:employee_details");
    PreparedStatement p=null;
    p=con.prepareStatement("select * from emp_leave_application where approver='"+username+"'");
    ResultSet r=p.executeQuery();
    while(r.next())
    %>  <table border="1" width="100%" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
        <tr>
          <td width="100%" bgcolor="#999966"><b><u><%=r.getString(2)%></u></b></td>
        </tr>
      </table>
      <table border="1" width="100%" height="171" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
        <tr>
          <td width="100%" height="165" valign="top">
            <p align="left"><b>User ID</b>        :
    <input type="text" name="id" value="<%=r.getString(1)%>"  size="4   
         <b>status</b>:<%=r.getString(5)%</p>
    <p><b>Leave From</b> : <%=r.getString(2)%></p>
    <p><b>Leave From</b> : <%=r.getString(3)%></p>
    <p><b>Approve</b> : <select  size="1" name="approved">
            <option value="Approved">Approved</option>
            <option value="Cancelled">Cancelled</option>        </select></p>
    <%
    con.close();
    %>
      <table border="1" width="100%" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
              <tr>
                <td width="100%" bgcolor="#999966">
                  <p align="center"><input type="reset" value="Clear" name="B1"> 
                  <input type="submit" value="Submit" name="B2"></td>
              </tr>
            </table>
            </td>
        </tr>
      </table>
    </form>
    </body>
    </html>{code}
    this will display both the rows but when i try to retrieve the values into update.jsp using the code given below it gives me only one value which is the first 1002.
    {code}approved=(String)request.getParameter("approved");
    id=(String)request.getParameter("id");{code}
    but i need both the values to be inserted into the update.jsp only then the approver will be able to approve the leaves individually with respect to the m_emp_no.
    please help me out.
    thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    My comments below are all between (((((( and ))))))
    <html>
    <body>
    <h2 align="center"><u><b><span style="background-color: #FFFFFF"><font color="#C0C0C0" face="Comic Sans MS">Leave
    Approval Requests</font></span></b></u></h2>
    <form method="POST" name="f1" action="update.jsp">
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:employee_details");
    PreparedStatement p=null;
    p=con.prepareStatement("select * from emp_leave_application where approver='"+username+"'");
    ResultSet r=p.executeQuery();
    while(r.next())
    %> <table border="1" width="100%" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
    <tr>
    <td width="100%" bgcolor="#999966"><b><u><%=r.getString(2)%></u></b></td>
    </tr>
    </table>
    <table border="1" width="100%" height="171" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
    <tr>
    <td width="100%" height="165" valign="top">
    <p align="left"><b>User ID</b> :
    <input type="text" name="id" value="<%=r.getString(1)%>" size="4   
    ((((((( in the statement above, name="id" should be changed to something like name="id"<%=ii%>
    Where ii is a counter that tells you how many times you have gone through the loop so far.
    The reason for this is that each textfield you generate must have a unique name rather than all have the same name
    such as 'id'. This change will give them names such as id0, id1, id2. Then when you submit the page, you can uniquely
    identify each input textfield.))))))
    <b>status</b>:<%=r.getString(5)%</p>
    <p><b>Leave From</b> : <%=r.getString(2)%></p>
    <p><b>Leave From</b> : <%=r.getString(3)%></p>
    <p><b>Approve</b> : <select size="1" name="approved">
    (((( the above select also has to have a unique name for each time through the loop. Change it to name="approved"<%=ii%>
    <option value="Approved">Approved</option>
    <option value="Cancelled">Cancelled</option> </select></p>
    <%
    con.close();
    %>
    <table border="1" width="100%" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
    <tr>
    <td width="100%" bgcolor="#999966">
    <p align="center"><input type="reset" value="Clear" name="B1">
    <input type="submit" value="Submit" name="B2"></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    (((((((note you would be better off long term to put your business logic in a servlet and dispatch to the JSP page which will only have the responsiblity to display the data.
    Also, connection pooling is better than the above.

  • Problem launching a jsp page with eclipse and tomcat

    Hi,
    I have just started using eclipse and tomcat for creating dynamic web pages. I tried to launch a jsp page after starting the tomcat server with the URL: http://locahost:8080/HelloWorld/, an error page was displayed as below:
    HTTP Status 404 -/
    type Status report
    message /_
    description The requested resource (-) is not available
    Apache Tomcat/5.5.17
    I didn't get any error at the console and when i just typed http://localhost, a pop up menu saying that the connection was refused when attempting to contact localhost.
    I'm not sure what is the problem here. Could it be the permssion to the localhost is not granted by the system as the eclipse IDE is running using linux?
    Hope someone can help.
    Thanks.

    http://www-128.ibm.com/developerworks/library/os-ectom/

  • How to retrieve multiple data from table and represent it in jsp page

    Hi
    The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
      <html>  function addRow()
                i++;
                var newRow = document.all("tblGrid").insertRow();
                var oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                    oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
               // oCell = newRow.insertCell();
               // oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
            }<html>  Then this data are send to the next Servlet for adding into two table.
    My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
    Rows added into jsp page.
    Here is an code for that logic.
    <html>
    ArrayList<String> mucode = new ArrayList<String>();
                                ArrayList<Integer> serials = new ArrayList<Integer>();
                                ArrayList<Integer> apxrate = new ArrayList<Integer>();
                                ArrayList<Integer> srname = new ArrayList<Integer>();
                                ArrayList<String> itcode = new ArrayList<String>();
                                ArrayList<String> itname = new ArrayList<String>();
                                ArrayList<Integer> iqnty = new ArrayList<Integer>();
                                ArrayList<String> iuom = new ArrayList<String>();
                                ArrayList<Integer> pqnty = new ArrayList<Integer>();
                                ArrayList<String> puom1 = new ArrayList<String>();
                               ArrayList<Integer> arate = new ArrayList<Integer>();
                                ArrayList<String> rdate = new ArrayList<String>();
                                ArrayList<String> bcs = new ArrayList<String>();
                                ArrayList<String> ccs = new ArrayList<String>();
                                ArrayList<String> remarkss = new ArrayList<String>();
                                //ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
                                //ArrayList<String> dors = new ArrayList<String>();
                                //ArrayList<String> remarks = new ArrayList<String>();
                     String entryn = request.getParameter("entryno");       
                        String rows = request.getParameter("rows");
                        out.println(rows);  
                        //String Entryno = request.getParameter("entryno");
                       // out.println(Entryno);
                      int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
                                if(!Entryno.equals("")){
                                        entryno = Integer.valueOf(Entryno);
                                if(!rows.equals("")){
                                        rowcount = Integer.valueOf(rows);
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                                out.println(serials.size());
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                out.println(srname.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmcd"+i)!=null){
                                                itcode.add(request.getParameter("itmcd"+i).trim());
                                        } //out.println(itcode.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmnm"+i)!=null){
                                                itname.add(request.getParameter("itmnm"+i).trim());
                                        }//out.println(itname.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("indentqty"+i)!=null){
                                                iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("uom"+i)!=null){
                                                iuom.add(request.getParameter("uom"+i).trim());
                                        }//out.println(iuom.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("mcode"+i)!=null){
                                                mucode.add(request.getParameter("mcode"+i).trim());
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("packqty"+i).equals("")){
                                          pqnty.add(0);
                                        }else
                                            pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("pack"+i)!=null){
                                                puom1.add(request.getParameter("pack"+i).trim());
                                       }else
                                        puom1.add("");
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i).equals("")){                                     
                                            arate.add(0);
                                        }else
                                        arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));   
                     /* for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i)!=null){
                                                arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
                              for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dor"+i)!=null){
                                                try{
                                                        rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                                        }else
                                           { rdate.add("");}
                                   for(int i=1;i<=rowcount;i++){
                                 if(request.getParameter("bcc"+i)!=null){
                                                bcs.add(request.getParameter("bcc"+i).trim());
                                        }out.println(bcs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("ccc"+i)!=null){
                                                ccs.add(request.getParameter("ccc"+i).trim());
                                        }out.println(ccs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                    out.println("remark2");
                                        if(request.getParameter("remark2"+i)!=null){
                                                remarkss.add(request.getParameter("remark2"+i).trim());
                                        }out.println(remarkss.get(0));
                        ArrayList<String> Idate = new ArrayList<String>();
                        for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dateindent"+i)!=null){
                                                try{
                                                        Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                    String Rdate = dashdate.format(new java.util.Date());
                     String tdate = dashdate.format(new java.util.Date());    
                     // String Indentdate = dashdate.format(new java.util.Date());
                   //  String ApprovedT1 = dashdate.format(new java.util.Date());
                   //  String ApprovedT2 = dashdate.format(new java.util.Date());
                       // String ApprovedT1=" ";
                        //String ApprovedT2="";*/
                    String ApprovedT1= dashdate.format(new java.util.Date());
                   out.println (ApprovedT1);
                      String ApprovedT2=dashdate.format(new java.util.Date());
                       out.println(ApprovedT2);
                    String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
                       out.println(Indentdate);
                        String Cocode ="BML001";  
                        out.println(Cocode);
                        String Deptcode = request.getParameter("dept1");
                        out.println(Deptcode);
                        String Empcode = request.getParameter("emp");
                        out.println(Empcode);
                        String Refno =request.getParameter("rtype"); 
                         out.println(Refno);
                        String Divcode = request.getParameter("todiv1");
                        out.println(Divcode);
                        String Usercode = "CIRIUS";    
                         String Whcode = request.getParameter("stor");
                        out.println(Whcode);
                        // String Itemgroupcode = request.getParameter("");
                         String Itemgroupcode ="120000";
                         out.println(Itemgroupcode);
                        String Supplytypecode = request.getParameter("stype");
                        out.println(Supplytypecode);
                        String Delcode = request.getParameter("deliverycode");
                        out.println(Delcode);
                        String Itemclass="WS";
                        out.println(Itemclass);
                        // String Itemclass = request.getParameter("iclass");
                       // out.println(Itemclass);
                        String unitcode = request.getParameter("uni");
                        out.println(unitcode);
                         String Todivcode = request.getParameter("todiv1");
                        out.println(Todivcode);
                        String Appxrate = request.getParameter("rate");
                        out.println(Appxrate);
                        String Srno = request.getParameter("srno");
                        out.println(Srno);                
                    /*    String Indqty = request.getParameter("indentqty");
                      out.println(Indqty);*/
                  String Itemcode = request.getParameter("itmcd");
                       out.println(Itemcode);
                       String Othersp = request.getParameter("remark1");
                        out.println(Othersp);
                        String Reqdt = request.getParameter("dor");
                        out.println(Reqdt);
                        String Munitcode = request.getParameter("mcode");
                        out.println(Munitcode);
                        String Packqty = request.getParameter("packqty");
                        out.println(Packqty);               
                        String Packuom = request.getParameter("pack");
                        out.println(Packuom);
                        String Remark2 = request.getParameter("remark2");
                        out.println(Remark2);
                        String BC = request.getParameter("bcc");
                        out.println(BC);
                        String CC = request.getParameter("ccc");
                        out.println(CC);
                        try{
                            st=connection.createStatement();
                            connection.setAutoCommit(false);
                            String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
                            out.println(sql);
                            st.addBatch(sql);
                            for(int i=0;i<serials.size();i++){
                                out.println("Inside the Statement");
                                String query3="test query for u";
                                out.println(query3);
                               String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
                               out.println(queryx);
                                st.addBatch(queryx);
                           int[] result=st.executeBatch();
                           connection.commit();
                           for(int k=0;k<result.length;k++)
                           out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
                        catch(BatchUpdateException bue)
                        out.println("error1;"+bue+"");
                        catch(SQLException sql)
                        out.println("error2;"+sql+"");
                        catch(Exception l)
                        out.println("error3;"+l+"");
    </html>
       Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
    I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
    I have able to show the data in Header portions of page in this ways
    here i am adding the part of code which shows the data from header part of table i.e from Header table
      <html>
    <h2 align="center"><b>Indent Preparation</b></h2>
        <div align="left">
            <table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
                <tr>
                    <td ><div align="left"><b>Indent No.</b></div></td>
                    <td ><label>
                            <input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
                    </label></td>
                    <td ><div align="center"><strong>Indent Date</strong></div></td>
                    <td ><label>
                            <div align="center">
                                <input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
                            </div>
                    </label></td>
                    <td> </td>
                    <td><div align="right"><strong>Entry No.</strong></div></td>
                     <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
            <td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
    <%}else{%>
                   <td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
                             <%}%>
                            <div align="right"></div>
                </tr>
                <tr>
                    <td><b>Division</b></td>
                    <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
    <td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
    <%}else{%>
                   <td><input type="text" name="div" id="div" /></td>
                   <td><input type="hidden" name="div1" id="div1" /> </td>
              <%}%>
                    <td> </td>
                    <td> </td>
                    <td><div align="right"><strong>Unit</strong></div></td>
                   <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
    <td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
    <%}else{%>
                   <td><input type="text" name="unit" id="unit" /></td>
                   <td><input type="hidden" name="uni" id="uni" /> </td>
              <%}%>
                </tr>
                <tr>
    </html>
      Any suggestion on any above works is highly appreciated.
    Thanks and regards
    harshal

    Too much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
    I will only answer the question in the thread's subject:
    How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
    To display, make use of JSTL's c:forEach.

  • Error, package does not exist, thrown when calling jsp page

    Hi
    I have downloaded sample jsp pages for interaction with Crystal reports. When I compile these jsp pages in NetBeans 3.6 there are no problems. When I deploy these pages and associated libraries to Tomcat 5, I get the following error when attempting to call the jsp page, but all the jars used in NetBeans are present in the web-inf/lib directory and I have looked in the jars and found classes in the com.crystaldecisions.report.web.viewer package. I have been unable to find any information after googling and looking at the jakarta bug database. What am I doing wrong?
    The error...
    2004-09-22 17:40:30 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 1 in the jsp file: /CrystalReportsInteractiveViewer.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java:9: package com.crystaldecisions.report.web.viewer does not exist
    import com.crystaldecisions.report.web.viewer.*;
    ^
    E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java:180: cannot resolve symbol
    symbol : class CrystalReportInteractiveViewer
    location: class org.apache.jsp.SimplePreviewReport_jsp
    CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer();
    ^
    An error occurred at line: 1 in the jsp file: /CrystalReportsInteractiveViewer.jsp
    Generated servlet error:
    E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java:180: cannot resolve symbol
    symbol : class CrystalReportInteractiveViewer
    location: class org.apache.jsp.SimplePreviewReport_jsp
    CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer();
    ^
    An error occurred at line: 1 in the jsp file: /CrystalReportsInteractiveViewer.jsp
    Generated servlet error:
    Note: E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    3 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
         at java.lang.Thread.run(Thread.java:534)
    The offending page is ....
    <%
    /*==========================================================================
    INSTANTIATE THE VIEWER AND DISPLAY THE REPORT THROUGH THE INTERACTIVE VIEWER
    ============================================================================
        - Create a Viewer object
        - Set the source for the  viewer to the client documents report source
        - Process the http request to view the report
        - Dispose of the viewer object
    // Create an Interactive Viewer
    CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer();
    // Set the name for the interactive viewer
    viewer.setName("Crystal_Report_Interactive_Viewer");
    // Set the source for the interacive viewer to the client documents report source
    viewer.setReportSource(clientDoc.getReportSource());
    // Process the http request to view the report
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    // Dispose of the viewer object
    viewer.dispose();
    %>included in...
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*"%>
    <%@ page import="com.crystaldecisions.report.web.viewer.*"%>
    <html>
    <head>
    <title>Begin Here - Simple Preview Report</title>
    </head>
    <body>
    <%
    /*=================================================================
    WORKING WITH THE REPORT APPLICATION SERVER AND JSP TO VIEW REPORTS
    ===================================================================
    Authors Name: Ken Andony
    Technology supported by the app: Report Application Server
      ALWAYS REQUIRED STEPS
       - Create a new Report Application Session
       - Create a Report Application Server (RAS) Service
       - Set the RAS Server to be used for the service
       - Initialize the RAS Service
       - Create the report client document object
       - Set the RAS Server to be used for the report client document
       - Open the report, and set the open type to Read Only
      INSTANTIATE THE REPORT VIEWER
       - Create a Viewer object
       - Set the source for the viewer to the client documents report source
       - Process the http request to view the report
       - Dispose of the viewer object
    ==================================================================*/
    * This line creates a string variable called reportname that we will use to pass
    * the Crystal Report filename (.rpt file) to the OpenReport method contained in
    * the AlwaysRequiredSteps.jsp.
    String reportName ="SimplePreviewReport.rpt";
    %>
    <%
    /* ALWAYS REQUIRED STEPS
      Include the file AlwaysRequiredSteps.jsp which contains the code
      for steps:
       - Create a new Report Application Session
       - Create a Report Application Server (RAS) Service
       - Set the RAS Server to be used for the service
       - Initialize the RAS Service
       - Create the report client document object
       - Set the RAS Server to be used for the report client document
       - Open the report, and set the open type to Read Only */
    %>
    <%@ include file="AlwaysRequiredSteps.jsp"%>
    <%
    /* INSTANTIATE THE REPORT VIEWER
      There are three Report Viewers:
      1.  Crystal Reports Interactive Viewer
      2.  Crystal Reports Viewer
      3.  Crystal Reports Parts Viewer
      The choices are CrystalReportsInteractiveViewer.jsp, CrystalReportsViewer.jsp,
      CrystalReportsPartsViewer.jsp
      Note that to use this include you must have the appropriate .jsp file in the
      same virtual directory as the main jsp page.
      =============================================================================
        DISPLAY THE REPORT
        - display the report using one of the Thin Client DHTML viewers
       Include one of the DHTML Viewers.
        - Crystal Reports Interactive Viewer          =   CrystalReportsInteractiveViewer.jsp
        - Crystal Reports Viewer                                        =   CrystalReportsViewer.jsp
        - Crystal Reports Parts Viewer                         =   CrystalReportsPartsViewer.jsp
        Note** - To use the report parts viewer successfully you are required to
        choose and name three objects in the report to Node0, Node1 and Node2.
        You can access an objects name by using the Format Editor dialog box.
        For more information on the Format Editor Dialog Box and setting objects
        names, please refer to the Help Contents (Help Menu->Crystal Reports Help)
        or by pressing F1
      =============================================================================*/
    %>
    <%@ include file="CrystalReportsInteractiveViewer.jsp" %>
    </body>
    </html>

    Thanks Tien-Chih Wang. It worked...well I'm getting a new set of errors, but progress has been made!
    I understand that if placed in the common directory the jar will be available to all webapps but why does it make a difference whether a jar file is placed under the $TOMAT_HOME/common/lib or $TOMAT_HOME/webapps/appname/web-inf/lib directory if I only need to access the jar from one webapp?

  • Print Button on JSP page prints title,time etc

    Hi I have aprint Button on my jsp page which prints whatever I want selectively using the <style tags>
    <style type="text/css" media=print>
    .noprint { display: none}
    .noscreen { color: black }
    </style>
    <style type="text/css" media=screen>
    .noscreen { display: none}
    .noprint { color: blue }
    </style>
    <SCRIPT Language="Javascript">
    function printit(){
    window.print();
    </SCRIPT>
    My print Button calls the JavaScript and prints everything that does not have a class=noprint in it... When I print however it also prints on the page
    -The Title on the Left Top corner
    - Page 1 of 1 on RIGHT TOP
    - 2/13/03 on Left bottom
    - 4:06 thats the time on the RIGHT BOTTOM
    Is there anyway I can prevent it from printing this?

    These probably come from the browser. Check if your browser is configured to print these on every page that is printed. If so, you can turn these of from the browser's Page Setup dialog.

Maybe you are looking for

  • Extending the desk top, adding a second monitor/screen

    Hi, I bought an Apple Mini-DVI to VGA adapter that allows me to plug my 20" vga monitor into my imac so that I can have more screen space. I had hoped to be able to drag files over to the 20" screen. That works, but when plugged into my imac, the 20"

  • Iphoto Book order Error message

    I have been trying to place a rather simple order for an Iphoto 6x8 book for 4 days now, and continue to get an error message " An unexpected Error has occurred" Please try again later. Hours on tech support, reloading updates, stripping prefs, doubl

  • N80 Battery - Help Please

    I have just bought a N80 and I'm having problems with the battery. It has been charged fully and lasted fine throughout the day including making a few calls sending texts etc.. I have gone to bed (with battery still showing full)and set an alarm for

  • How do I crop in inches in Photoshop CS6 Bridge?

    I could do it so easy in CS5, but when I go to the crop tool in the bridge then hit on custom I no longer see the drop down arrow where I could change to inches etc. I only see crop ratio. I also find the crop tool in PSCS6 much harder to use. Thanks

  • Restricting Web Service Access from specific machines (IP)

    Is there any way by which we can restrict access of our web service to some specific machines i.e., restricting to some specific IPs.