Help with formatting parameters in html output?

Hi --
I would like to use a style sheet to adjust the way that javadoc displays lists of parameters below each method. In the HTML output, the code around the parameter name and description looks like this:
<dd><code>filterContainers</code> - True if the containers within the database
are to be considered individually during task assignment; false if the entire database is to be assigned as a single task.
</dd>
I apologize if this is basic CSS question, but I don't understand how to change the way 'filterContainers' is formatted -- maybe make it italic or something. I was also hoping to increase the padding below each parameter name/description because they seem to squished together.
Any help is greatly appreciated.
Jen

Add this to stylesheet.css to make "filterContainers" italic:
dl dd dl dd code {
font-style: italic;
}This adds space below lines inside dd
dl dd dl dd {
padding-bottom: 3px;
}(You could change it to padding-top to add the space above instead.)
The sequence "dl dd dl dd code" is the nested hierarchy of HTML tags relative to body.
Here are the CSS elements defined above: (CSS 2.0)
http://www.w3.org/TR/2005/WD-CSS21-20050613/propidx.html

Similar Messages

  • Help with URL Parameters and HTML DataSet please.

    Hello everybody!
    Looking at the example page: "Using URL Parameters to Control Data Regions", towards the bottom it gives an example of "Set by Product Name", from an XML DataSet using the following sample code:
        //Data set for the second example. var ds2 = new Spry.Data.XMLDataSet("../../demos/products/products.xml", "products/product");    //If the URL parameter 'product' has a value, set the XPath that includes a filter and then load the data. if (params.product){    ds2.setXPath("products/product[name = '"+params.product+"']");    ds2.loadData(); }
    Can anyone please explain how to amend this to work with a HTML Dataset rather than XML?
    The first example on the page (Set by RowID) works unchanged for the HTML DataSet, but I don't know what I should replace the 'setXPath' line with.
    I see this has been asked before, but I'm afraid I can't find any answer that works (or, more often, that I can understand properly!)
    Grateful for any suggestions.
    Len

    Wow! Thanks Ben.
    I hadn't thought about using Stacked Containers.
    I'll test this out tonight and let you know how I get on.
    Cheers,
    Len
    A few days later and at last I've been able to test your suggestions.
    I think I must be doing something wrong as the links and content don't work at all:
    http://www.myosanthe-bernhard-huber.com/html/stack1.php
    I know that the stacked containers do work (http://www.myosanthe-bernhard-huber.com/html/stack0.php), so I guess there are some errors in the coding somewhere.
    Would you mind reviewing, please?
    The important thing for me (in this case, anyway) is to get the called page's content using its 'Ref', and I'm not sure what benefit there is in using stacked containers as opposed to master-detail containers.
    The master-detail method works reasonably well for me at
    http://www.myosanthe-bernhard-huber.com/html/fotoalbum.php and sub-pages.
    Perhaps I am betraying my lack of knowledge, but as I said in my original post, I think that I just need the HTMLDataSet equivalent to:
        //Data set for the second example.
    var ds2 = new Spry.Data.XMLDataSet("../../demos/products/products.xml", "products/product");
       //If the URL parameter 'product' has a value, set the XPath that includes a filter and then load the data.
    if (params.product){
       ds2.setXPath("products/product[name = '"+params.product+"']");
       ds2.loadData();
    which as you can see uses an XMLDataSet, but does exactly what I need.
    (see http://labs.adobe.com/technologies/spry/samples/data_region/DataWithURLParams.html)
    Thanks again for your help, Ben.
    Len
    Message was updated by: ec1lennie

  • Help with interpreting explain plan (dbms_xplan) output

    Hi all,
    I'm trying to get to grips with reading and interpreting the explain plan or dbms_xplan output, and so I hope someone can help with the output below.
    So, with the explain shown below, does it mean that...
    a) it starts with step 8 and sends all rows to the nested loop in step 5
    b) it only sends (or thinks it sends) 1 row to step 5 from step 8
    c) For each row supplied from step 5, there will be an index lookup at step 8 to access the table at step 6
    d) Step 8 only gets (or think it gets) 1 row
    If it does mean that only 1 row is expected by the optimizer, and yet the full table scan should return 150,000 records, and the table has up to date statistiucs, what else would cause the cardinality to be so far off?
    If it doesn't mean it will return 1 row then what does it mean ?
    | Id  | Operation                           | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                    |                                |       |       |   945 (100)|          |
    |   1 |  SORT GROUP BY                      |                                |     1 |   283 |   945   (3)| 00:00:05 |
    |*  2 |   FILTER                            |                                |       |       |            |          |
    |   3 |    NESTED LOOPS                     |                                |       |       |            |          |
    |   4 |     NESTED LOOPS                    |                                |     1 |   283 |   944   (3)| 00:00:05 |
    |   5 |      NESTED LOOPS                   |                                |     1 |   108 |   929   (3)| 00:00:05 |
    |*  6 |       MAT_VIEW ACCESS FULL          | DEMOGRAPHICS_MV                |     1 |    97 |   927   (3)| 00:00:05 |
    |*  7 |       MAT_VIEW ACCESS BY INDEX ROWID| NAMES_MV                       |     1 |    11 |     2   (0)| 00:00:01 |
    |*  8 |        INDEX RANGE SCAN             | ORG_MV_IDX1                    |     1 |       |     1   (0)| 00:00:01 |
    |*  9 |      INDEX RANGE SCAN               | PAY_IDX8                       |   252 |       |     4   (0)| 00:00:01 |
    |* 10 |     TABLE ACCESS BY INDEX ROWID     | PAY_ALL                        |     1 |   175 |    15   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
          8 - access("ORG_MV"."ORG_ID"="DEMO_MV"."ORG_ID")Many thanks for your help.

    Thank you Hemant and rp0428,
    I read through that white paper which was really useful.
    I ran query using GATHER_PLAN_STATISTICS and go tthe Estimate and Actual rows - wow - it is a long way out!!
    | Id  | Operation                           | Name                           | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time   | A-Rows |   A-Time   | Buffers | Reads  |  OMem |  1Mem | Used-Mem |
    |   0 | SELECT STATEMENT                    |                                |      1 |        |       |   945 (100)|          |      0 |00:18:11.39 |    2552K|    361K|       |       |          |
    |   1 |  SORT GROUP BY                      |                                |      1 |      1 |   283 |   945   (3)| 00:00:05 |      0 |00:18:11.39 |    2552K|    361K|  1024 |  1024 |          |
    |*  2 |   FILTER                            |                                |      1 |        |       |            |          |      0 |00:18:11.39 |    2552K|    361K|       |       |          |
    |   3 |    NESTED LOOPS                     |                                |      1 |        |       |            |          |      0 |00:18:11.39 |    2552K|    361K|       |       |          |
    |   4 |     NESTED LOOPS                    |                                |      1 |      1 |   283 |   944   (3)| 00:00:05 |     44M|00:04:59.03 |     598K|  63442 |       |       |          |
    |   5 |      NESTED LOOPS                   |                                |      1 |      1 |   108 |   929   (3)| 00:00:05 |    109K|00:00:01.73 |    7807 |      7 |       |       |          |
    |*  6 |       MAT_VIEW ACCESS FULL          | DEMOGRAPHICS_MV                |      1 |      1 |    97 |   927   (3)| 00:00:05 |    126K|00:00:00.26 |    5417 |      1 |       |       |          |
    |*  7 |       MAT_VIEW ACCESS BY INDEX ROWID| NAMES_MV                       |    126K|      1 |    11 |     2   (0)| 00:00:01 |    109K|00:00:01.27 |    2390 |      6 |       |       |          |
    |*  8 |        INDEX RANGE SCAN             | ORG_MV_IDX1                    |    126K|      1 |       |     1   (0)| 00:00:01 |    126K|00:00:00.69 |    2023 |      6 |       |       |          |
    |*  9 |      INDEX RANGE SCAN               | PAY_IDX8                       |    109K|    252 |       |     4   (0)| 00:00:01 |     44M|00:04:03.07 |     590K|  63435 |       |       |          |
    |* 10 |     TABLE ACCESS BY INDEX ROWID     | PAY_ALL                        |     44M|      1 |   175 |    15   (0)| 00:00:01 |      0 |00:13:09.85 |    1954K|    297K|       |       |          |
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------When I unravel the WHERE clause and remove the decode(nvl statements (which only evaluate the passed in parameters and provide default values where they are NULL) I get a much better plan and values
    | Id  | Operation                        | Name                           | Starts | E-Rows |E-Bytes| Cost (%CPU)| E-Time   | A-Rows |   A-Time   | Buffers | Reads  |  OMem |  1Mem | Used-Mem |
    |   0 | SELECT STATEMENT                 |                                |      1 |        |       |   157K(100)|          |      0 |00:00:43.10 |     343K|  45190 |       |       |          |
    |   1 |  SORT GROUP BY                   |                                |      1 |      1 |   283 |   157K  (1)| 00:13:47 |      0 |00:00:43.10 |     343K|  45190 |  1024 |  1024 |          |
    |   2 |   NESTED LOOPS                   |                                |      1 |        |       |            |          |      0 |00:00:43.10 |     343K|  45190 |       |       |          |
    |   3 |    NESTED LOOPS                  |                                |      1 |      1 |   283 |   157K  (1)| 00:13:47 |      0 |00:00:43.10 |     343K|  45190 |       |       |          |
    |*  4 |     HASH JOIN                    |                                |      1 |      1 |   272 |   157K  (1)| 00:13:47 |      0 |00:00:43.10 |     343K|  45190 |   720K|   720K|  171K (0)|
    |*  5 |      TABLE ACCESS BY INDEX ROWID | PAY_ALL                        |      1 |      2 |   350 |   156K  (1)| 00:13:43 |      0 |00:00:43.10 |     343K|  45190 |       |       |          |
    |*  6 |       INDEX RANGE SCAN           | PAY_IDX7                       |      1 |   3596K|       | 15565   (1)| 00:01:22 |   7251K|00:00:50.88 |   45190 |  45190 |       |       |          |
    |*  7 |      MAT_VIEW ACCESS FULL        | DEMOGRAPHICS_MV                |      0 |    126K|    11M|   919   (2)| 00:00:05 |      0 |00:00:00.01 |       0 |      0 |       |       |          |
    |*  8 |     INDEX RANGE SCAN             | ORG_MV_IDX1                    |      0 |      1 |       |     1   (0)| 00:00:01 |      0 |00:00:00.01 |       0 |      0 |       |       |          |
    |*  9 |    MAT_VIEW ACCESS BY INDEX ROWID| NAMES_MV                       |      0 |      1 |    11 |     2   (0)| 00:00:01 |      0 |00:00:00.01 |       0 |      0 |       |       |          |
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Even though the result set is zero, the time to establish this came down from 35 minutes to 30 seconds and the plan has changed and is using a different index now!
    Thanks for your help!

  • Help with Formatted Search with Date

    Hi experts,
    I need help with the following query. In the PO item level, I want to take a user entered date and add 6 weeks to it. For example, after a user enters in a date in the field u_Date1, then U_date2 will populate with U_date1 + 6 weeks.
    I can get the query to copy the U_Date1 field. However, once I add 6 weeks (+42) then I get an internal error. Please advise.
    select $[por1.u_date1] + 42
    from por1 t0
    inner join t1 on t0.docentry = t1.docentry
    where t0.linenum = $[por1.linenum] and
    t1.docentry = $[opor.docentry]
    Thank you for your help.  i am on 2007A PL 47.
    Jane

    Hi Jane Liang ,
    you can try this : Select  DateAdd(day,42,$http://por1.u_date1 )  from por1 t0  .....
    regards
    H2

  • Help with new site index.html

    I'm new to website design/hosting/etc so I apologize for the newbie questions.  I'm using DW8
    I have a hobby site on a free host and have been using it for 2+ years without problems.  Recently I decided to re-design the website.  When I uploaded the new website in place of the old one the host kept saying that the file was not found.  So I re-loaded the old site and everything worked fine.  So just for kicks I uploaded the NEW index.html file in place of the old one, and again the website could not be found.
    So is there something actually wrong with my NEW index.html root file, or do I need to do something else in DW to upload a new site in place of an old one?  I have no idea what could be wrong with the new index file; I created it just like I did the old one.
    Thanks in advance, joel

    Before you upload next time click on Site->Advanced->FTP log.  See if you get any errors with that.
    If you are not and the files are uploading ok, you may need to get in touch with your host.  If something is not working on the account it could be something on their end, whether it be configuration errors or some other random occurrence. 

  • Help with formatting multiline output into comma delimited ordered output

    I have 2 tables:
    SQL> desc table_1;
    Name Null? Type
    ===================================
    ID NOT NULL NUMBER
    DATA1 NOT NULL VARCHAR2(440)
    DATA2 NOT NULL VARCHAR2(1024)
    SQL> desc table_2;
    Name Null? Type
    ===================================
    ID NOT NULL NUMBER
    ATTNAME NOT NULL VARCHAR2(255)
    ATTVAL                          VARCHAR2 (4000)
    DATA1 NOT NULL CHAR(1)
    DATA2                          VARCHAR2 (2000)
    DATA3                          VARCHAR2 (255)
    I need to get ATTVAL from where e.g. ATTNAME=att_name1 to ATTNAME=att_name6 from every entry (with its unique ID), and format the output into comma delimited format in e.g. this order:
    att_val1,att_val3,att_val6,att_val4,att_val5,att_val6
    So e.g. for entry with ID "9812" from the query below, the output I need would be:
    187,179,156,134,1436,1809
    What I've got so far is as follows:
    SQL> SELECT id,attname,attval FROM table_2 WHERE id in (SELECT id from table_1 WHERE data2='xxx')
    AND attname in ('att_name1','att_name3','att_name6','att_name4','att_name5','att_name6');
    ID               ATTNAME               ATTVAL
    ===============================
    1970 att_name1 123
    1970 att_name2 abc
    1970 att_name3 1234
    1970 att_name4 def
    1970 att_name5 1134
    1970 att_name6 ghj
    9812 att_name4 134
    9812 att_name5 1436
    9812 att_name3 156
    9812 att_name1 187
    9812 att_name2 179
    9812 att_name6 1809
    77 att_name1 1980
    77 att_name5 1867
    77 att_name3 174
    77 att_name4 1345
    77 att_name2 1345
    77 att_name6 1345
    but I don't know how to format the output comma limited in certain order. (or if this is the best way of getting the data out)
    Would someone have idea how this could be done?

    846954 wrote:
    Thanks Frank!
    I got much further now :).
    I've got Oracle 10g So I used the "SYS_CONNECT_BY_PATH" for my query.
    Now I get the output in the format I want, however, it comes out in the order that the attributes are (which is pretty random).The values you posted are in order: 'attval1' < 'attval2' < ...
    So I'm using this now(had to use "|" as separator because SYS_CONNECT_BY_PATH would not work with comma due to some of the attval having comma in them ):The values you posted don't contain and commas.
    You're hiding what the problem is. It would really help if you posted actual data. It always helps if you post CREATE TABLE and INSERT statements for a little sample data, and the results you want from that data.
    Assuming you really have something that has to be in a certain order, and that order is not based on anything in the values themselves, then DECODE might be a good way to do it. Storing the sort value in a table might be even better.
    It looks like you were using an Oracle 9 exanple. In Oracle 10, using SYS_CONNECT_BY_PATH is simpler:
    SELECT     id
    ,     LTRIM ( SYS_CONNECT_BY_PATH (attval, '|')
               , '|'
               )          AS attvals
    FROM     (
              SELECT     id
              ,     attval
              ,     ROW_NUMBER () OVER ( PARTITION BY  id
                                  ORDER BY          DECODE (...)
                                )     AS curr
              WHERE     id     IN (
                             SELECT  id
                             FROM     table_1
                             WHERE     data2     = 'xxx'
              AND     attname     IN ('attname1','attname2','attname3','attname4','attname5','attname6')
    WHERE     CONNECT_BY_ISLEAF     = 1
    START WITH     curr     = 1
    CONNECT BY     curr     = PRIOR curr + 1
         AND     id     = PRIOR id
    ;You don't need two almost-identical ROW_NUMBERs; one will do just fine.

  • Problem with passing parameters from HTML

    Im unsure as to where to turn next with this problem. What is making it all the more infuriating is that I have had this code working previously and now cant for the life of me figure out how I did it.
    What Im trying to do is I have a HTML page with two buttons on, one called "Submit Application" and the other "Submit Resource" and when I click on one I want a JSP page to be called and a certain piece of SQL to be executed, likewise when I click on the other "Submit Application" button I want a separate bit of SQL to be executed. (I know in this example both bits of SQL are identical but that is just while I get the functionality correct).
    Whats happening is that the first bit of SQL will execute if I click the "Submit Resource" button, however when I click the "Submit Application"
    button I get a "Error 500:" displayed. Im at the end of my tether as to what to do next and as I say it makes it all the more infuriating in that I had it working before. So any help would be greatly appriciated.
    The code is as follows, I have highlighted the two IF statements :-
    <HTML>
    <FORM>
    <BODY>
    <%@ page import="java.util.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="javax.sql.*" %>
    <%@ page import="javax.naming.*" %>
    <HTML>
    <HEAD>
    <TITLE>Resource Level Report</TITLE>
    <table width="200" border="1" align="center">
    <tr>
    <th scope="row"><img src="color_teradata_logo.gif"> </th>
    <td></td>
    <td><img src="lloydslogo.gif"></td>
    </tr>
    </table>
    <br>
    </HEAD>
    <BODY leftmargin=0 topmargin=0 marginwidth="0" marginheight="0">
    <%
    String dbURL="jdbc:oracle:thin:@lloyds.unitedkingdom.ncr.com:1521:smacdev";
    String dbUSER="agents";
    String dbPW="smac_us";
    String Resrce = request.getParameter("Resrce"); String Appln = request.getParameter("app"); String Subres = request.getParameter("Submit Resource"); String Subapp = request.getParameter("Submit Application"); Connection con = null;
    if (!Subres.equals (null)) {
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection(dbURL, dbUSER, dbPW); } catch(SQLException e) { System.err.println("Failure to connect " + e.getMessage()); }
    if (!Subres.equals (null)) {
    try
    String sqlstring = "Select app.application, res.resorce, res.system, res.status, res.unitofworkname, res.unitofworkvalue, res.capturetimestamp from agents.Resorce res, agents.applicationresource app where res.resorce = app.resorce and res.system = app.system and upper(res.resorce) = upper('"+ Resrce + "') order by 3";
    //out.println(sqlstring);
    //out.println(Subapp);
    //out.println(Subres);
    //commented this out, but enable you to see SQL that is been executed !!!
    Statement stmt = con.createStatement();
    ResultSet res = stmt.executeQuery(sqlstring);
    int count =0;
    %>
    <table width ="380" border="0" align="center">
    <h1 align="center">Resource Level Reporting</h1>
    </table>
    <br>
    <table width="200" border="6" align="center" >
    <th bgcolor="#FF9933">System<th bgcolor="#FF9933">Resource<th
    bgcolor="#FF9933">Application<th bgcolor="#FF9933">Unit Of Work Name<th
    bgcolor="#FF9933">Timestamp <th bgcolor="#FF9933">Unit Of Work Value<th
    bgcolor="#FF9933">Status<tr>
    <%
    while (res.next()){
    String app= res.getString(1);
    String resorce = res.getString(2);
    String system = res.getString(3);
    String status = res.getString(4);
    String unitofworkname = res.getString(5);
    String unitofworkvalue = res.getString(6);
    String capturetimestamp = res.getString(7);
    String timestampmod = capturetimestamp.substring (0,19);
    String status1 = status.trim();%>
    <% if (status1.equals ("SYNC")) { %>
    <tr>
    <td bgcolor="#00FF33">
    <%out.print(system);%>
    <td bgcolor="#00FF33">
    <%out.print(resorce);%>
    <td bgcolor="#00FF33">
    <%out.print(app);%>
    <td bgcolor="#00FF33">
    <%out.print(unitofworkname);%>
    <td bgcolor="#00FF33">
    <%out.print(timestampmod);%>
    <td bgcolor="#00FF33">
    <%out.print(unitofworkvalue);%>
    <td bgcolor="#00FF33">
    <%out.print(status);%>
    <% }
    else if (status1.equals ("OOS")) { %>
    <tr>
    <td bgcolor="red">
    <%out.print(system);%>
    <td bgcolor="red">
    <%out.print(resorce);%>
    <td bgcolor="red">
    <%out.print(app);%>
    <td bgcolor="red">
    <%out.print(unitofworkname);%>
    <td bgcolor="red">
    <%out.print(timestampmod);%>
    <td bgcolor="red">
    <%out.print(unitofworkvalue);%>
    <td bgcolor="red">
    <%out.print(status);}%>
    <%
    res.close();
    stmt.close();%>
    <tr>
    </table>
    <%
    catch (SQLException e) {
    out.println("Sql error here " + e.getMessage());
    finally {
    con.close();
    %>
    <%
    if (!Subapp.equals (null)) {
    try
    String sqlstring = "Select app.application, res.resorce, res.system,
    res.status, res.unitofworkname, res.unitofworkvalue, res.capturetimestamp
    from agents.Resorce res, agents.applicationresource app where res.resorce =
    app.resorce and res.system = app.system and upper(res.resorce) = upper('"+
    Resrce + "') order by 3";
    //out.println(sqlstring);
    //out.println(Subapp);
    //out.println(Subres);
    //commented this out, but enable you to see SQL that is been executed !!!
    Statement stmt = con.createStatement();
    ResultSet res = stmt.executeQuery(sqlstring);
    int count =0;
    %>
    <table width ="380" border="0" align="center">
    <h1 align="center">Resource Level Reporting</h1>
    </table>
    <br>
    <table width="200" border="6" align="center" >
    <th bgcolor="#FF9933">System<th bgcolor="#FF9933">Resource<th
    bgcolor="#FF9933">Application<th bgcolor="#FF9933">Unit Of Work Name<th
    bgcolor="#FF9933">Timestamp <th bgcolor="#FF9933">Unit Of Work Value<th
    bgcolor="#FF9933">Status<tr>
    <%
    while (res.next()){
    String app= res.getString(1);
    String resorce = res.getString(2);
    String system = res.getString(3);
    String status = res.getString(4);
    String unitofworkname = res.getString(5);
    String unitofworkvalue = res.getString(6);
    String capturetimestamp = res.getString(7);
    String timestampmod = capturetimestamp.substring (0,19);
    String status1 = status.trim();%>
    <% if (status1.equals ("SYNC")) { %>
    <tr>
    <td bgcolor="#00FF33">
    <%out.print(system);%>
    <td bgcolor="#00FF33">
    <%out.print(resorce);%>
    <td bgcolor="#00FF33">
    <%out.print(app);%>
    <td bgcolor="#00FF33">
    <%out.print(unitofworkname);%>
    <td bgcolor="#00FF33">
    <%out.print(timestampmod);%>
    <td bgcolor="#00FF33">
    <%out.print(unitofworkvalue);%>
    <td bgcolor="#00FF33">
    <%out.print(status);%>
    <% }
    else if (status1.equals ("OOS")) { %>
    <tr>
    <td bgcolor="red">
    <%out.print(system);%>
    <td bgcolor="red">
    <%out.print(resorce);%>
    <td bgcolor="red">
    <%out.print(app);%>
    <td bgcolor="red">
    <%out.print(unitofworkname);%>
    <td bgcolor="red">
    <%out.print(timestampmod);%>
    <td bgcolor="red">
    <%out.print(unitofworkvalue);%>
    <td bgcolor="red">
    <%out.print(status);}%>
    <%
    res.close();
    stmt.close();%>
    <tr>
    </table>
    <%
    catch (SQLException e) {
    out.println("Sql error here " + e.getMessage());
    finally {
    con.close();
    %>
    </BODY>
    </FORM>
    </HTML>
    I think the error messages I am getting are :-
    [15/09/04 12:38:36:535 BST] 45b5f97b WebGroup I SRVE0180I: [SMAC Web Front End] [smac] [Servlet.LOG]: /JSP/Resreports.jsp: init
    [15/09/04 12:39:08:510 BST] 7abd7978 WebGroup I SRVE0180I: [SMAC Web Front End] [smac] [Servlet.LOG]: /JSP/Resreports.jsp: init
    [15/09/04 12:39:15:273 BST] 7abd7978 WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
         at org.apache.jsp._Resreports._jspService(_Resreports.java:117)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
         at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(Compiled Code))
         at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java(Compiled Code))
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))

    You make your comparisons like this:
    if (!Subapp.equals (null))
    Well, what happens if Subapp IS equal to null. The .equals method call will be called from a NULL and you will get a NullPointerException.
    When testing for null you do:
    if (Subapp == null) (or if (Subapp != null)
    This is okay when dealing objects even with the mantra of 'don't use == to compare objects, because what you are really testing is if the reference points anywhere, and == will compare the reference.
    Also, next time you post, make sure to use the [code] tags as described in the [Formatting Help] link. It will make it easier to read.
    Also, you should try to remove the SQL from the JSP. Move it into a Servlet which builds a List that forwards to another JSP for display, or use a bean. Using java classes like Servlets and JavaBeans makes it easier to debug, and makes your JSP code easier to manage.

  • Help with code to print HTML in Java 5

    Hi,
    The following code works and runs successfully..
    However, the printing in Java 1.4.2_03 is better than Java 5 (latest version).
    i.e in particular the characters are not monospaced compared with compiling with Java 1.4.2_03. e.g si so ss squashed together.
    This issue does not seem to occur when running the same code in Java 1.4.2_03. (I haven't tried other 1.4.2 java versions).
    Any help would be appreciated. We really need this working under Java 5 or bust.
    Here is the complete listing ... PrintHtml.java (it uses the DocumentRenderer)
    and following this is the input file.
    import javax.swing.text.html.HTMLDocument;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.io.IOException;
    import java.io.DataInputStream;
    import java.io.InputStream;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import java.lang.reflect.*;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Rectangle;
    import java.awt.Shape;
    import java.awt.print.PageFormat;
    import java.awt.print.Printable;
    import java.awt.print.PrinterException;
    import java.awt.print.PrinterJob;
    import javax.swing.JEditorPane;
    import javax.swing.text.Document;
    import javax.swing.text.PlainDocument;
    import javax.swing.text.View;
    import javax.swing.text.html.HTMLDocument;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    import java.text.ParseException;
    public class PrintHtml {
         * Utility helper to convert HTML Text to HTML Document.
         * @param baseUrl URL to be used in order
         * to resolve relative HTML references, in lieu of an
         * HTML BASE tag. May be null, if not required or HTML
         * BASE tag is to be used.
         * @see jbox.view.jfx.JboxHtmlEditor
         * @see jbox.utility.JboxPrint
         * @see jbox.utility.JboxPrintUtil
      public static HTMLDocument htmlTextToHtmlDoc(String htmlText, URL baseUrl)
              try
              //  JboxHtmlEditorKit editorKit = new JboxHtmlEditorKit();
                HTMLEditorKit editorKit = new HTMLEditorKit();
                HTMLDocument doc = (HTMLDocument)editorKit.createDefaultDocument();
                   if (baseUrl != null)
                        try
                             doc.setBase(baseUrl);
                        catch(Exception e)
                             //JboxTraceManager.trace(e);
                   StringReader reader = new StringReader(htmlText);
                   editorKit.read(reader, doc, 0);
             return doc;
              catch(Exception e)
                   //JboxTraceManager.trace(e);
                   return null;
       public static void main(String[] args) {
          System.out.println("printing...");
          HTMLDocument x = new HTMLDocument();
          DocumentRenderer invoice = new DocumentRenderer();
          //invoice.setScaleWidthToFit(false);
          String s = "";
          try {
            BufferedInputStream bis = new BufferedInputStream(new FileInputStream("mark.html"));
            InputStreamReader in = new InputStreamReader(bis , "ASCII");
            StringWriter sw = new StringWriter();
            while (true) {
               int datum = in.read();
               if (datum == -1) break;
               sw.write(datum);
            in.close();
            s = sw.toString();
            System.out.println("s="+s);
          catch (IOException e) {
             System.err.println(e);
          HTMLDocument htmldoc = htmlTextToHtmlDoc(s, null);
          invoice.print(htmldoc);
    // the good old infamous DocumentRenderer.
    /*  Copyright 2002
        Kei G. Gauthier
        Suite 301
        77 Winsor Street
        Ludlow, MA  01056
    class DocumentRenderer implements Printable {
    /*  DocumentRenderer prints objects of type Document. Text attributes, including
        fonts, color, and small icons, will be rendered to a printed page.
        DocumentRenderer computes line breaks, paginates, and performs other
        formatting.
        An HTMLDocument is printed by sending it as an argument to the
        print(HTMLDocument) method. A PlainDocument is printed the same way. Other
        types of documents must be sent in a JEditorPane as an argument to the
        print(JEditorPane) method. Printing Documents in this way will automatically
        display a print dialog.
        As objects which implement the Printable Interface, instances of the
        DocumentRenderer class can also be used as the argument in the setPrintable
        method of the PrinterJob class. Instead of using the print() methods
        detailed above, a programmer may gain access to the formatting capabilities
        of this class without using its print dialog by creating an instance of
        DocumentRenderer and setting the document to be printed with the
        setDocument() or setJEditorPane(). The Document may then be printed by
        setting the instance of DocumentRenderer in any PrinterJob.
      protected int currentPage = -1;               //Used to keep track of when
                                                    //the page to print changes.
      protected JEditorPane jeditorPane;            //Container to hold the
                                                    //Document. This object will
                                                    //be used to lay out the
                                                    //Document for printing.
      protected double pageEndY = 0;                //Location of the current page
                                                    //end.
      protected double pageStartY = 0;              //Location of the current page
                                                    //start.
      protected boolean scaleWidthToFit = true;     //boolean to allow control over
                                                    //whether pages too wide to fit
                                                    //on a page will be scaled.
    /*    The DocumentRenderer class uses pFormat and pJob in its methods. Note
          that pFormat is not the variable name used by the print method of the
          DocumentRenderer. Although it would always be expected to reference the
          pFormat object, the print method gets its PageFormat as an argument.
      protected PageFormat pFormat;
      protected PrinterJob pJob;
    /*  The constructor initializes the pFormat and PJob variables.
      public DocumentRenderer() {
        pFormat = new PageFormat();
        pJob = PrinterJob.getPrinterJob();
    /*  Method to get the current Document
      public Document getDocument() {
        if (jeditorPane != null) return jeditorPane.getDocument();
        else return null;
    /*  Method to get the current choice the width scaling option.
      public boolean getScaleWidthToFit() {
        return scaleWidthToFit;
    /*  pageDialog() displays a page setup dialog.
      public void pageDialog() {
        pFormat = pJob.pageDialog(pFormat);
    /*  The print method implements the Printable interface. Although Printables
        may be called to render a page more than once, each page is painted in
        order. We may, therefore, keep track of changes in the page being rendered
        by setting the currentPage variable to equal the pageIndex, and then
        comparing these variables on subsequent calls to this method. When the two
        variables match, it means that the page is being rendered for the second or
        third time. When the currentPage differs from the pageIndex, a new page is
        being requested.
        The highlights of the process used print a page are as follows:
        I.    The Graphics object is cast to a Graphics2D object to allow for
              scaling.
        II.   The JEditorPane is laid out using the width of a printable page.
              This will handle line breaks. If the JEditorPane cannot be sized at
              the width of the graphics clip, scaling will be allowed.
        III.  The root view of the JEditorPane is obtained. By examining this root
              view and all of its children, printView will be able to determine
              the location of each printable element of the document.
        IV.   If the scaleWidthToFit option is chosen, a scaling ratio is
              determined, and the graphics2D object is scaled.
        V.    The Graphics2D object is clipped to the size of the printable page.
        VI.   currentPage is checked to see if this is a new page to render. If so,
              pageStartY and pageEndY are reset.
        VII.  To match the coordinates of the printable clip of graphics2D and the
              allocation rectangle which will be used to lay out the views,
              graphics2D is translated to begin at the printable X and Y
              coordinates of the graphics clip.
        VIII. An allocation Rectangle is created to represent the layout of the
              Views.
              The Printable Interface always prints the area indexed by reference
              to the Graphics object. For instance, with a standard 8.5 x 11 inch
              page with 1 inch margins the rectangle X = 72, Y = 72, Width = 468,
              and Height = 648, the area 72, 72, 468, 648 will be painted regardless
              of which page is actually being printed.
              To align the allocation Rectangle with the graphics2D object two
              things are done. The first step is to translate the X and Y
              coordinates of the graphics2D object to begin at the X and Y
              coordinates of the printable clip, see step VII. Next, when printing
              other than the first page, the allocation rectangle must start laying
              out in coordinates represented by negative numbers. After page one,
              the beginning of the allocation is started at minus the page end of
              the prior page. This moves the part which has already been rendered to
              before the printable clip of the graphics2D object.
        X.    The printView method is called to paint the page. Its return value
              will indicate if a page has been rendered.
        Although public, print should not ordinarily be called by programs other
        than PrinterJob.
      public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) {
        double scale = 1.0;
        Graphics2D graphics2D;
        View rootView;
    //  I
        graphics2D = (Graphics2D) graphics;
        disableDoubleBuffering(jeditorPane);
    //  II
        jeditorPane.setSize((int) pageFormat.getImageableWidth(),Integer.MAX_VALUE);
        jeditorPane.validate();
    //  III
        rootView = jeditorPane.getUI().getRootView(jeditorPane);
    //  IV
        if ((scaleWidthToFit) && (jeditorPane.getMinimumSize().getWidth() >
        pageFormat.getImageableWidth())) {
          scale = pageFormat.getImageableWidth()/
          jeditorPane.getMinimumSize().getWidth();
          graphics2D.scale(scale,scale);
    //  V
        graphics2D.setClip((int) (pageFormat.getImageableX()/scale),
        (int) (pageFormat.getImageableY()/scale),
        (int) (pageFormat.getImageableWidth()/scale),
        (int) (pageFormat.getImageableHeight()/scale));
    //  VI
        if (pageIndex > currentPage) {
          currentPage = pageIndex;
          pageStartY += pageEndY;
          pageEndY = graphics2D.getClipBounds().getHeight();
    //  VII
        graphics2D.translate(graphics2D.getClipBounds().getX(),
        graphics2D.getClipBounds().getY());
    //  VIII
        Rectangle allocation = new Rectangle(0,
        (int) -pageStartY,
        (int) (jeditorPane.getMinimumSize().getWidth()),
        (int) (jeditorPane.getPreferredSize().getHeight()));
    //  X
        if (printView(graphics2D,allocation,rootView)) {
          return Printable.PAGE_EXISTS;
        else {
          pageStartY = 0;
          pageEndY = 0;
          currentPage = -1;
          return Printable.NO_SUCH_PAGE;
      /** The speed and quality of printing suffers dramatically if
       *  any of the containers have double buffering turned on.
       *  So this turns if off globally.
       *  @see enableDoubleBuffering
      public static void disableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(false);
      /** Re-enables double buffering globally. */
      public static void enableDoubleBuffering(Component c) {
        RepaintManager currentManager = RepaintManager.currentManager(c);
        currentManager.setDoubleBufferingEnabled(true);
    /*  print(HTMLDocument) is called to set an HTMLDocument for printing.
      public void print(HTMLDocument htmlDocument) {
        setDocument(htmlDocument);
        printDialog();
    /*  print(JEditorPane) prints a Document contained within a JEDitorPane.
      public void print(JEditorPane jedPane) {
        setDocument(jedPane);
        printDialog();
    /*  print(PlainDocument) is called to set a PlainDocument for printing.
      public void print(PlainDocument plainDocument) {
        setDocument(plainDocument);
        printDialog();
    /*  A protected method, printDialog(), displays the print dialog and initiates
        printing in response to user input.
      protected void printDialog() {
        if (pJob.printDialog()) {
          pJob.setPrintable(this,pFormat);
          try {
            pJob.print();
          catch (PrinterException printerException) {
            pageStartY = 0;
            pageEndY = 0;
            currentPage = -1;
            System.out.println("Error Printing Document");
    /*  printView is a recursive method which iterates through the tree structure
        of the view sent to it. If the view sent to printView is a branch view,
        that is one with children, the method calls itself on each of these
        children. If the view is a leaf view, that is a view without children which
        represents an actual piece of text to be painted, printView attempts to
        render the view to the Graphics2D object.
        I.    When any view starts after the beginning of the current printable
              page, this means that there are pages to print and the method sets
              pageExists to true.
        II.   When a leaf view is taller than the printable area of a page, it
              cannot, of course, be broken down to fit a single page. Such a View
              will be printed whenever it intersects with the Graphics2D clip.
        III.  If a leaf view intersects the printable area of the graphics clip and
              fits vertically within the printable area, it will be rendered.
        IV.   If a leaf view does not exceed the printable area of a page but does
              not fit vertically within the Graphics2D clip of the current page, the
              method records that this page should end at the start of the view.
              This information is stored in pageEndY.
      protected boolean printView(Graphics2D graphics2D, Shape allocation,
      View view) {
        boolean pageExists = false;
        Rectangle clipRectangle = graphics2D.getClipBounds();
        Shape childAllocation;
        View childView;
        if (view.getViewCount() > 0 &&
              !view.getElement().getName().equalsIgnoreCase("td")) {
          for (int i = 0; i < view.getViewCount(); i++) {
            childAllocation = view.getChildAllocation(i,allocation);
            if (childAllocation != null) {
              childView = view.getView(i);
              if (printView(graphics2D,childAllocation,childView)) {
                pageExists = true;
        } else {
    //  I
          if (allocation.getBounds().getMaxY() >= clipRectangle.getY()) {
            pageExists = true;
    //  II
            if ((allocation.getBounds().getHeight() > clipRectangle.getHeight()) &&
            (allocation.intersects(clipRectangle))) {
              view.paint(graphics2D,allocation);
            } else {
    //  III
              if (allocation.getBounds().getY() >= clipRectangle.getY()) {
                if (allocation.getBounds().getMaxY() <= clipRectangle.getMaxY()) {
                  view.paint(graphics2D,allocation);
                } else {
    //  IV
                  if (allocation.getBounds().getY() < pageEndY) {
                    pageEndY = allocation.getBounds().getY();
        return pageExists;
    /*  Method to set the content type the JEditorPane.
      protected void setContentType(String type) {
        jeditorPane.setContentType(type);
    /*  Method to set an HTMLDocument as the Document to print.
      public void setDocument(HTMLDocument htmlDocument) {
        jeditorPane = new JEditorPane();
        setDocument("text/html",htmlDocument);
    /*  Method to set the Document to print as the one contained in a JEditorPane.
        This method is useful when Java does not provide direct access to a
        particular Document type, such as a Rich Text Format document. With this
        method such a document can be sent to the DocumentRenderer class enclosed
        in a JEditorPane.
      public void setDocument(JEditorPane jedPane) {
        jeditorPane = new JEditorPane();
        setDocument(jedPane.getContentType(),jedPane.getDocument());
    /*  Method to set a PlainDocument as the Document to print.
      public void setDocument(PlainDocument plainDocument) {
        jeditorPane = new JEditorPane();
        setDocument("text/plain",plainDocument);
    /*  Method to set the content type and document of the JEditorPane.
      protected void setDocument(String type, Document document) {
        setContentType(type);
        jeditorPane.setDocument(document);
    /*  Method to set the current choice of the width scaling option.
      public void setScaleWidthToFit(boolean scaleWidth) {
        scaleWidthToFit = scaleWidth;
    }The sample input file is "mark.html":::
    <html>
    <head>
    <style type="text/css">
    <!--
    ol { list-style-type: decimal; margin-top: 10; margin-left: 50; margin-bottom: 10 }
    u { text-decoration: underline }
    s { text-decoration: line-through }
    p { font-weight: normal; font-size: medium; margin-top: 15 }
    dd p { margin-top: 0; margin-left: 40; margin-bottom: 0 }
    ol li p { margin-top: 0; margin-bottom: 0 }
    address { color: blue; font-style: italic }
    i { font-style: italic }
    h6 { font-weight: bold; font-size: xx-small; margin-top: 10; margin-bottom: 10 }
    h5 { font-weight: bold; font-size: x-small; margin-top: 10; margin-bottom: 10 }
    h4 { font-weight: bold; font-size: small; margin-top: 10; margin-bottom: 10 }
    h3 { font-weight: bold; font-size: medium; margin-top: 10; margin-bottom: 10 }
    dir li p { margin-top: 0; margin-bottom: 0 }
    h2 { font-weight: bold; font-size: large; margin-top: 10; margin-bottom: 10 }
    b { font-weight: bold }
    h1 { font-weight: bold; font-size: x-large; margin-top: 10; margin-bottom: 10 }
    a { color: blue; text-decoration: underline }
    ul li ul li ul li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    menu { margin-top: 10; margin-left: 40; margin-bottom: 10 }
    menu li p { margin-top: 0; margin-bottom: 0 }
    table table { border-color: Gray; margin-right: 0; border-style: outset; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    sup { vertical-align: sup }
    body { margin-right: 0; font-size: 14pt; font-family: SansSerif; color: black; margin-left: 0 }
    ul li ul li ul { list-style-type: square; margin-left: 25 }
    blockquote { margin-right: 35; margin-top: 5; margin-left: 35; margin-bottom: 5 }
    samp { font-size: small; font-family: Monospaced }
    cite { font-style: italic }
    sub { vertical-align: sub }
    em { font-style: italic }
    table table table { border-color: Gray; margin-right: 0; border-style: outset; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    ul li p { margin-top: 0; margin-bottom: 0 }
    ul li ul li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    var { font-weight: bold; font-style: italic }
    table { border-color: Gray; margin-right: 7; border-style: outset; margin-top: 7; margin-left: 7; margin-bottom: 17 }
    dfn { font-style: italic }
    menu li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    strong { font-weight: bold }
    ul { list-style-type: disc; margin-top: 10; margin-left: 50; margin-bottom: 10 }
    center { text-align: center }
    ul li ul { list-style-type: circle; margin-left: 25 }
    kbd { font-size: small; font-family: Monospaced }
    dir li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    th p { font-weight: bold; padding-left: 2; padding-bottom: 3; padding-right: 2; margin-top: 0; padding-top: 3 }
    ul li menu { list-style-type: circle; margin-left: 25 }
    dt { margin-top: 0; margin-bottom: 0 }
    ol li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    li p { margin-top: 0; margin-bottom: 0 }
    strike { text-decoration: line-through }
    dl { margin-top: 10; margin-left: 10; margin-bottom: 10 }
    tt { font-family: Monospaced }
    ul li { margin-right: 0; margin-top: 0; margin-left: 0; margin-bottom: 0 }
    dir { margin-top: 10; margin-left: 40; margin-bottom: 10 }
    pre p { margin-top: 0 }
    th { border-color: Gray; border-style: solid; padding-left: 3; padding-bottom: 3; padding-right: 1; padding-top: 1 }
    pre { font-family: Monospaced; margin-top: 5; margin-bottom: 5 }
    td { border-color: Gray; border-style: inset; padding-left: 3; padding-bottom: 3; padding-right: 1; padding-top: 1 }
    td p { padding-left: 2; padding-bottom: 3; padding-right: 2; margin-top: 0; padding-top: 3 }
    code { font-size: small; font-family: Monospaced }
    small { font-size: x-small }
    big { font-size: x-large }
    -->
    </style>
    </head>
    <body>
    <p style="margin-top: 0">
    </p>
    <table width="500" cellspacing="20" border="1">
    <tr>
    <td height="330" valign="top">
    <table border="0">
    <tr>
    <td>
    <font size="2">This is to certify that [[Client Name]], born
    on [[Client Date of Birth]], of [[Client Residential
                    Address]], was the holder of motor vehicle driver
    licence number [[Client Licence Number]], first issued on
    [[First Issue Date of Holding]] and expired on [[Holding
                    Expiry Date]].<br></font>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <table width="500" border="2">
    <tr>
    <td>
    <table width="480" border="0">
    <tr>
    <td align="right">
    <font size="2"><br>
    <b>Fred Flintstone<br>Manager</b><br>Records Services Division<br>State
    Police<br>An authorised person for the purposes of the
    Road Act 1986</font>
    </td>
    </tr>
    <tr>
    <td align="left">
    <font size="2"><b>User ID: wzvqv7<br>Dated: 29 November 2006</b>
    </font>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>

    I have finally cracked it!!!!!!!!!!!!!!!!
    The issue is definitely with Java Sun. "Uneven character spacing when printing JTextComponent"
    It is raised on the http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6488219
    And currently in OPEN state, and raised on 31 Oct 2006 and mentions it was caused by fix 4352983.
    So where do we go from here. It's not good because I have tried all later version of the JVM and the issue is still there.
    Why? Because it hasn't been fixed yet. Read the bug report above, as it gives more insight -- and mentions the workaround is NOT good for existing code.
    So the way forward is to use an earlier version of the JVM 5.
    I download the JVM version 1.5.0 (starting version) and works Ok... I would probably think version prior to 4352983 would be Ok too.
    Please vote for this.... We have a workaround (use older version of the JVM).
    So I am very happy.

  • Help with email content type HTML

    Hi,
    Following is my control file code for sending the email message (just putting the delivery part, and not the while content from control file):
    <xapi:delivery>
    <xapi:email server="${DCRD_SMTP_HOST}" port="${DCRD_SMTP_PORT}"
    from="${CP_DCRD_ADMIN_EMAIL}"
         reply-to="${CP_DCRD_ADMIN_EMAIL}">
    <!-- Set the id for the delivery method -->
    <xapi:message id="123" to="${CF_DCRD_CONTACT_EMAIL}" cc="${CP_DCRD_ADMIN_EMAIL}" bcc="[email protected], [email protected]" attachment="true" content-type="html"
    subject="Datacard Maintenance Agreement Number ${CONTRACT_NUMBER} ">${CF_FINAL_EMAIL_CONTENT}
    </xapi:message>
    </xapi:email>
    </xapi:delivery>
    The formula column CF_FINAL_EMAIL_CONTENT get populated with some html content based on condition. Now, when I get the email, the text from the formula column get printed as is.......with tags and all. It's like I had unformatted plain text email. I need the content to be formatted and I need different content based on a condition. Has anyone done this before?
    Appreciate any help on this.
    Thanks,
    Alka

    I finally could fix the issue by still using a formula column to store the html text and using the following in my control file (in bold):
    <xapi:message id="123" to="${CF_DCRD_CONTACT_EMAIL}" cc="${CP_DCRD_ADMIN_EMAIL}" bcc="[email protected], [email protected]" attachment="true" content-type="text/html"
    subject="Datacard Maintenance Agreement Number ${CONTRACT_NUMBER} "> *<content><![CDATA[${CF_FINAL_EMAIL_CONTENT}]]></content>*
    </xapi:message>
    Hope this would help someone clueless like me :-)
    Alka

  • Help with passing parameters to Aspell from C [SOLVED ENOUGH]

    I found this really cool utility called aspellstdout that will allow for rudimentary spell check in Scite:
    http://www.distasis.com/cpp/scitetip.htm#spell
    What I can't figure out (and the author didn't either) is how to pass parameters beyond language to Aspell. What I want to be able to do is pass mode switches. For instance, if I have a LaTeX document I want to be able to pass the -t switch (--mode=tex). I looked through aspell.h and couldn't see what I'm looking for.
    --EDIT--
    The output to xterm option is far easier and it makes quite a bit more sense now that I'm use to it. From my .SciTEUser.properties:
    # Rudimentary LaTeX Spell Checker
    command.name.2.$(file.patterns.tex)=Spell Check
    command.2.$(file.patterns.tex)=xterm -e aspell -t -c $(FileNameExt)
    command.subsystem.2.$(file.patterns.tex)=0
    Last edited by skottish (2008-09-08 01:58:57)

    Hi,
    I see you're using System.Data.OracleClient (which has been deprecated by MS) rather than Oracle.DataAccess.Client, but this works for me with Oracle's ODP, maybe it will help.
    Cheers,
    Greg
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    public class dataadapterfill
        public static void Main()
            using(OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl"))
                con.Open();
                using(OracleCommand cmd = new OracleCommand("select ename from emp where ename = :1", con))
                    cmd.Parameters.Add(new OracleParameter("myename", OracleDbType.Varchar2, 50)).Value = "KING";
                    OracleDataAdapter da = new OracleDataAdapter(cmd);
                    DataSet ds = new DataSet();
                    da.Fill(ds);
                    foreach (DataRow row in ds.Tables[0].Rows)
                        Console.WriteLine("ename: {0}", row["ename"]);
    }

  • Help with timing, input from Daq, output sound

    Hi
    I am a student member of OSA, working on a laser listener project to be used in examples for high schools students. It is a pretty old and simple experiment but something I think students would be into. {any suggestions for other experiments anyone might have I would love to hear} 
    I read a voltage from a Daq off a reciever circuit, that signal is noisey so I filter it for the human voice range, 60Hz - 2000Hz. Then that filtered signal goes to the play waveform express VI. It works but the snag is I keep getting a "beeping" in the output sound, I believe this is from the loop cycling.  I have thought of something like a master/slave loops, storing the data in an array then waiting a sec or two and playing the sound from this data so I dont have to wait on the Daq to acquire new data. Any help or suggestions are greatly apprciated.
    This is a rough version sorry about the mess. I think it should also be noted that if the "Time Duration" is larger that 0.02 then that makes the number of samples larger than what the Daq can handle.
    Thank you very much in advance for all of the help and your time.
    Jason
    Attachments:
    OSA example.vi ‏42 KB

    Hi Jason,
    I took a look at what is happening in the play waveform express VI and the issue may be related to starting/stopping the sound card every time the loop iterates, similar to what I suggested with the DAQmx VIs in my previous post. To look into the code behind an express VI, you should copy the express VI to another section of your code or to another VI completely, because once you show the block diagram for it, you will not be able to use the express VI configuration dialog anymore for that instance of the VI. Once you copy the play waveform express VI, right click on the copy and select "Open Front Panel." Then, navigate to the block diagram and keep opening the subVIs until you find the "Simple Write" VI (see below for a screenshot of this VI). Here, you will see that there is a "Sound Output configure" VI as well as a "Sound Output Clear" VI. Since these are within the while loop of your top level VI, the "beeping" in your output may be caused by the constant configuring and stopping of the sound card with these VIs. What I suggest is that you use the code in the express VI as an example to code your own sound output vi that is configured once outside the while loop and stopped once after the while loop. Hope this helps!

  • Need help with formating numbers

    public void returnDollars()
              double dollar;
              dollar=amountr-amount;
    NumberFormat fmt = NumberFormat.getNumberInstance();
              System.out.println(fmt.fomat(dollar));
    there is my code.....now lets say
    amountr = 10
    amount 8.5
    now when i print my dollar amount i want it to show up as 1 not 1.5 or 2. So in other words format it with no decimals and not round up at the same time.
    Help would be appriciated...thanks

    well...after 8 hours of trying to get it working i did it.....here it is ...........I'm sure there are many ways to make it smaller.
    import java.text.*;
    import java.io.*;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.IOException;
    public class Cashier
    double amount;
    double amountr;
    double dollar;
    double amountleft;
    double quaters;
    double test;
    double dimes;
    double pennies;
    public void getAmount()throws IOException
         BufferedReader console = new BufferedReader(new InputStreamReader(System.in));
              System.out.println("Please enter amount due:");
              String input = console.readLine();
         amount = Double.parseDouble(input);
    System.out.println("Amount due = " + amount);
         public void recieve()throws IOException
    BufferedReader console = new BufferedReader(new InputStreamReader(System.in));
              System.out.println("Please enter amount recieved :");
              String input = console.readLine();
         amountr = Double.parseDouble(input);
    System.out.println("Amount recieved = " + amountr);
         public void returnDollars()throws IOException
              double check = amountr-amount;
              dollar=amountr-amount;
    DecimalFormat fmt = new DecimalFormat("##");
    String s = fmt.format((double)(long)dollar);
    double d = Double.valueOf(s).doubleValue();
    amountleft=check-d;
         System.out.println("Dollars to return " + s);
    public void returnQuaters()
         quaters= amountleft/.25;
         double check = quaters;
    DecimalFormat fmt = new DecimalFormat("##");
    String s = fmt.format((double)(long)quaters);
    double d = Double.valueOf(s).doubleValue();
    fmt.setMaximumFractionDigits(2);
    String dol = fmt.format(amountleft);
              //System.out.println(dol);
              double e =Double.valueOf(dol).doubleValue();
    e= e-2*(.25);
    amountleft=e;
         System.out.println("Quaters to return: " + s);
         public void returnDimes()
         dimes= amountleft/.1;
         double check = dimes;
    DecimalFormat fmt = new DecimalFormat("##");
    String s = fmt.format((double)(long)dimes);
    System.out.println("Dimes to return: " + s);
    double d = Double.valueOf(s).doubleValue();
    fmt.setMaximumFractionDigits(2);
    String dol = fmt.format(amountleft);
              double e =Double.valueOf(dol).doubleValue();
    e= e-1*(.1);
    fmt.setMaximumFractionDigits(2);
    String dola = fmt.format(e);
              double t =Double.valueOf(dola).doubleValue();
    amountleft=t;
              public void returnNickles()
         double nickles = amountleft/.05;
              double check = nickles;
    DecimalFormat fmt = new DecimalFormat("##");
    String s = fmt.format((double)(long)nickles);
    System.out.println("Niclkles to return: " + s);
    double d = Double.valueOf(s).doubleValue();
    fmt.setMaximumFractionDigits(2);
    String dol = fmt.format(amountleft);
              double e =Double.valueOf(dol).doubleValue();
    e= e-1*(.05);
    fmt.setMaximumFractionDigits(2);
    String dola = fmt.format(e);
              double t =Double.valueOf(dola).doubleValue();
    amountleft=t;
         public void returnPennies()
              double pennies = amountleft/.01;
    DecimalFormat fmt = new DecimalFormat("##");
    String s = fmt.format((double)(long)pennies);
    System.out.println("Pennies to return: " + s);
         public static void main(String[] a) throws IOException
              Cashier cash = new Cashier();
              cash.getAmount();
              cash.recieve();
              cash.returnDollars();
              cash.returnQuaters();
              cash.returnDimes();
              cash.returnNickles();
              cash.returnPennies();

  • Help with formatting fields in PDF...

    Hi -
    I´m working on a form that should be filled in from the internet...
    The design I did i InDesign - and the formfields I did i Acrobat Pro -
    and finally I´m finetuning everything in LiveCycle...
    I've runned into two problems...
    I need the date field to correct itself - 
    if the user choice to use the wrong format...
    for example -
    we want to have YYYY-MM-DD
    and if the user writes DD MM YY -
    it should be accepted and corrected....
    is this possible - maybe with JAVA-script?
    Also - In Sweden anyway we always write the Social Security number in this way
    YYMMDD-NNNN ( N = Numbers between 0-9 )
    How can I get the field to recognize and to crave - "demand" this format...
    I´ll hope my Swinglish can be understandable?
    IdéSpiran

    I suggest that you make use of the Validation patterns for this. On the Object palette there is a Value tab and on that tab is a button for Validation Pattern. You can create a pattern in 4 areas - Display - what the user sees on teh screen, Edit - what the user enters in the field, Validation - what the value entered will be validated against and Data - what is stored in the data file. You will be interested in the Display pattern. Depending on the type of field you will see different data patterns ( i.e. Date fields show date patterns and TextFields have phone numbers, zip codes etc..). You can also create a custom pattern. Have a look in the docs about patterns and you will see what each of the chars represents and how to create one. For your SSN you will probably need javascript because of the combination of Date and number formats.
    Hope that helps
    Paul

  • SAPRFC - Help with Export parameters

    Hi, I need to connect SAP through PHP and I'm using SAPRFC.
    I have problems when the RFC used EXPORTS (works well with IMPORTS and TABLES). I tried in all ways that I found on the
    Internet, but not accomplished fix it. In some cases, no receipt data, and in other only achievement print the first
    character of each field.
    Example:
    $result=$sap->callFunction("BAPI_USER_GET_DETAIL",array(array("IMPORT","USERNAME",< USER >),array("EXPORT","LOGONDATA",array())));
    if ($sap->getStatus() == SAPRFC_OK)
         foreach ($result["LOGONDATA"] as $solicitud)
              echo $solicitud["LOGONDATA"];
    In this case, I get only the first character of each of the fields of LOGONDATA. I hope that you can help me.
    Thank you!

    I made the suggested change:
    exp / file=$file tables=shrlgpa query=" where shrlgpa_pidm in (Select sztahbr_pidm from purdue.sztahbr where sztahbr_to_extract=\'Y\' and sztahbr_export_status=\'N\')"
    and got the following error:
    LRM-00116: syntax error at 'sztahbr_to_extra' following 'where'
    EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
    Shannon

  • Help with formatting for Cross Tab Report Crystal 2008

    This is probably a simple question.  I have a cross tab report that displays sales by month for a period of 6 months.  These sales columns are formatted to be numbers with no decimals.  In addition to these columns, I have inserted columns that display the percentage up/down in sales over the previous month.  If I try to format the percentage columns, it changes every column to then display "##,##.##%" when I need to keep the sales columns at "##,###" with no decimal or percentage sign.
    1.  Is there a way to change the formatting of some of the columns but not all in a cross tab report?
    2.  If not, can I add a function that would change these in the calculation formula of the calculated member? 
    I tried to add "%" but it wants it to return a number.
    Here is the current code:
    //The calculation formula is used in place of the summaries in Calculated Members.
    // This calculation formula must return a/an Number value.
    If GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex) = 0 then 0 else
    ((GridValueAt (CurrentRowIndex,CurrentColumnIndex-1,CurrentSummaryIndex) -
    GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex)) /
    GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex)) * 100
    Any help is appreciated. 
    Thank you,
    Tobi

    Carl,
    Thank you for your help.  I did try your method but still couldn't get it to ignore the fact that it wanted a number.  I changed my approach a litte and managed to solve the problem.  Here is the method that I chose which managed to solve the problem.  If this is a poor way to solve it, please let me know as I am always open for new ways.
    Format Field > Number Tab > Customize > Currency  Symbol Tab
    Checked Enable Currency Symbol Fixed, changed  currency symbol to %.  This is the same thing that I did before which changes it for all columns. 
    Beside Enable Currency checkbox, I added this formula:
    // This conditional formatting formula must return one of the following Currency Symbol Constants:
    // crNoCurrencySymbol
    // crFixedCurrencySymbol
    // crFloatingCurrencySymbol
    If GridRowColumnValue("InvoiceLine.TxnDate") = Date(0,0,0) then
        crFixedCurrencySymbol  
    else
        crNoCurrencySymbol
    My added columns have a null date field so they take the currency format.  My other columns do not so they do not take the formatting.
    Thanks again for the help.
    Tobi
    Edited by: Tobi@TABeverage on Dec 2, 2009 3:58 PM

Maybe you are looking for

  • No internet with Thunderbolt to Firewire adapter

    I bought a Thunderbolt to Firewire adapter, and i used it to connect a Iomega drive I previously used as USB. When running OSX, no problem. But when i boot the computer under Windows 7 (not SP1), if the adapter is connected, then the computer says th

  • I have multi email accounts in TB but all mail goes to one account...Why?

    I have multiple email accounts in TB on my MAC but all the email goes to the first account listed. These are not my real account names but here is an Example: [email protected] [email protected] [email protected] All email goes to the [email protecte

  • Aspect Ratio / Anamorphotic Movies

    Hi We have a number of movies that come from DigiBeta or DVD. They have non square pixel aspect rations. We've encoded them into MP4 Files. Players like QuickTime or VLC correctly recognize the aspect ratio and distort the display accoringly. But in

  • Empty Trash Taking Too Long

    I am running Mac Tiger Intel on an iMac Core Duo. After moving 683 files to the trash,I get the notice that my imac is in the process of emptying the Trash bin, but after an hour nothing is happening in the progress bar, not one file is deleting so I

  • Oracle Heterogeneous Services to create link With Excel spreadsheet.

    Hi Please adivse how to use "Oracle Heterogeneous Services" to create a database link from Oracle to the Excel spreadsheet. Wishes Jawad