4/3 matrix shape in calandar in jsp

i created the jsp page to view the calander,
but i am getting output as the 12 months coming vertically
i need it to b cum in 3/4 or 4/3 matrix shape
here is my code
<%@page import="java.util.*,java.text.*" %>
<html>
<head>
<title>Print a month page.</title>
<meta name="version"
</head>
<body bgcolor="white">
<%     
     boolean yyok = false;
     int yy = 0, mm = 0;
     String yyString = request.getParameter("year");
     if (yyString != null && yyString.length() > 0)
     try
        yy = Integer.parseInt(yyString);
         yyok = true;
     catch (NumberFormatException e)
     out.println("Year " + yyString + " invalid");
Calendar c = Calendar.getInstance( );
if (!yyok)yy = c.get(Calendar.YEAR);   
mm = c.get(Calendar.MONTH);
%>
<form method=post action="CalendarPage.jsp">
Enter Year : <input type="text" size="5" name="year" value="<%= yy %>"></input>
<input type=submit value="Display"></form>
<%!
String[] months = {
                 "January", "February", "March",
                 "April","May", "June",
                 "July", "August","September",
                 "October", "November", "December"
int dom[] = {
           31, 28, 31, 30,
           31, 30, 31, 31,
           30, 31, 30, 31
%>
<%
int leadGap = 0;
%>
<table border="1" width="250" align="Left">
<div>
<tr>
<td halign="top" colspan="2">
</div>
<%
GregorianCalendar calendar =null;
for(int j=0;j<12;j++)
  calendar = new GregorianCalendar(yy, j, 1);     
%>
<tr align="right">
<th colspan=7>
<%= months[j] %>
<%= yy %>
</tr>
<tr>
<div>
<td>Sun<td>Mon<td>Tue<td>Wed<td>Thu<td>Fri<td>Sat</tr>
<%
     leadGap = calendar.get(Calendar.DAY_OF_WEEK)-1;
     int daysInMonth = dom[j];
     if (calendar.isLeapYear(calendar.get(Calendar.YEAR)) && j == 1)
     ++daysInMonth;
     out.print("<tr>");  
     out.println(" ");
     for (int i = 0; i < leadGap; i++)
      out.print("<td> ");
      for (int i = 1; i <= daysInMonth; i++)
      out.print("<td>");         
%>
    <%=i%>
</div>
<%
      out.print("</td>"); 
     if ((leadGap + i) % 7 == 0)
       out.println("</tr>");
%>
</tr>
</table>
</html>
and here is my output
Enter Year :
January 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
February 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28
March 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
April 2006
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
May 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
June 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
July 2006
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
August 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
September 2006
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
October 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
November 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
December 2006
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
i need it to be in matrix form
if anyone knows tel me plzz
jose

First comment: yuck. Ugly scriptlet code mixed in with HTML tags.
A developers nightmare.
a few more constructive comments:
you can get the number of days in the month directly from the calendar:
You can use calendar.getActualMaximum(Calendar.DATE) which will tell you the last day of the current month. That takes leap years into account as well. Check out the java.util.Calendar API for details.
That will let you simplify your code a little.
Next thing. From a purist point of view you should always close your tags. So if you have <td> then it should be followed by </td>
Yes it might work, but it is much better to do things properly.
Now on to your actual problem.
What I would suggest is that you do a complete table for each month.
ie get it generating like this.
<table>
... january ....
1 2 3...
</table>
<table>
... feb ...
</table>
Then you just use another table to lay them out by rows/columns.
ie
<table>
<tr><td> <table> (Jan) </table></td> <td> <table> (Feb) </table> </td> ...

Similar Messages

  • Calander in jsp

    hi to all,
    i am creating a calander in jsp
    in my calander page in shows 12 months as a line
    but i want it in matrix shape like 3/4 or 4/3
    here is my code
    <%@page import="java.util.*,java.text.*" %>
    <html>
    <head>
    <title>Print a month page.</title>
    <meta name="version"
    </head>
    <body bgcolor="white">
    <%     
                     boolean yyok = false;
              int yy = 0, mm = 0;
              String yyString = request.getParameter("year");
              if (yyString != null && yyString.length() > 0)
           try
            yy = Integer.parseInt(yyString);
                     yyok = true;
          catch (NumberFormatException e)
          out.println("Year " + yyString + " invalid" );
              Calendar c = Calendar.getInstance( );
              if (!yyok)yy = c.get(Calendar.YEAR);   
              mm = c.get(Calendar.MONTH);
    %>
    <form method=post action="CalendarPage.jsp">
    Enter Year : <select name="year">
                   <%          
          for(int i=2000;i<=2010;i++)
                   %><OPTION VALUE=<%=i%>><%=i%>
         <%            } %>
              </select>
         <input type=submit value="Display"></form>
    <%!
    String[] months =     {
                                   "January",
                                    "February",
                                    "March",
                                    "April",
                                    "May",
                                    "June",
                                    "July",
                                    "August",
                                    "September",
                                    "October",
                                    "November",
                                    "December"
    int dom[] =            {
               31, 28, 31, 30,
               31, 30, 31, 31,
               30, 31, 30, 31
    %>
    <%
              int leadGap = 0;
    %>
    <table border="4" width="250" align="center">
    <div>
    <tr>
    <td halign="top" colspan="2">
    </div>
    <%
         GregorianCalendar calendar =null;
         for(int j=0;j<12;j++)
                 calendar = new GregorianCalendar(yy, j, 1);     
    %>
         <tr align="center">
         <th colspan=7>
         <%= months[j] %>
         <%= yy %>
         </tr>
         <tr>
         <div>
         <td>Sun<td>Mon<td>Tue<td>Wed<td>Thu<td>Fri<td>Sat
         </tr>
    <%
         leadGap = calendar.get(Calendar.DAY_OF_WEEK)-1;
         int daysInMonth = dom[j];
         if (calendar.isLeapYear(calendar.get(Calendar.YEAR)) && j == 1)
         ++daysInMonth;
         out.print("<tr>");  
         out.println(" ");
         for (int i = 0; i < leadGap; i++)
          out.print("<td> ");
          for (int i = 1; i <= daysInMonth; i++)
          out.print("<td>");         
    %>
             <%=i%>
    </div>
    <%
          out.print("</td>"); 
           if ((leadGap + i) % 7 == 0)
                out.println("</tr>");
    %>
         </tr>
                 </table>
         </html>
    and this is my output
    Enter Year : 20002001200220032004200520062007200820092010
    January 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5 6 7
    8 9 10 11 12 13 14
    15 16 17 18 19 20 21
    22 23 24 25 26 27 28
    29 30 31
    February 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4
    5 6 7 8 9 10 11
    12 13 14 15 16 17 18
    19 20 21 22 23 24 25
    26 27 28
    March 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4
    5 6 7 8 9 10 11
    12 13 14 15 16 17 18
    19 20 21 22 23 24 25
    26 27 28 29 30 31
    April 2006
    Sun Mon Tue Wed Thu Fri Sat
    1
    2 3 4 5 6 7 8
    9 10 11 12 13 14 15
    16 17 18 19 20 21 22
    23 24 25 26 27 28 29
    30
    May 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5 6
    7 8 9 10 11 12 13
    14 15 16 17 18 19 20
    21 22 23 24 25 26 27
    28 29 30 31
    June 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2 3
    4 5 6 7 8 9 10
    11 12 13 14 15 16 17
    18 19 20 21 22 23 24
    25 26 27 28 29 30
    July 2006
    Sun Mon Tue Wed Thu Fri Sat
    1
    2 3 4 5 6 7 8
    9 10 11 12 13 14 15
    16 17 18 19 20 21 22
    23 24 25 26 27 28 29
    30 31
    August 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
    6 7 8 9 10 11 12
    13 14 15 16 17 18 19
    20 21 22 23 24 25 26
    27 28 29 30 31
    September 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2
    3 4 5 6 7 8 9
    10 11 12 13 14 15 16
    17 18 19 20 21 22 23
    24 25 26 27 28 29 30
    October 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5 6 7
    8 9 10 11 12 13 14
    15 16 17 18 19 20 21
    22 23 24 25 26 27 28
    29 30 31
    November 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4
    5 6 7 8 9 10 11
    12 13 14 15 16 17 18
    19 20 21 22 23 24 25
    26 27 28 29 30
    December 2006
    Sun Mon Tue Wed Thu Fri Sat
    1 2
    3 4 5 6 7 8 9
    10 11 12 13 14 15 16
    17 18 19 20 21 22 23
    24 25 26 27 28 29 30
    31
    plz help me to get this is matrix shape
    if anyone has sample program means send me

    You are mixing divs and tables and you are using invalid HTML syntax. Strip the divs from the source to begin with.

  • 8x8 led matrix

    hi,
        i am currently working on a 8x8 led matrix hardware to light up different shapes and numbers. For a start, i tried lighting up the number '9' to get the concept first.
    I am using the current module and transistor module to control the hardware. I have implemented using a row by row scanning method.And the channel selection and current input are configured in the properties of the fieldpoint in the block diagram.
    But the outcome is not desirable. The scanning speed is too slow and flickering could be seen.
    may i know how i can solve this problem.
    And i would like to know if my programming method is correct.
    As this is my first time working on labview, i have very little knowledge about it.
    I have attached my programme below.
    Pls help me in solving this problem as it is urgent.
    Attachments:
    by row 8x8 matrix shape 9.vi ‏1654 KB

    Hi vivek,
    I don't work with FieldPoint module, so cannot help on this special topic.
    But I have some more general hints:
    -Using the error cluster in/out you can define execution order of your FP express vis without using this huge sequence structure. This will greatly enhance readability of your code.
    -What's the timing for? When the display should last for a given time, the delay should be put in it's own frame after setting the display! Btw. you should use the correct datatype for indicators to avoid unnessessary type conversions (shown by red dot).
    -the express vi's are nice for easy development, but they hide all the settings from the programmer. IMHO it's better to use "direct access" vi's (VISA or special FP vi's - I don't have the toolkit installed). This way you can optimize for speed (you don't know what the express vi is doing aside from FP communication) more easily.
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Can't create Area from Rectangle2D (SSCCE included)

    Hi guys,
    I'm trying to create an Area from a Rectangle2D as a workaround for being unable to create an Area from a Line2D.
    It doesn't seem to work though; any idea why?
    Here's a little SSCCE so you can see what I mean.
    The area without any transformation applied displays fine (green). The 'line' produced from my Rectangle2D with the transformation also appears as desired (black). However, the Area produced from the transformation has no pixels in it (blue).
    Help would be much appreciated x:o)
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics2D;
    import java.awt.Shape;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.geom.AffineTransform;
    import java.awt.geom.Area;
    import java.awt.geom.Rectangle2D;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class Test implements ActionListener {
         private static Shape shape;
         private static Area area;
         private static JPanel component;
         public Test() {
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel contentPane = new JPanel();
              component = new JPanel();
              component.setBackground(Color.WHITE);
              component.setOpaque(true);
              JButton button = new JButton("Draw");
              button.addActionListener(this);
              button.setActionCommand("draw");
              button.setPreferredSize(new Dimension(100, 20));
              component.setPreferredSize(new Dimension(400, 200));
              frame.setPreferredSize(new Dimension(400, 300));
              contentPane.add(component);
              contentPane.add(button);
              frame.setContentPane(contentPane);
              frame.pack();
              frame.setVisible(true);
         public static void main(String[] args) {
              new Test();
         public void actionPerformed(ActionEvent event) {
              if (event.getActionCommand().equals("draw")) {
                   // Create graphics context
                   Graphics2D g2d = (Graphics2D) component.getGraphics();
                   // Create arbitrary endpoints for 'line'
                   double x1 = 20;
                   double x2 = 60;
                   double y1 = 5;
                   double y2 = 70;
                   double deltaX = x1 - x2;
                   double deltaY = y1 - y2;
                   // Instantiate rectangle and derived area
                   Rectangle2D.Double rectangle = new Rectangle2D.Double(x1, y1, Math.abs(deltaX), 10);
                   area = new Area(rectangle);
                   // Display area without transformation
                   g2d.setColor(Color.GREEN);
                   g2d.draw(area);
                   // Construct matrix transformation for y = mx + c
                   double m = deltaY / deltaX;
                   double c = y1 / (m * x1);
                   AffineTransform matrix = new AffineTransform(1, m, 0, 0, 0, c);
                   // Transform Shape and Area by constructed matrix
                   shape = matrix.createTransformedShape(rectangle);
                   area = area.createTransformedArea(matrix);
                   // Display the transformed Shape (black)
                   g2d.setColor(Color.BLACK);
                   g2d.draw(shape);
                   // Shift 5 pixels right
                   g2d.translate(5, 0);
                   // Display the transformed Area (blue)
                   g2d.setColor(Color.BLUE);
                   g2d.draw(area);
                   // Display transformed Area bounds as String
                   g2d.drawString(area.getBounds().toString(), 80, 100);
    }

    I just came back to this, and realised that Area probably doesn't like there being no fillable area, lol slaps forehead
    So this altered version works perfectly for a line of thickness 1:
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics2D;
    import java.awt.Shape;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.geom.AffineTransform;
    import java.awt.geom.Area;
    import java.awt.geom.Rectangle2D;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class Test implements ActionListener {
         private static Shape shape;
         private static Area area;
         private static JPanel component;
         public Test() {
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel contentPane = new JPanel();
              component = new JPanel();
              component.setBackground(Color.WHITE);
              component.setOpaque(true);
              JButton button = new JButton("Draw");
              button.addActionListener(this);
              button.setActionCommand("draw");
              button.setPreferredSize(new Dimension(100, 20));
              component.setPreferredSize(new Dimension(400, 200));
              frame.setPreferredSize(new Dimension(400, 300));
              contentPane.add(component);
              contentPane.add(button);
              frame.setContentPane(contentPane);
              frame.pack();
              frame.setVisible(true);
         public static void main(String[] args) {
              new Test();
         public void actionPerformed(ActionEvent event) {
              if (event.getActionCommand().equals("draw")) {
                   // Create graphics context
                   Graphics2D g2d = (Graphics2D) component.getGraphics();
                   // Create arbitrary endpoints for 'line'
                   double x1 = 20;
                   double x2 = 60;
                   double y1 = 5;
                   double y2 = 70;
                   double deltaX = x1 - x2;
                   double deltaY = y1 - y2;
                   // Instantiate rectangle and derived area
                   Rectangle2D.Double rectangle = new Rectangle2D.Double(x1, y1, Math.abs(deltaX), 1); // Here's what's changed
                   area = new Area(rectangle);
                   // Display area without transformation
                   g2d.setColor(Color.GREEN);
                   g2d.draw(area);
                   // Construct matrix transformation for y = mx + c
                   double m = deltaY / deltaX;
                   double c = y1 - (m * x1); // ** Sidenote: typo in the above version, d'oh!
                   AffineTransform matrix = new AffineTransform(1, m, 0, 1, 0, c); // Here's what's changed
                   // Transform Shape and Area by constructed matrix
                   shape = matrix.createTransformedShape(rectangle);
                   area = area.createTransformedArea(matrix);
                   // Display the transformed Shape (black)
                   g2d.setColor(Color.BLACK);
                   g2d.draw(shape);
                   // Shift 5 pixels right
                   g2d.translate(5, 0);
                   // Display the transformed Area (blue)
                   g2d.setColor(Color.BLUE);
                   g2d.draw(area);
                   // Display transformed Area bounds as String
                   g2d.drawString(area.getBounds().toString(), 80, 100);
    }

  • Subreport shows no images nor formatting when invoked from the portal

    Hi,
    I am not 100% sure if this is the right forum, but my problem is related to running subreports on the portal.
    We run OracleAS 10gR2 (10.1.2).
    I have some reports I created with the builder. They are "registered" on the Portal, i.e., I have created report access definition files.
    My reports server is defined to run not only registered reports.
    Actually the report access definition files do not contain the file name for the reports. I rather handle it through the ORACLE_HOME/reports/conf/cgicmd.dat and set the corresponding hidden key in the parameter form.
    On the developer PCs, running the standalone OC4J instance, we have ORACLE_HOME/reports/conf/cgicmd.dat files with entries of the shape:
    master: report=master_report.jsp userid=scott/tiger@mydb destype=cache %*
    detail: report=detail_report.jsp userid=scott/tiger@mydb destype=cache %*
    On the application server we have a SSOCONN resource scotttiger defined as an OracleDB connect string (scott/tiger@mydb), and the cgicmd.dat entries show:
    master: report=master_report.jsp ssoconn=scotttiger destype=cache %*
    detail: report=detail_report.jsp ssoconn=scotttiger destype=cache %*
    The master_report.jsp has format triggers that will invoke srw.set_hyperlink('/reports/rwservlet?detail_report.jsp&...'), for linking to the subreport(s).
    This used to work perfectly and it still works on the standalone OC4J instance.
    Now, if I run the master report on the portal and navigate to the detail report, the detail report shows the right results, but neither formatting nor the images or graphs. When I do a 'show image' on the subreport, then I get a REP-50171: Authentication failed. On ther address bar, I see that the portal is invoking 'http://server:port/reports/rwservlet/getfile/HW/...'
    On the reports trace file, nothing abnormal is shown. I haven't found any entry in any log and am already out of ideas.
    Any hint will be appreciated.

    I fixed it myself.
    The reason was I had a parameter p_authid that conflicted with the portal's parameter authid.
    As soon as I removed it, the problem disappeared
    I personally think this is a bug in the portal.

  • On my G5 mac at work, I am getting - don't know what to call it - looks like extraneous matrix type code around prompt windows and in applications. Sometimes I will get large shapes of colors, yellows, magentas, cyans. Anyone else experience this?

    On my G5 mac at work, I am getting - don't know what to call it - looks like extraneous matrix type code around prompt windows and in applications. Sometimes I will get large shapes of colors, yellows, magentas, cyans. Anyone else experience this?
    I will attach a recent screen shot of a print window I opened and the extra code is above and below the window. There are matrix type blocks of code and then lines under the window. I get this all the time and it is getting worse.
    Any help to get rid of it would be appreciated.
    Thanks
    TatteredSkull

    It's likely the Video card, or possibly heat.
    At the Apple Icon at top left>About this Mac.
    Then click on More Info>Hardware and report this upto *but not including the Serial#*...
    Hardware Overview:
    Machine Name: Power Mac G5 Quad
    Machine Model: PowerMac11,2
    CPU Type: PowerPC G5 (1.1)
    Number Of CPUs: 4
    CPU Speed: 2.5 GHz
    L2 Cache (per CPU): 1 MB
    Memory: 10 GB
    Bus Speed: 1.25 GHz
    Boot ROM Version: 5.2.7f1
    Get Temperature Monitor to see if it's heat related...
    http://www.macupdate.com/info.php/id/12381/temperature-monitor
    iStat Menus...
    http://bjango.com/mac/istatmenus/
    And/or iStat Pro...
    http://www.islayer.com/apps/istatpro/
    If you have any temps in the 70°C/160°F range, that's likely it.

  • Can we draw shapes using jsp

    I am sai, i am doing a project on bpm suite. here i have to design a page where a user can draw his process diagrams which uses symbols such as circle ,rectangle,round rect, etc, ...can any one help me in doing these.i have checked java script tags ,its too complex.i have tried canvas tag i cant get it.i have checked sun.com..
    it has the answer but it uses struts frame work. but i want this code to happen at client side only..
    Is There any way to solve my problem if any plz help me

    I am also looking for a solution to this.
    I am trying to pass a parameter from JTT jsp Menu link to OA Framework Page.
    Thanks
    Srini

  • Clicking on jsp page does not open it in visual editor.

    All "open jsp tags in visual editor" checkbox is on for all libraries.
    Jdeveloper version is 10131 build 3914
    Message
    BME-99003: An error occurred, so processing could not continue.
    Cause
    The application has tried to de-reference an invalid pointer. This exception should have been dealt with programmatically. The current activity may fail and the system may have been left in an unstable state. The following is a stack trace.
    java.lang.NullPointerException
         at oracle.jdevimpl.webapp.design.util.InvisibleJspElementsUtil.applyInvisibleJSPElements(InvisibleJspElementsUtil.java:108)
         at oracle.jdevimpl.webapp.design.util.InvisibleJspElementsUtil.applyInvisibleJSPElements(InvisibleJspElementsUtil.java:78)
         at oracle.jdevimpl.webapp.design.util.InvisibleJspElementsUtil.applyInvisibleJSPElements(InvisibleJspElementsUtil.java:47)
         at oracle.jdevimpl.webapp.design.view.DesignTimeFixedViewDocument.rebuildTree(DesignTimeFixedViewDocument.java:162)
         at oracle.jdevimpl.webapp.model.content.dom.view.proxy.ProxyViewDocument.initialize(ProxyViewDocument.java:80)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.rebuildViewDocument(AbstractWebAppEditor.java:686)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.rebuildViewDocument(HtmlEditor.java:621)
         at oracle.jdevimpl.webapp.editor.jsp.JspEditor.rebuildViewDocument(JspEditor.java:209)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.createDocuments(AbstractWebAppEditor.java:1206)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.open(AbstractWebAppEditor.java:393)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.open(HtmlEditor.java:172)
         at oracle.jdevimpl.webapp.editor.jsp.JspEditor.open(JspEditor.java:113)
         at oracle.ideimpl.editor.EditorState.openEditor(EditorState.java:239)
         at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:147)
         at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:90)
         at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
         at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
         at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
         at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:275)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1261)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1196)
         at oracle.ideimpl.editor.EditorManagerImpl.openEditorInFrame(EditorManagerImpl.java:1077)
         at oracle.ideimpl.editor.EditorManagerImpl.openDefaultEditorInFrame(EditorManagerImpl.java:1036)
         at oracle.adfdt.controller.util.CommonUtils.showEditor(CommonUtils.java:575)
         at oracle.adfdt.controller.jsf.diagram.shape.PageNode.gotoPage(PageNode.java:355)
         at oracle.adfdt.controller.jsf.diagram.shape.PageNode.invokeAction(PageNode.java:292)
         at oracle.adfdt.controller.jsf.diagram.registry.RPageNode.editContents(RPageNode.java:210)
         at oracle.bm.diagrammer.track.SelectionTracker.keyPressed(SelectionTracker.java:1338)
         at oracle.bm.diagrammer.track.ModularTracker.processEvent(ModularTracker.java:253)
         at oracle.bm.diagrammer.track.SelectionTracker.processEvent(SelectionTracker.java:148)
         at oracle.bm.diagrammer.track.TrackerStack.processEvent(TrackerStack.java:375)
         at oracle.bm.diagrammer.BaseDiagramView$53.processEvent(BaseDiagramView.java:733)
         at oracle.bm.diagrammer.PageView$PageViewPanel.fireEvent(PageView.java:2933)
         at oracle.bm.diagrammer.PageView$PageViewPanel.processEvent(PageView.java:3111)
         at java.awt.Component.dispatchEventImpl(Component.java:4407)
         at java.awt.Container.dispatchEventImpl(Container.java:2042)
         at java.awt.Component.dispatchEvent(Component.java:4237)
         at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1828)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:952)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:824)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:657)
         at java.awt.Component.dispatchEventImpl(Component.java:4279)
         at java.awt.Container.dispatchEventImpl(Container.java:2042)
         at java.awt.Window.dispatchEventImpl(Window.java:2405)
         at java.awt.Component.dispatchEvent(Component.java:4237)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:600)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Action
    If further errors occur, you should restart the application.
    Also, report the problem on the JDeveloper forum on otn.oracle.com, or contact Oracle support, giving the information from this message.
    ________________________________________________________________________________

    one more thing...the code runs properly on localhost... i tested it on my pc n it was fine..both in firefox and IE...
    i guess there is a specific syntax i need to follow (strict syntax) but i dunno what it is...:(

  • Photo Matrix from folder

    Hello how are you?
    I really really need your help.
    I have an aleatory number of squared pictures (ex: 4x4 of 6x6, or 10x10, etc) that may change everytime.
    These files together become a "big picture".
    What I want is an action to photoshop make a collage respecting the number of rows and collumns.
    So, row 1 would have: Picture 1.png in collum 1; picture 2.png in collum 2
    than row 2 would have: picture 3.png in collum 1; picture 4.png in collum 2
    How can I do that?
    Can I make an action that if I settle the matrix size, photoshop can take all the pictures from one folder and fulfill that matrix?
    Thank you so much!
    L2berzins

    Hello!  I cannot believe I could have all these help in such a short time, you guys are amazing!!!
    I am really a beginner, so yall are my photoshop guides! So I am sorry if I have so many questions.
    What I am looking for is much much more simple than what i have been reading from you guys. 
    I am a beginner and i don't know what I am doing.
    I saw the script, thank you, but First of all (and most important):
    how do I save the script?
    where do I save the script?
    and how do i run the script?
    So, hands on:
    I went to your web page, I thought I was the only one in the world trying to do this crazy thing, so I was releived that I could have some help.
    I saw that your final result is a poster that have 4 collums x 14 lines, with no border and no spacing.
    I work in an orphanage and I have a folder 4x4 (640 pixels x 640 pixels) pictures in alphabetic order
    What I want is:
    a square poster, that the number os lines is equal the number of collumns.
    I will receive a folder with images that all of them are either .jpg or .png, in alphabetic order, 640 pixels x 640 pixels.
    What I DONT WANT is:
    Neither of the pictures cannot have any alteration (size, resolution, dpi, colors, etc)
    No border and no spacing
    I CANNOT be aleatory, it has to follow the alphabetic order
    I dont want them to be in different layers
    I dont want to use alpha channels
    I just want the square shape, pictures to be side by side,  in alphabetic order, like in your example
    If my folder have pictures from zero to 15, the final poster with 4 collumns x 4 rows would be:
    picture0.jpg   picture1.jpg   picture2.jpg   picture3.ppg
    picutre4.jpg   picture5.jpg   picture6.jpg   picture 7.jpg
    picture8.jpg   picture9.jpg   picture10.jpg picture11.jpg
    picture12.jpg picture13.jpg picture14.jpg picture15.jpg
    Can this be a simple action?
    Thank you all so much,
    [ unreadable colors removed by admin ]

  • Problem to get glyph vector's shape

    Some Chinese fonts(TrueType) were created from embeded font files in a PDF file and glyph vectors were
    successfully generated. But when calling the glyph vector's getOutline() to get the shape of the vectors,
    the program crashed and got the following log. What's wrong with it?
    hs_err_pid3440.log
    ====================================================================
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d2d3bf9, pid=3440, tid=2680
    # Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode windows-x86)
    # Problematic frame:
    # C [fontmanager.dll+0x13bf9]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    T H R E A D
    Current thread (0x0afe2400): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=2680, stack(0x0b790000,0x0b7e0000)]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000010
    Registers:
    EAX=0x00000000, EBX=0x00000000, ECX=0x0000000b, EDX=0x0af12a1c
    ESP=0x0b7dee98, EBP=0x0b7deeb0, ESI=0x0b0038a0, EDI=0x0b0038a0
    EIP=0x6d2d3bf9, EFLAGS=0x00010246
    Top of Stack: (sp=0x0b7dee98)
    0x0b7dee98: 00000000 0b0038a0 636d6170 0b0038a0
    0x0b7deea8: 6d2d3d33 0b27e728 0b7def20 6d2c3cec
    0x0b7deeb8: 0b0038a0 00000062 00000000 0b7def1c
    0x0b7deec8: 0b0038a0 0b27e728 00000001 002e04e0
    0x0b7deed8: 0b27eca0 0b266ba8 0000000d 002e04e0
    0x0b7deee8: 0af13958 002e0178 00000000 00000000
    0x0b7deef8: 0b5b0000 0af18048 00000000 0b5b0000
    0x0b7def08: 0af17000 00000628 002e0178 00000000
    Instructions: (pc=0x6d2d3bf9)
    0x6d2d3be9: 75 51 57 68 70 61 6d 63 56 e8 6f fd ff ff 6a 00
    0x6d2d3bf9: ff 70 10 ff 70 0c ff b6 88 00 00 00 ff b6 90 00
    Stack: [0x0b790000,0x0b7e0000], sp=0x0b7dee98, free space=315k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [fontmanager.dll+0x13bf9]
    C [fontmanager.dll+0x3cec]
    C [fontmanager.dll+0x3da2]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    J java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    J java.awt.EventDispatchThread.pumpOneEventForFilters(I)Z
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::StubRoutines (1)
    P R O C E S S
    Java Threads: ( => current thread )
    0x0b07b400 JavaThread "TimerQueue" daemon [_thread_blocked, id=4040, stack(0x0cce0000,0x0cd30000)]
    0x002e5c00 JavaThread "DestroyJavaVM" [_thread_blocked, id=2628, stack(0x008c0000,0x00910000)]
    =>0x0afe2400 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=2680, stack(0x0b790000,0x0b7e0000)]
    0x0afe4400 JavaThread "AWT-Shutdown" [_thread_blocked, id=2384, stack(0x0b710000,0x0b760000)]
    0x0b12c800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3484, stack(0x0b600000,0x0b650000)]
    0x0b12a400 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2804, stack(0x0b560000,0x0b5b0000)]
    0x0ab14000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1068, stack(0x0ae60000,0x0aeb0000)]
    0x0ab08c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4000, stack(0x0ae10000,0x0ae60000)]
    0x0aafd800 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=2800, stack(0x0adc0000,0x0ae10000)]
    0x0aafc400 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=2620, stack(0x0ad70000,0x0adc0000)]
    0x0aafa400 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=2380, stack(0x0ad20000,0x0ad70000)]
    0x0aaef800 JavaThread "Attach Listener" daemon [_thread_blocked, id=2796, stack(0x0aca0000,0x0acf0000)]
    0x0aaea800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=560, stack(0x0ac50000,0x0aca0000)]
    0x0aad9000 JavaThread "Finalizer" daemon [_thread_blocked, id=2604, stack(0x0ac00000,0x0ac50000)]
    0x0aad4c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=2280, stack(0x0abb0000,0x0ac00000)]
    Other Threads:
    0x0aad1c00 VMThread [stack: 0x0ab60000,0x0abb0000] [id=1340]
    0x0ab27400 WatcherThread [stack: 0x0aeb0000,0x0af00000] [id=2644]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 1344K, used 136K [0x029c0000, 0x02b30000, 0x02ea0000)
    eden space 1216K, 11% used [0x029c0000, 0x029e2010, 0x02af0000)
    from space 128K, 0% used [0x02af0000, 0x02af0000, 0x02b10000)
    to space 128K, 0% used [0x02b10000, 0x02b10000, 0x02b30000)
    tenured generation total 17020K, used 12841K [0x02ea0000, 0x03f3f000, 0x069c0000)
    the space 17020K, 75% used [0x02ea0000, 0x03b2a740, 0x03b2a800, 0x03f3f000)
    compacting perm gen total 17664K, used 17494K [0x069c0000, 0x07b00000, 0x0a9c0000)
    the space 17664K, 99% used [0x069c0000, 0x07ad5be0, 0x07ad5c00, 0x07b00000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x00423000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\java.exe
    0x77f50000 - 0x77ff7000 C:\WINDOWS\System32\ntdll.dll
    0x77e40000 - 0x77f4e000 C:\WINDOWS\system32\kernel32.dll
    0x77da0000 - 0x77e3b000 C:\WINDOWS\system32\ADVAPI32.dll
    0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll
    0x7c340000 - 0x7c396000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\msvcr71.dll
    0x6d870000 - 0x6dac0000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\client\jvm.dll
    0x77d10000 - 0x77d9c000 C:\WINDOWS\system32\USER32.dll
    0x77c40000 - 0x77c80000 C:\WINDOWS\system32\GDI32.dll
    0x76b10000 - 0x76b39000 C:\WINDOWS\System32\WINMM.dll
    0x76300000 - 0x7631c000 C:\WINDOWS\System32\IMM32.DLL
    0x62c20000 - 0x62c28000 C:\WINDOWS\System32\LPK.DLL
    0x72f10000 - 0x72f6a000 C:\WINDOWS\System32\USP10.dll
    0x6d320000 - 0x6d328000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\hpi.dll
    0x76bc0000 - 0x76bcb000 C:\WINDOWS\System32\PSAPI.DLL
    0x6d410000 - 0x6d439000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\jdwp.dll
    0x6d770000 - 0x6d776000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\npt.dll
    0x6d820000 - 0x6d82c000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\verify.dll
    0x6d3c0000 - 0x6d3df000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\java.dll
    0x6d860000 - 0x6d86f000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\zip.dll
    0x6d290000 - 0x6d297000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\dt_socket.dll
    0x71a20000 - 0x71a35000 C:\WINDOWS\System32\WS2_32.dll
    0x77be0000 - 0x77c33000 C:\WINDOWS\system32\msvcrt.dll
    0x71a10000 - 0x71a18000 C:\WINDOWS\System32\WS2HELP.dll
    0x719c0000 - 0x719fb000 C:\WINDOWS\System32\mswsock.dll
    0x76ef0000 - 0x76f15000 C:\WINDOWS\System32\DNSAPI.dll
    0x76d30000 - 0x76d46000 C:\WINDOWS\System32\iphlpapi.dll
    0x76f80000 - 0x76f87000 C:\WINDOWS\System32\winrnr.dll
    0x76f30000 - 0x76f5c000 C:\WINDOWS\system32\WLDAP32.dll
    0x76f90000 - 0x76f95000 C:\WINDOWS\System32\rasadhlp.dll
    0x71a00000 - 0x71a08000 C:\WINDOWS\System32\wshtcpip.dll
    0x6d0b0000 - 0x6d1de000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\awt.dll
    0x72f70000 - 0x72f93000 C:\WINDOWS\System32\WINSPOOL.DRV
    0x7cab0000 - 0x7cbd1000 C:\WINDOWS\system32\ole32.dll
    0x5adc0000 - 0x5adf3000 C:\WINDOWS\System32\uxtheme.dll
    0x51000000 - 0x5104d000 C:\WINDOWS\System32\ddraw.dll
    0x73b30000 - 0x73b36000 C:\WINDOWS\System32\DCIMAN32.dll
    0x74680000 - 0x746c4000 C:\WINDOWS\System32\MSCTF.dll
    0x0b6b0000 - 0x0b6db000 C:\WINDOWS\System32\msctfime.ime
    0x6d460000 - 0x6d484000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\jpeg.dll
    0x6d620000 - 0x6d633000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\net.dll
    0x0ffd0000 - 0x0fff3000 C:\WINDOWS\System32\rsaenh.dll
    0x759d0000 - 0x75a70000 C:\WINDOWS\system32\USERENV.dll
    0x71ba0000 - 0x71bee000 C:\WINDOWS\System32\netapi32.dll
    0x6d2c0000 - 0x6d313000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\fontmanager.dll
    0x773a0000 - 0x77b92000 C:\WINDOWS\system32\shell32.dll
    0x63180000 - 0x631e5000 C:\WINDOWS\system32\SHLWAPI.dll
    0x78090000 - 0x78174000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
    0x77310000 - 0x7739b000 C:\WINDOWS\system32\comctl32.dll
    0x6d640000 - 0x6d649000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\nio.dll
    0x74650000 - 0x74676000 C:\WINDOWS\System32\Msimtf.dll
    0x10000000 - 0x1001f000 C:\Program Files\Apoint\Apoint.DLL
    0x76320000 - 0x76363000 C:\WINDOWS\system32\comdlg32.dll
    0x77bd0000 - 0x77bd7000 C:\WINDOWS\system32\VERSION.dll
    0x0bb60000 - 0x0bb70000 C:\WINDOWS\System32\Vxdif.dll
    0x6d200000 - 0x6d22f000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\cmm.dll
    0x6d230000 - 0x6d253000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\dcpr.dll
    VM Arguments:
    jvm_args: -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:1656
    java_command: client.Manager
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;;
    USERNAME=qing
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 9 Stepping 5, GenuineIntel
    S Y S T E M
    OS: Windows XP Build 2600 Service Pack 1
    CPU:total 1 (1 cores per cpu, 1 threads per core) family 6 model 9 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 785392k(81692k free), swap 1921396k(1080464k free)
    vm_info: Java HotSpot(TM) Client VM (10.0-b22) for windows-x86 JRE (1.6.0_06-b02), built on Mar 25 2008 01:22:05 by "java_re" with MS VC++ 7.1
    time: Tue Jun 17 18:17:12 2008
    elapsed time: 202 seconds

    Hi,
    I solved my problem.
    In my rule 's container, i had declared my subtype (ZBUS0050) like in my task 's container and in my workflow 's container.
    ZGCA0050
    |----
    Attribute 1
    |----
    Attribute 2
    |........................
    But my FM couldn't access to the attributes...
    So, i just set Attribute 1(FundsCenter)  in my rule's container without subtype reference, and it's good.
    Thanks for your help.
    Regards.

  • How can I set up breakpoints in eclipse for jsp?

    I saw somebody can set up breakpoints in eclipse for jsp.
    But I can not do that on my eclipse.
    What's the difference?
    Thanks.

    I don't think this had a keyboard shortcut even before (checked in CS6). There's an alternative though.
    1. Create a JSFL file with following code and save it in the commands folder as 'Remove Tween'.
         fl.getDocumentDOM().getTimeline().setFrameProperty('tweenType', 'none');
    2. Now goto Edit Menu > Keyboard Shortcuts..
    3. Search for 'Remove Tween' and assign a keyboard shortcut to it.
    Now everytime you press the assigned key - jsfl script is executed which essentially removes the tween from selected frame. (works for Classic and Shape tween but not Motion Tweens)

  • Using JSP/Servlet to write Word Document to BLOB

    Hi
    I need some help pls
    When I use a normal class with a main method, it loads the word document into a blob and I can read this 100%.Stunning.
    With a JSP/Servlet I cannot get the document out again. The "format" seems to be lost.
    Any ideas,help greatly appreciated:
    Here is the Main class that works:
    package mypackage1;
    import java.io.OutputStream;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.Writer;
    import java.sql.Connection;
    import oracle.jdbc.*;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    import org.apache.log4j.Logger;
    import Util_Connect.DataBase;
    public class TestLOB
    //static final Logger logger = Logger.getLogger("test");
    public TestLOB()
    public static void main(String args[])
    TestLOB testLOB = new TestLOB();
    testLOB.TestLOBInsert("c:\\my_data\\callcenterpilot.doc");
    public void TestLOBInsert(String fileName)
    Connection conn = getConnection("wizard");
    BLOB blob = null;
    try
    conn.setAutoCommit(false);
    String cmd = "SELECT * FROM so_cs.testlob WHERE docno = 1 FOR UPDATE";
    PreparedStatement pstmt = conn.prepareStatement(cmd);
    ResultSet rset = pstmt.executeQuery(cmd);
    rset.next();
    blob = ((OracleResultSet)rset).getBLOB(2);
    File binaryFile = new File(fileName);
    System.out.println("Document length = " + binaryFile.length());
    FileInputStream instream = new FileInputStream(binaryFile);
    OutputStream outstream = blob.getBinaryOutputStream();
    int size = blob.getBufferSize();
    byte[] buffer = new byte[size];
    int length = -1;
    while ((length = instream.read(buffer)) != -1)
    outstream.write(buffer, 0, length);
    instream.close();
    outstream.close();
    conn.commit();
    closeConnection(conn);
    catch (Exception ex)
    System.out.println("Error =- > "+ex.toString());
    private Connection getConnection(String dataBase)
    Connection conn = null;
    try
    DriverManager.registerDriver(new OracleDriver());
    conn = DriverManager.getConnection("jdbc:oracle:thin:@oraclu5:1600:dwz110","so_cs","so_cs");
    catch (Exception ex)
    System.out.println("Error getting conn"+ex.toString());
    return conn;
    private void closeConnection(Connection conn)
    if (conn != null)
    try
    conn.close();
    catch (Exception se)
    System.out.println("Error closing connection in get last imei"+se.toString());
    Works fine:
    Here is the display servlet: Works when main class inserts file
    package mypackage1;
    import java.io.InputStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.Writer;
    import java.sql.Connection;
    import oracle.jdbc.*;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    import org.apache.log4j.Logger;
    import Util_Connect.DataBase;
    public class DisplayLOB extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    static final Logger logger = Logger.getLogger(DisplayLOB.class);
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    //response.setContentType(CONTENT_TYPE);
    //PrintWriter out = response.getWriter();
    Connection conn = null;
    PreparedStatement pstmt = null;
    try
    conn = getConnection("wizard");
    //out.println("<html>");
    //out.println("<head><title>DisplayLOB</title></head>");
    //out.println("<body>");
    //out.println("<p>The servlet has received a POST. This is the reply.</p>");
    InputStream is=null;
    oracle.sql.BLOB blob=null;
    response.setContentType("application/msword");
    //response.setContentType("audio/mpeg");
    OutputStream os = response.getOutputStream();
    String term = "1";
    String query = "SELECT docdetail FROM testlob WHERE docno = 1";
    pstmt = conn.prepareStatement(query);
    ResultSet rs = pstmt.executeQuery();
    while (rs.next())
    blob=((OracleResultSet)rs).getBLOB(1);
    is=blob.getBinaryStream();
    int pos=0;
    int length=0;
    byte[] b = new byte[blob.getChunkSize()];
    while((length=is.read(b))!= -1)
    pos+=length;
    os.write(b);
    }//try
    catch (Exception se)
    se.printStackTrace();
    finally
    try
    pstmt.close();
    catch (Exception ex)
    System.out.println("Error closing pstmt "+ex.toString());
    //out.println("</body></html>");
    //out.close();
    private Connection getConnection(String dataBase)
    Connection conn = null;
    try
    conn = DataBase.getPoolConnection(dataBase);
    catch (Exception se)
    logger.fatal("Error getting connection: ",se);
    return conn;
    private void closeConnection(Connection conn)
    if (conn != null)
    try
    conn.close();
    catch (Exception se)
    logger.error("Error closing connection in get last imei",se);
    Here is JSP/Servlet
    <%@ page import="org.apache.log4j.*"%>
    <%@ page contentType="text/html; charset=ISO-8859-1" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    <title>Wizard SMS Interface</title>
    <link rel='stylesheet' type='text/css' href='main1.css'>
    <script language='JavaScript' src='copyright.js'></script>
    </head>
    <pre>
    <%
    //HTTP 1.1
    response.setHeader("Cache-Control","no-cache");
    //HTTP 1.0
    response.setHeader("Pragma","no-cache");
    //prevents caching at the proxy server
    response.setDateHeader ("Expires", 0);
    Logger logger = Logger.getLogger("co.za.mtn.wizard.administration.admin01.jsp");
    %>
    </pre>
    <body>
    <FORM ACTION="/WizardAdministration/uploadfile"
    METHOD="POST"
    ENCTYPE="multipart/form-data">
    <INPUT TYPE="FILE" NAME="example">
    <INPUT TYPE="SUBMIT" NAME="button" VALUE="Upload">
    </FORM>
    </body>
    </html>
    <font> <b>Copyright &copy;
    <script>
    var LMDate = new Date( document.lastModified );
    year = LMDate.getYear();
    document.write(display(year));
    </script>
    Mobile Telephone Networks.
    <p align="left"><i><b><font face="Georgia, Times New Roman, Times, serif" size="1"></font></b></i></p>
    package co.za.mtn.wizard.admin;
    import java.io.InputStream;
    import java.util.Enumeration;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.Writer;
    import java.sql.Connection;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    import org.apache.log4j.Logger;
    import Util_Connect.DataBase;
    public class UploadFile extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    //static final Logger logger = Logger.getLogger(UploadFile.class);
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    String headerName = null;
    Enumeration en = request.getHeaderNames();
    try
    while ( en.hasMoreElements() )
    Object ob = en.nextElement();
    headerName = ob.toString();
    System.out.println("Value for headerNAme is >"+headerName+"<");
    String aaa = request.getHeader(headerName);
    System.out.println("Value for aa is >"+aaa+"<");
    catch (Exception ex)
    System.out.println("Error in extracting request headers"+ex.toString());
    Connection conn = getConnection("wizard");
    BLOB blob = null;
    try
    conn.setAutoCommit(false);
    String cmd = "SELECT * FROM so_cs.testlob WHERE docno = 1 FOR UPDATE";
    PreparedStatement pstmt = conn.prepareStatement(cmd);
    ResultSet rset = pstmt.executeQuery(cmd);
    rset.next();
    blob = ((OracleResultSet)rset).getBLOB(2);
    //File binaryFile = new File("h:\\callcenterpilot.doc");
    //System.out.println("Document length = " + binaryFile.length());
    //FileInputStream instream = new FileInputStream(binaryFile);
    response.setHeader("Content-Type","application/vnd.ms-word");
    String contentType = request.getContentType();
    System.out.println("Content type received in servlet is >"+contentType+"<");
    ServletInputStream instream = request.getInputStream();
    OutputStream outstream = blob.getBinaryOutputStream();
    int size = blob.getBufferSize();
    byte[] buffer = new byte[size];
    int length = -1;
    while ((length = instream.read(buffer)) != -1)
    outstream.write(buffer, 0, length);
    instream.close();
    outstream.close();
    conn.commit();
    closeConnection(conn);
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    catch (Exception ex)
    System.out.println("Error =- > "+ex.toString());
    //out.println("</body></html>");
    //out.close();
    private Connection getConnection(String dataBase)
    Connection conn = null;
    try
    conn = DataBase.getPoolConnection(dataBase);
    catch (Exception se)
    System.err.println("Error getting connection: "+se.toString());
    return conn;
    private void closeConnection(Connection conn)
    if (conn != null)
    try
    conn.close();
    catch (Exception se)
    System.err.println("Error closing connection in get last imei"+se.toString());
    This is what the display servlet is showing when the JSP/Servlet insert the document
    -----------------------------7d31422224030e
    Content-Disposition: form-data; name="example"; filename="H:\(your name) Skills Matrix.doc"
    Content-Type: application/msword
    �� ࡱ � > ��     � � ���� � � ���������������������
    Tks
    Andre

    hello,
    there are multiple documents out there, describing the oracle reports server setup. try doc.oracle.com for documentation.
    also it is part of the online-documentation.
    you need to install 9iAS enterprise edition. the server is pre-configured and will listen to the url http://yourserver/dev60cgi/rwcgi60.exe
    passing only this url you will get a help-screen, describing the syntax.
    regards,
    the oracle reports team

  • How to get full path of a file uploaded using file control on a jsp ?

    Hi all...
    I have a jsp on which i am using a file element (input type="file") to upload files present on the physical file system.. Thats working fine.. But i want to retrieve the full path of the file uploaded for further computation.
    What are the possible ways which can give me the full path ?? (e.g. "D:\data\text\Output.txt" )
    Thanks all for attending the question..
    Regards
    Prasad

    Some browsers send the full path. Some do not.
    You can not affect this in any way shape or form.
    All you can count on receiving is a filename - no path information.
    So you will have to have some other way for the user to pass along this information.
    If they are uploading to a "remote web site" they could specify a folder to put the uploaded file in.
    You could classify it and put all image files in "images" and all script files in "scripts" etc etc by default, and let the user deal with it in their own HTML.
    Hope this helps,
    evnafets

  • JasperException: Unable to compile class for JSP HELP

    I added couple of extra class files into the jar file.. and now its not able to find it! I am running JBoss latest version and using eclipse... any help wud be nice
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. org.jfree.chart.servlet.WebHitChart resolves to a package
    Generated servlet error:
    Only a type can be imported. org.jfree.chart.servlet.WebHitDataSet resolves to a package
    An error occurred at line: 10 in the jsp file: /bar_chart.jsp
    Generated servlet error:
    WebHitChart cannot be resolved
    An error occurred at line: 10 in the jsp file: /bar_chart.jsp
    Generated servlet error:
    WebHitDataSet cannot be resolved
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

    just a random guess...
    I had a ton of issues with JBoss and jfreechart. JBoss uses a different classloader, and its internal versions of the jfreechart classes will be loaded before yours, causing all sorts of issues. Dig through the jboss directories and you'll find a different, older version of jfreechart of one of its classes. Remove them and you'll be in better shape.
    Alternatively, look around the JBoss docs for how to disable/turn off the unified classloader for your app (its a directive in jboss-web.xml IIRC). This should make the classloader for your webapp perform to spec, getting rid of the class colission issues.

  • Printing to dot matrix printer using continuous sheets

    Hi;
    Can anybody help me;
    We have a web-based application.We have developed it with java and jsp. We want to print out several bills to continuous sheet.We are doing printing out with internet explorer and getting first page arranged but the following pages are sliding down.
    Is there any way to print out to continuos sheet with dot matrix printer through java

    You mean you want the browser to do that? Frankly I don't think you are likely to succeed, but possibly using CSS (with an "@media print" section) might work. Specify fonts, font sizes, try to control everything that can be controlled through CSS. Note that this has nothing to do with Java.

Maybe you are looking for