Search results
"category:/java"
| Title and summary | Date/time | |
|---|---|---|
|
1 |
Generate PDF with Flying Saucer and iText by adding font files
In this post, I would like to show how to load font files and format specific sections of the document at run time, when generating PDF document using Flying Saucer and iText libraries. I will create a String that has a structure of valid XHTML file. The ... |
23/02/2010 10:04:00 PM |
|
2 |
Redefining web applications with AJAX, Servlets and JSON
In this article I would like to show how JSON (JavaScript Object Notation) and Java servlet can be used together in a little AJAX (Asynchronous JavaScript and XML) application. To give brief description to those who are not closely familiar with JSON - ... |
13/09/2009 2:00:00 PM |
|
3 |
Rule Engine Stress Testing
I came across a blog by a company called Illation. What those guys do is compare performance of several rule engines available on the market: Drools, ILog, OPSJ and Jess. The stress tests cover different aspects, for example: Rules firing time ... |
05/09/2009 11:15:00 AM |
|
4 |
Brainteaser Drools: Testing Objects
This can be a hard one, since it requires from you to be familiar with Drools. Consider the condition side of the following rules: rule "object comparison one"no-loop when $customer1 : Customer( ) $customer2 : Customer(this != $customer1) then ... |
22/08/2009 10:50:00 PM |
|
5 |
Brainteaser: Overridable methods
Consider the following case of inheritance: public class Parent { public Parent() { getValue(); } public void getValue() { }}public class Child extends Parent { private final Integer integer; public Child() { integer = new Integer(888); ... |
18/04/2009 12:02:00 PM |
|
6 |
Online PDF Generator
Online PDF generator now available. This simple but useful online PDF generator tool allows you to generate PDF document online from HTML snippets. The tool uses Flying Saucer library. The PDF is generated with full compression, including meta data in ... |
11/04/2009 9:17:00 PM |
|
7 |
Export Pebble Blog Entry to PDF Plugin
In one of my previous posts, I described how I implemented a plug in for Pebble blogging software that allows export of blog entries to PDF. Today, I have made modifications to enable plug in to load font files at run time during PDF generation to ... |
10/04/2009 7:46:00 PM |
|
8 |
Brainteaser: Broken case of inheritance
Consider the following case of inheritance: public class ExtendingHashSetE extends HashSetE { private int counter = 0; public ExtendingHashSet() { } @Override public boolean add(E e) { counter++; return super.add(e); } ... |
05/04/2009 8:34:00 PM |
|
9 |
How to prevent iFrame breakaway
Few days ago I was searching for a solution to the problem I've encountered - I needed to prevent a third party page to break out of iframe inside a web page of my web application. For people who are not closely familiar with JavaScript, the following JS ... |
29/03/2009 5:37:00 PM |
|
10 |
Export to PDF using iText and Flying Saucer
In my previous post I attempted to generate PDF on the fly using iText library. My goal was to parse HTML snippet into PDF. Unfortunately, as I discovered iText alone is not powerful enough as HTML parser. iText is not flexible enough to manipulate the ... |
28/03/2009 11:23:00 AM |
|
11 |
Export to PDF using iText Java-PDF library
I had some time during this weekend, so I used iText, free Java-PDF library to make a plug in for Pebble blogging software. This plug in now allows to export blog entries to PDF document. I liked this library, except one thing - converting HTML snippets ... |
22/03/2009 9:07:00 PM |
|
12 |
Hibernate Event Interceptor
Its quite common when you create an application, there is a need to create an audit trail on the application level where all entity insert, update and delete events are logged. In this post, I would like to describe a simple approach that can help you ... |
08/03/2009 4:42:00 PM |
|
13 |
Java and those frameworks
I came across an interesting article that discusses today's application developers making extensive use of different frameworks in their applications. This is the writer's opinion: ...Todays projects are over bloated from the use of frameworks that ... |
15/11/2008 8:14:00 PM |
|
14 |
Substance and Flamingo
Today, I came across these two projects today: one called Substance (Java look & feel) and the other called Flamingo (UI components). These projects designed and maintained by Kirill Grouchnikov. You can read Kirill's blog, he talks about the latest ... |
06/11/2008 11:29:00 PM |
|
15 |
Drools - tutorial on writing DSL template
Few months ago I wrote a post that describes an example that uses source DRL in conjunction with DSL template. In the current post, I want to describe and show with few examples how to write DSL template - whats allowed and whats not. Now, having said ... |
24/10/2008 5:34:20 PM |
|
16 |
Brainteaser: Broken comparator
Question: The following program returns result "1", which indicates that first Integer value is greater than the second, why? import java.util.*;public class Example { public static void main(String[] args) { ... |
19/10/2008 1:25:00 AM |
|
17 |
Hack any Java class using reflection attack
Have you ever thought how secure your application is? Well reflection attack can demonstrate how vulnerable Java classes are. In this post, I will try to apply reflection attack on a simple Java class to demonstrate vulnerabilities and what can be done to ... |
13/10/2008 1:05:20 PM |
|
18 |
How to set SecurityManager and Java security policy programmatically
In this example I want to show how to use SecurityManager to prevent unauthorized access to private members of a Java class, for example using reflection to invoke private constructor. Besides that I also want to show how Java security policy can be set ... |
12/10/2008 10:16:00 AM |
|
19 |
Brainteaser: ArrayList VS TreeSet
When I came across the following example I did not expect the results that the program has printed :) hehe... Question: What does this program print? Why? import java.util.*;public class SetList { public static void main(String[] args) { ... |
01/10/2008 1:31:00 PM |
|
20 |
Patch for Flex Builder 3 plugin to work with Eclipse 3.4 (Ganymede)
I installed few days ago new version of Eclipse (Ganymede) and today I tried to install flex builder v3. The installation went fine, but I got the following exception when trying to open Flex editor in Eclispe: ... |
26/09/2008 1:22:00 PM |




