Here is an example on how to use a Java Applet to generate a PDF from XHTML or XML source. The main advantage of using an Applet to generate from XHTML or XML source is XHTML/XML source can be gzip compressed from the source web server which reduces very much its size to be transferred over a slow network connection and is speedier, while compared to an actual PDF file that’s transferred over the same network.
Archive for the 'Java' Category
One of my projects is studying on how to convert any documents in Word, Excel or Powerpoint formats into FLASH format which is viewable by most browsers with flash plugin.
The Java or JDK comes with NO support of any official API for FTP connection. But there is an internal that comes in the sun.net package, but this is NOT well-documented, and you will hardly find how to use other methods within the sun.net.ftp.FtpClient class.
Looking for way how to program a file upload in the AJAX manner? Here you go, using JavaServer faces, with those cool taglibs, which you get a progress bar and the a file chooser. And the file is being uploaded in AJAX mode. You’ll be shown a progress bar of the uploading status.
Many of you might have known Spring as a J2EE framework that simplifies J2EE development by introducing the MVC (Model View Control) development methodology in J2EE.
In a full-fledged Object Oriented Programming language such as Java, method overloading is the technique that you could use to create few functions or methods that having the same names but taking different arguments or parameters. Such as follows, the method findUser(), findUser(String), findUser(String, String) in Java.
public Collection findUser()
// the findUser() is a method that returns
// all users in a java.util.Collection object
public Collection findUser(String name)
// the findUser(String) is a method that returns the users matched
// by the specified name,
// result returned in a java.util.Collection object
public Collection findUser(String firstMame, String lastName)
// the findUser(String,String) is a method that
// returns the users matched by the specified
// first and last name, results returned in a java.util.Collection object