How to print a JSP page ?

HI,
I need to implement a printing functionality on a JSP page.
So I have a JSP page and there wud be a button on top of it.There is one table containing around 20 columns. So I jusst want to print that table out and nothng else from page.
So when user clicks on Print button , whcih will open a new window and show the contents to be printed.Once user click Print bbutton on this second newly opened window it shud print.
Can any one provide pointer to any link or help to implement this?
Thanks in advance..
javaardentfan

You can do it using javascript, see the following JSP code and follow it.
put the code in DIV tags that you do not wat to see in the final print
previewRpt() javascript method does all the work..
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%-- jsf:pagecode language="java" location="/JavaSource/pagecode/jsp/reports/OrderEditDetailsPopup.java" --%><%-- /jsf:pagecode --%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
<HTML>
<HEAD>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
     pageEncoding="ISO-8859-1"%>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="../../theme/Master.css" rel="stylesheet" type="text/css">
<LINK rel="stylesheet" href="../../theme/EOPS.css" type="text/css">
<LINK REL="stylesheet" TYPE="text/css" HREF="../../theme/menus.css" />
<TITLE>Option Order Edit Details</TITLE>
<LINK rel="stylesheet" type="text/css" href="../../theme/stylesheet.css"
     title="Style">
<script language="javascript">
function previewRpt() {
     document.getElementById("buttonsArea").style.display="none";
     document.getElementById("buttonArea").style.display="none";
     if (document.all) {
          var OLECMDID = 7;
          /* OLECMDID values:
          * 6 - print * 7 - print preview * 1 - open window * 4 - Save As
          var PROMPT = 1; // 2 DONTPROMPTUSER
          var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
          document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
          WebBrowser1.ExecWB(OLECMDID, PROMPT);
          WebBrowser1.outerHTML = "";     
          window.PrintArea.innerHTML = "<div class='formlabel'>Please Click the X on the window to close!</div>"
          window.close();
     } else {
          window.print();
</script>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
</HEAD>
<f:view>
     <BODY onload="javascript:scrollTop=0"><hx:scriptCollector id="scriptCollector1">
          <div style="visibility:hidden">
               <hx:commandExButton type="button" value="Close"
               styleClass="custbutton1" id="button2">
          </hx:commandExButton>
          </div>
          <div id="buttonsArea">
               <table cellpadding="0" cellspacing="0" border="0" width="100%">
               <tr>
               <td></td>
               <td align="right">
                    <input type="image" src="../../images/printRest.gif" title="Print This report"
                              onclick="previewRpt()"/>
               </td>
               </tr>
               </table>
          </div>
          <TABLE width="100%">
               <TR><TD align="center"> <h3>Order Edit Detail Report</h3></TD></TR>
               <TR><TD align="center"> Order Id # <c:out value="${ORDER_HEADER_ID}"></c:out> Details</TD></TR>
          </TABLE>
     <BR>
          <TABLE class="grooved" border="1" cellpadding="0" cellspacing="0">
               <TR><TD class="formlabel">Account</TD><TD><c:out value="${PART1.ACCOUNT}"> </c:out></TD></TR>
               <TR><TD class="formlabel">Order Status</TD><TD><c:out value="${PART1.ORDER_STATUS}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Order Number</TD><TD><c:out value="${PART1.ORDER_NO}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Sales Rep #</TD><TD><c:out value="${PART1.SALES_REP_NO}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Order Date</TD><TD><c:out value="${PART1.ORDER_DATE}"></c:out> </TD></TR>
               <TR><TD class="formlabel">PO</TD><TD><c:out value="${PART1.PO}"></c:out> </TD></TR>
               <TR><TD class="formlabel">School or Institution Name</TD><TD><c:out value="${PART1.SCHOOL_NAME}"></c:out> </TD></TR>
               <TR><TD class="formlabel">District or Parent Institution Name</TD><TD><c:out value="${PART1.DISTRICT_NAME}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Account Name</TD><TD><c:out value="${PART1.ACCOUNT_NAME}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Attention</TD><TD><c:out value="${PART1.ATTENTION}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Miscellaneous</TD><TD><c:out value="${PART1.MISC}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Street Address</TD><TD><c:out value="${PART1.STREET}"></c:out> </TD></TR>
               <TR><TD class="formlabel">City</TD><TD><c:out value="${PART1.CITY}"></c:out> </TD></TR>
               <TR><TD class="formlabel">State</TD><TD><c:out value="${PART1.STATE}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Zip</TD><TD><c:out value="${PART1.ZIP}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Contact Phone</TD><TD><c:out value="${PART1.CONTACT_PH}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Contact Fax</TD><TD><c:out value="${PART1.CONTACT_FAX}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Pack By</TD><TD><c:out value="${PART1.PACK_BY}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Ship On Date</TD><TD><c:out value="${PART1.SHIP_ON_DATE}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Order Ship Via</TD><TD><c:out value="${PART1.ORDER_SHIP_VIA}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Customer Default Ship Via</TD><TD><c:out value="${PART1.CUSTOMER_DEFAULT_SHIP_VIA}"></c:out> </TD></TR>
               <TR><TD class="formlabel">Warehouse</TD><TD><c:out value="${PART1.WAREHOUSE}"></c:out> </TD></TR>
          </TABLE>
          <BR>
          <c:if test="${PART2_FOUND eq 'YES'}">
          <h:form styleClass="form" id="form1"><h:dataTable border="1" cellpadding="2" cellspacing="0" columnClasses="columnClass1" headerClass="headerClass" footerClass="footerClass" rowClasses="rowClass1" styleClass="dataTable" id="table1" value="#{PART2}" var="rpt" rows="40">
               <h:column id="column1">
                    <f:facet name="header">
                         <h:outputText id="text1" styleClass="outputText" value="Product Title"></h:outputText>
                    </f:facet>
                    <h:outputText styleClass="outputText" id="text11" value="#{rpt.PRODUCT_TITLE}"></h:outputText>
               </h:column>
               <h:column id="column2">
                    <f:facet name="header">
                         <h:outputText styleClass="outputText" value="Product Code" id="text2"></h:outputText>
                    </f:facet>
                    <h:outputText styleClass="outputText" id="text12" value="#{rpt.PRODUCT_CODE}"></h:outputText>
               </h:column>
               <h:column id="column3">
                    <f:facet name="header">
                         <h:outputText styleClass="outputText" value="Order QTY" id="text3"></h:outputText>
                    </f:facet>
                    <h:outputText styleClass="outputText" id="text13" value="#{rpt.ORDER_QTY}"></h:outputText>
               </h:column>
               <h:column id="column4">
                    <f:facet name="header">
                         <h:outputText styleClass="outputText" value="Customer Service QTY" id="text4"></h:outputText>
                    </f:facet>
                    <h:outputText styleClass="outputText" id="text14" value="#{rpt.CUSTOMER_SERVICE_QTY}"></h:outputText>
               </h:column>
               <h:column id="column5">
                    <f:facet name="header">
                         <h:outputText styleClass="outputText" value="Sales Admin QTY" id="text5"></h:outputText>
                    </f:facet>
                    <h:outputText styleClass="outputText" id="text15" value="#{rpt.SALES_ADMIN_QTY}"></h:outputText>
               </h:column>
               <h:column id="column7">
                    <f:facet name="header">
                         <h:outputText styleClass="outputText" value="Product Price" id="text7"></h:outputText>
                    </f:facet>
                    <h:outputText styleClass="outputText" id="text17" value="#{rpt.PRODUCT_PRICE}"></h:outputText>
               </h:column>
               <h:column id="column8">
                    <f:facet name="header">
                         <h:outputText styleClass="outputText" value="Extended Cost" id="text8"></h:outputText>
                    </f:facet>
                    <h:outputText styleClass="outputText" id="text18" value="#{rpt.EXTENDED_COST}"></h:outputText>
               </h:column>
               <h:column id="column9">
                    <f:facet name="header">
                         <h:outputText styleClass="outputText" value="Gratis" id="text9"></h:outputText>
                    </f:facet>
                    <h:outputText styleClass="outputText" id="text19" value="#{rpt.GRATIS}"></h:outputText>
               </h:column>
               <h:column id="column10">
                    <f:facet name="header">
                         <h:outputText styleClass="outputText" value="Series" id="text10"></h:outputText>
                    </f:facet>
                    <h:outputText styleClass="outputText" id="text20" value="#{rpt.SERIES}"></h:outputText>
               </h:column>
                    <f:facet name="footer">
                         <hx:panelBox styleClass="panelBox" id="box1">
                                   <hx:pagerDeluxe styleClass="pagerDeluxe" id="deluxe1" />
                              </hx:panelBox>
                    </f:facet>
               </h:dataTable></h:form>
          </c:if>
          <br>
          <div id="buttonArea">     
          <center><hx:commandExButton type="button" value="Close"
               onclick="window.close();" styleClass="custbutton1" id="button1">
          </hx:commandExButton></center>
          </div>
          <BR>
     </hx:scriptCollector></BODY>
</f:view>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
</HEAD>
</HTML>

Similar Messages

  • How to open a JSP page from a form ??? plz help

    hi ..
    i want to know how to open a jsp page from a oracle apps form using a button .
    the requirement is that whenever we click on the button created on the form, it opens a jsp page.
    plz help me ..its urgent !! :-(

    In portlet project, to navigate between pages, you should not use the URL property to link to a page. Instead, portlets use navigation via action handling. You use the Page Navigation editor to set up links to pages; that is, the navigation editor sets the action property.
    Here is an example to hyperlink ans button to open a new page:
    # From within the IDE, create a new portlet project. This action creates the project and one page, PortletPage1.jsp.
    # Create a second portlet page, called PortletPage2.jsp, for the project.
    # Drop a Hyperlink component onto the first portlet page, PortletPage1. (You can drop the Hyperlink on the page in the Design window or on the PortletPage1 node in the Outline window.) Change the Hyperlink's text property to Next Page.
    # Drop a Button component (found in the Basic section of the Palette) onto the second portlet page, PortletPage2.
    # Open the Page Navigation Editor. It displays the two pages (PortletPage1.jsp and PortletPage2.jsp) of the application.
    # Click the PortletPage1.jsp icon in the Navigation window to expand it, and then drag a connector from hyperlink1 to PortletPage2.jsp. Change the name of the connector from case1 to Page2.
    # Click the PortletPage2.jsp icon in the Navigation window to expand it, and then drag a connector from button1 to PortletPage1.jsp. Change the name of the connector from case1 to Page1.
    # Run and deploy the portlet. The browser displays PortletPage1 and you should see the Next Page hyperlink. When you click the Next Page hyperlink, the Apache Pluto Portal server displays PortletPage2. Click the Page2 button to return to PortletPage1.
    Sherry
    Creator Team

  • How to call a jsp page from oaf and run in jDeveloper

    Hi all,
    I created sample jsp and then tried.
    String temp = "sample.jsp?";
    pageContext.setForwardURL(temp,
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    It worked.
    But when i tried with one of the custom page that i downloaded from server it is giving error.
    But now i need to call that page.
    Its Code is given on below link:
    Re: how to call a jsp page from oaf
    Please help me to do this.
    Thanks in advance.
    Regards,
    Raj

    Raj,
    1. Hope you have placed the custom jsp page (which you have downloaded from server) under "jdevhome\jdev\myhtml\OA_HTML" directory ?
    2. Try to run the custom jsp page from Jdeveloper directly and check whether its working properly or not ?
    (i.e. add jsp page to any project in Jdeveloper then right click on jsp page and select Run xxx.jsp)
    3. If page errors out then custom jsp page seems require few parameters to run it successfully. Pass all requied parameters and test.
    4. There is no problem in the way you are calling jsp page from OAF page.
    regards,
    Anand

  • 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

  • How to print envelopes in pages, How to print envelopes in pages

    How to print envelopes in pages, How to print envelopes in pages

    I presume you are using the Pages application, is that correct?
    So start off by launching Pages and choose one of the regular envelope styles. Traditional works well for me.
    Next go to the File menu and select Page setup. From the menu that says Paper Size select Manage Custom Sizes. In the resulting dialog, there should be a button on the left labeled "+". Click it. In the Paper Size area, select Width 5 in and Height 7 in. Name the size (where it says "untitled" something descriptive like "5 x 7 envelope". Click the OK button. The Paper Size menu here should now say the description you gave it. Click OK again. Your work area should now be a 5 x 7 envelope.
    Best of luck.
    PS If you are using Word or some other program, the process is probably the same or very similar.

  • How to redirect a JSP page after the session is killed

    Hello!
    I am quite new to JSP. I have a question about how to redirect a jsp page after the session is killed. Could anyone help?
    thanks a lot in advance!

    You can't, directly. There's no connection betweenthe server and browser.
    even after invalidating the session. we can do it
    directly using the statement
    response.sendRedirect("....");
    or we can use the meta refresh tag.if session is invalidated and if we try to do response.sendRedirect(".. ") it throws IllegalStateException

  • Tutorial on how to print  multiple output pages

    Hi,
    I am rather sad that this forum does not provide a simple principle on how to printout multiple pages to newbie.
    Below is a short contribution from me on how to print across multiple pages, other reader are also encourage to modify the code to provide more robust tutorial .
    * How to use java to print across pages that are more than one
    * Short contribution to java forum by Eric gan (Malaysia)
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.print.*;
    import java.awt.Graphics2D;
    import java.awt.print.*;
    import java.awt.print.Book;
    import java.awt.print.Pageable;
    import java.awt.Graphics2D;
    import java.awt.Graphics;
    public class Example implements Printable {
    //--- Private instances declarations
    private int row_cnt=30; // set the total number of row per page
    private int cum_row_cnt=30; // set the counter to record total number of row per page to determine
    // whether maximum pages should be increase depending on the programme requirement
    private int max_pg=0; // set the maximum number of page
    public Example () {
    //--- Create a printerJob object
    PrinterJob printJob = PrinterJob.getPrinterJob ();
         printJob.setPrintable(Example.this);
    if (printJob.printDialog()) {
    try {
    printJob.print();
    } catch (Exception PrintException) {
    PrintException.printStackTrace();
    public void paint (Graphics g) {
    Graphics2D g2d;
    g2d = (Graphics2D) g;     
    int x=10;
    int y=10;
    for (int outline=0;outline<=160;outline+=20){
              if (y>cum_row_cnt){
              cum_row_cnt+=row_cnt;//counter should grow by value equal to row_cnt
         max_pg++;
         g2d.drawString("outline value ---> " +outline , x, y);
         y+=10; // to set the row printing interval      
    } // end of paint procedure
         public int print(Graphics g,
    PageFormat pf, int pi)
              throws PrinterException {
    // normal routine to check when should java stop the print looping
    if (pi >max_pg) {
    return Printable.NO_SUCH_PAGE;
    Graphics2D g2 = (Graphics2D) g;
         int fontHeight=g2.getFontMetrics().getHeight();
         int fontDesent=g2.getFontMetrics().getDescent();
         double pageHeight = pf.getImageableHeight()-fontHeight;
         double pageWidth = pf.getImageableWidth();
         // setting for the translate and graphics clipping to enable printing on output pages
    // row_cnt can be equal to pageHeight
    // in this examples assumming pageHeight=20 rows           
         g2.translate(pf.getImageableX(), pf.getImageableY());
    g2.translate(0f,-pi*row_cnt);
    g2.setClip(0, (int)(row_cnt* pi),
    (int) Math.ceil(pageWidth),
    (int) Math.ceil(row_cnt));
    paint(g2);
    return Printable.PAGE_EXISTS;
    public static void main (String [] args) {
    Example example = new Example ();
    System.exit (0);
    Thank

    Hello
    I know that Pages is using its own algorithm to resize pages when it put several of them on a single sheet.
    This is why I use this tip.
    I draw a rectangle whose size is supposed to be the final one.
    I give it a white background and a black border whose thickness is set to one point.
    For the tests I just insert three page breaks so that the document is a four pages one.
    I print it as is.
    Doing that, I may measure the printed rectangle.
    Of course, at first attempt it doesn't match the required size.
    It's easy to compute the required adjustments.
    When the correct factor is reached, it is easy to build the complete document so that it prints the correct size.
    Doing that I never got odd results but maybe it's because I am a lucky guy.
    Of course, disagreeing with one advice doesn't mean that I don't respect it.
    I respect your opinion, _on other matters too_
    Yvan KOENIG (from FRANCE mardi 6 mai 2008 17:24:09)

  • How to get the jsp page name in jsp?

    how to get the jsp page name in jsp? how the jsp get the jsp page name dynamic.
    thanks in advance.

    Try request.getServletPath()

  • How to test the JSP pages and sevlets using JUnit. ?

    How to test the JSP pages using JUnit. How to configure what are all the steps to execute the JUnit test cases.

    Hi xiepei,
    since you are using modbus, a simple error checking is implicit in the protocol and is the comparison between returned checksum and the calculated one on the received message: checksum errors, if any, are an effect of communications errors (you should have at least 2 bits changed and on particular patterns to have the checksum be calculated correctly!). You won't be able to calculate BER on them, but you can calculate PER (Packet Error Rate).
    Another flag for communication errors, on the other direction, is to intercept error messages from the device: if it fully implements modbus protocol, it should return some warning in case of error (I seem to remember that in some cases it returns the reveived message with some error bits added: please check in modbus documentation).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How can WLS use JSP pages in a Web Application witth just a JRE [Web Application, WAR, JSP, weblogic.jsp.pageCheckSeconds and JRE]

              How can WLS use JSP pages in a Web Application (either a .war file or a war directory structure) without a java compiler?
              I suspect either the JSP specification is flawed (i.e. it doesn't take account of servers using just a JRE), or BEA's implementation is broken.
              Production servers do not have a JDK installed. They only have a JRE. Therfore a java compiler is not present on the machine that the Web Application is deployed onto.
              On the development machine, when the server is requested to load the JSP it creates a tmpwar directory within the Web Application directory structure. This is then included in the resultant .war file thus:
              D:\war>jar -tf gmi.war
              META-INF/
              META-INF/MANIFEST.MF
              gmiService.jsp
              WEB-INF/
              WEB-INF/classes/
              WEB-INF/classes/com/
              WEB-INF/classes/com/bt/
              WEB-INF/classes/com/bt/gmi/
              WEB-INF/classes/com/bt/gmi/gmiService.class
              WEB-INF/getList.xsl
              WEB-INF/getListByConnection.xsl
              WEB-INF/getListByDistrict.xsl
              WEB-INF/getListByDistrictConnection.xsl
              WEB-INF/lib/
              WEB-INF/source/
              WEB-INF/source/build.bat
              WEB-INF/source/gmiService.java
              WEB-INF/web.xml
              WEB-INF/weblogic.xml
              tmpwar/
              tmpwar/jsp_servlet/
              tmpwar/jsp_servlet/_gmiservice.class
              tmpwar/jsp_servlet/_gmiservice.java
              When deployed on the production server with the web.xml file set to use the following values (note XML stripped):
              weblogic.jsp.pageCheckSeconds
              -1
              weblogic.jsp.precompile
              false
              weblogic.jsp.compileCommand
              javac
              weblogic.jsp.verbose
              true
              weblogic.jsp.packagePrefix
              jsp_servlet
              weblogic.jsp.keepgenerated
              false
              And in the weblogic.properties file:
              weblogic.httpd.webApp.gmi=war/gmi
              I've also tried with the .war file, but that insists on creating another tmpwar directory outside of the .war file.
              Then, although I have set pageCheckSeconds to -1 (don't check and don't recompile) ter production server still attempts to recompile the JSP's:
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param verbose initialized to: true
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param packagePrefix initialized to: jsp_servlet
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param compileCommand initialized to: javac
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param srcCompiler initialized to weblogic.jspc
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param superclass initialized to null
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param workingDir initialized to: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param pageCheckSeconds initialized to: -1
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: initialization complete
              Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java file: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java
              Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java failed: Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main
              java.io.IOException: Compiler failed executable.exec([Ljava.lang.String;[javac, -classpath, /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:/opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4boot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudscape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/weblogic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib/weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses:/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer/weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/wls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, -d, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java])
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.io.IOException.<init>(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:187)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:118)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:142)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              

    The default Java compiler from sun lives in the tools.jar that comes with
              the JDK. Just add that to your set of JARs which are deployed in production
              and you should be fine. No need to install the full JDK - just make the
              tools.jar available to WebLogic.
              Regards
              James
              James Strachan
              =============
              email: [email protected]
              web: http://www.metastuff.com
              "Martin Webb" <[email protected]> wrote in message
              news:[email protected]...
              >
              > How can WLS use JSP pages in a Web Application (either a .war file or a
              war directory structure) without a java compiler?
              >
              > I suspect either the JSP specification is flawed (i.e. it doesn't take
              account of servers using just a JRE), or BEA's implementation is broken.
              >
              > Production servers do not have a JDK installed. They only have a JRE.
              Therfore a java compiler is not present on the machine that the Web
              Application is deployed onto.
              >
              > On the development machine, when the server is requested to load the JSP
              it creates a tmpwar directory within the Web Application directory
              structure. This is then included in the resultant .war file thus:
              >
              > D:\war>jar -tf gmi.war
              > META-INF/
              > META-INF/MANIFEST.MF
              > gmiService.jsp
              > WEB-INF/
              > WEB-INF/classes/
              > WEB-INF/classes/com/
              > WEB-INF/classes/com/bt/
              > WEB-INF/classes/com/bt/gmi/
              > WEB-INF/classes/com/bt/gmi/gmiService.class
              > WEB-INF/getList.xsl
              > WEB-INF/getListByConnection.xsl
              > WEB-INF/getListByDistrict.xsl
              > WEB-INF/getListByDistrictConnection.xsl
              > WEB-INF/lib/
              > WEB-INF/source/
              > WEB-INF/source/build.bat
              > WEB-INF/source/gmiService.java
              > WEB-INF/web.xml
              > WEB-INF/weblogic.xml
              > tmpwar/
              > tmpwar/jsp_servlet/
              > tmpwar/jsp_servlet/_gmiservice.class
              > tmpwar/jsp_servlet/_gmiservice.java
              >
              > When deployed on the production server with the web.xml file set to use
              the following values (note XML stripped):
              >
              > weblogic.jsp.pageCheckSeconds
              > -1
              >
              > weblogic.jsp.precompile
              > false
              >
              > weblogic.jsp.compileCommand
              > javac
              >
              > weblogic.jsp.verbose
              > true
              >
              > weblogic.jsp.packagePrefix
              > jsp_servlet
              >
              > weblogic.jsp.keepgenerated
              > false
              >
              >
              > And in the weblogic.properties file:
              >
              > weblogic.httpd.webApp.gmi=war/gmi
              >
              > I've also tried with the .war file, but that insists on creating another
              tmpwar directory outside of the .war file.
              >
              >
              > Then, although I have set pageCheckSeconds to -1 (don't check and don't
              recompile) ter production server still attempts to recompile the JSP's:
              >
              >
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              verbose initialized to: true
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              packagePrefix initialized to: jsp_servlet
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              compileCommand initialized to: javac
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              srcCompiler initialized to weblogic.jspc
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              superclass initialized to null
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              workingDir initialized to:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              pageCheckSeconds initialized to: -1
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp:
              initialization complete
              > Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java
              file:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java
              > Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java failed: Exception in thread "main" java.lang.NoClassDefFoundError:
              sun/tools/javac/Main
              >
              > java.io.IOException: Compiler failed
              executable.exec([Ljava.lang.String;[javac, -classpath,
              /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:
              /opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4bo
              ot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudsc
              ape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/web
              logic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/
              5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib
              /weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses
              :/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer
              /weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/w
              ls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiSe
              rver/weblogic/war/gmi/_tmp_war, -d,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java])
              > at java.lang.Throwable.fillInStackTrace(Native Method)
              > at java.lang.Throwable.fillInStackTrace(Compiled Code)
              > at java.lang.Throwable.<init>(Compiled Code)
              > at java.lang.Exception.<init>(Compiled Code)
              > at java.io.IOException.<init>(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              > at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              > at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
              7)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :118)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :142)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:744)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:692)
              > at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:251)
              > at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              > at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              >
              >
              >
              

  • How to print 2 sided pages brochure

    how to print 2 sided pages brochure

    Hello kaskasnikola,
    I understand that you need to print 2 pages per page.
    1 Open the printer driver, and click the Finishing tab.
    2 Select the number of pages per sheet from the Pages
    per sheet drop-down list.
    3 Select the correct options for Print page borders,
    Page order, and Orientation.
    4 Click OK.
    If you are having any problems please post on our printer forums.
    Here is a link to the forum.

  • How to run a jsp page

    hello to all of u
    i m bit comfortable with SERVLET and please tell me that how to run a JSP page.i m using TOMCAT.
    someplace it is written that " write the program ,save under the root of tomcat i.e in my system it is tomcat 4.1 and to store in tomcat4.1\helloworld.jsp ,,, and then after start the server write in the url --:
    http://localhost:8080/hello.jsp.
    but it is giving error while running.please tell me the procedure.
    thank you
    bye

    Why oh WHY do you want to fiddle with the server.xml file?
    You don't need to.
    Under tomcat is a directory called "Webapps"
    This is where you put your web applications.
    You will see there is an existing one there called ROOT - which funnily enough is the root one used for Tomcat.
    If you put your hello.jsp in the ROOT directory, http://localhost:8080/hello.jsp will work.
    However it is not recommended to use the ROOT directory. Make your own one.
    Create a new directory in the "Webapps" directory eg "test"
    Put your jsps in here.
    under test create a directory called "WEB-INF"
    Copy the web.xml file from [TOMCAT_HOME]/webapps/ROOT/web-inf into the new web-inf directory.
    Now go to http://localhost:8080/test/hello.jsp
    Cheers,
    evnafets

  • How to integrate BIBean JSP page with Portal after deploying to iAS?

    Hi all,
    Right now we can deploy a JSP page contains BI Bean crosstab to iAS and can display the page using this url: http://xxx.xxx.xxx.xxx:7779/Application2/Analyze1.jsp.
    BIBean version: 10.1.2.0.2
    JDEV version: 10.1.2.1.0
    iAS version: 10.1.2
    Then according to a sample: http://otn.oracle.com/products/bib/htdocs/samples/samples_overview.html
    , we should test PDKProviderAdapter, but we don't know how to create a provider for it. In the sample project "Portal" I can find a "provider" floder contains provider.xml under the "web content" node.
    My question is : how to create the provider? which document or example can we refer to for help. Eagerly waiting for help.
    Thanks in advance.
    Scott

    thnx for your response.
    Basically we need to develop few JSP pages and that will insert data into the Oracle tables. These tables will hold user information for further processing. Now the requirement is to call these JSP pages from OBI dashboard. We can easily call the JSP pages if OBI runs on OC4J (that we have checked). But in our production environment we are having IIS server to run OBI. So our concern is how to deploy these JSP pages on IIS server?

  • Recursive Print in JSP page

    I have a tree like structure in my java code and I want to print the output in my JSP page. Any idea how to perform recursive print in a JSP page.

    Couldnt U just use a while loop something like the following...
    <table>
    <%
    while(tree.next()){
    %>
    <tr>
    <td><%=tree.getString("output") %></td>
    <td><%=tree.getString("output2") %></td>
    </tr>
    <%
    } %>
    </table>
    or your version of that...
    Assuming U have Ur tree.next returning a false when it gets to the end.
    Hope I helped.
    - meMyselfAndI

  • Print in jsp page

    hi,
    I using jsp to develop webpage. From that i need to print a small size identity cards. while i design, it shows in corner of webpage and remain space are as whitespace.
    also i using print() in javascript to print.
    how to print a page with small size.?
    thanks in advance.,
    edi

    Couldnt U just use a while loop something like the following...
    <table>
    <%
    while(tree.next()){
    %>
    <tr>
    <td><%=tree.getString("output") %></td>
    <td><%=tree.getString("output2") %></td>
    </tr>
    <%
    } %>
    </table>
    or your version of that...
    Assuming U have Ur tree.next returning a false when it gets to the end.
    Hope I helped.
    - meMyselfAndI

Maybe you are looking for

  • Capture Crash After OS 10.5.3 Update

    I'm having a fit with Final Cut Pro 6 since I upgraded to Mac OS X 10.5.3. Now when I go to Log and Capture and start my DV deck (a Sony DSR-11), FCP captures video, but won't stop when you press the ESC key. I'm having to force quit the application

  • Cleanly stop a process in an  XI adapter module

    Hi, I have a java adapter module that decides whether the process should carry on or not. When I want to stop the process I throw an UnsupportedOperationException that is reported in Runtime Workbench -> system monitoring. Are there any other means t

  • Finding lost songs in my iTunes library

    I have an external hard drive that I share between work and home PCs; however, I store all my music files on such drive and synch my iPod on the home computer. After upgrading my iTunes library on the work computer, I experienced some technical issue

  • JDBC Batch Updates & PreparedStatement problems (Oracle 8i)

    Hi, we're running into problems when trying to use JDBC Batch Updates with PreparedStatement in Oracle8i. First of all, Oracle throws a SQLException if one of the statements in the batch fails (e.g. because of a unique constraint violation). As far a

  • Importing BAPI Signatures from Backend System to  ABAP System

    Dear Friends, I wanted to Import several BAPI (RFC Enabled) Signatures from Backend System (ABAP System) to ABAP System. Is there any tool or Transaction in SAP to do import in single shot? Please let me know if anyone know the procedure. Thanks and