Archive | Java & JavaEE5 RSS feed for this section

Java shrinker, optimizer, obfuscator, and preverifier Encrypt jar files

http://proguard.sourceforge.net/ Some uses of ProGuard are: Creating more compact code, for smaller code archives, faster transfer across networks, faster loading, and smaller memory footprints. Making programs and libraries harder to reverse-engineer. Listing dead code, so it can be removed from the source code. Retargeting and preverifying existing class files for Java 6, to take full [...]

Read more

session handaling with Servlet

Use URL rewrite to save session data import java.io.IOException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ShoppingCartViewerRewrite extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType(“text/html”); PrintWriter out = res.getWriter(); out.println(“<HEAD><TITLE>Current Shopping Cart Items</TITLE></HEAD>”); out.println(“<BODY>”); // Get the current session ID, [...]

Read more

Java Compress data communication Object To BytesArray

http://www.unix.org.ua/orelly/java-ent/servlet/ch10_01.htm http://www.unix.org.ua/orelly/java-ent/servlet/ch10_02.htm http://www.oracle.com/technology/sample_code/tech/java/servlets/htdocs/basic.htm import java.io.*; import java.util.zip.*; public class CompressUtils { public CompressUtils() { } public static byte[] compressObjectToBytesArray(Object obj) throws IOException { byte abyte0[] = null; ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(); ObjectOutputStream objectoutputstream = new ObjectOutputStream(bytearrayoutputstream); objectoutputstream.writeObject(obj); objectoutputstream.close(); Deflater deflater = new Deflater(9); byte abyte1[] = bytearrayoutputstream.toByteArray(); deflater.setInput(abyte1); deflater.finish(); byte abyte2[] = new byte[abyte1.length]; [...]

Read more

Java Jnlp how to

http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/examples.html http://java.sun.com/developer/technicalArticles/Programming/jnlp/ http://java.sun.com/products/javawebstart/1.2/docs/developersguide.html * Introduction * Using a BasicService Service * Using a ClipboardService Service * Using a DownloadService Service * Using a FileOpenService Service * Using a FileSaveService Service * Using a PrintService Service * Using a PersistenceService Service * Using FileContents * Using a JNLPRandomAccessFile * Using a SingleInstanceService Service * Using a [...]

Read more

Cascading Style Sheet(Css)

plz download the tutor from here css

Read more

java Awt Notes

Download small Media library Project in java Media library Project User Interface Componect Classes A awt package contains a number of component classes that are typical elements of any interactive user interface.it is also called UI componect classes. Methods setSize(Dimension d) Resizes the corresponding component so that it has width d.width and height d.height setSize(int [...]

Read more

Using Global/Distributed Transactions in Java/JDBC with Oracle Real Application Clusters

This document describes some of the ways to leverage the high availability features of Oracle Real Application Cluster (RAC) databases by moving the load balancing functionality from the Oracle server/Oracle driver to your application. In this article, I discuss the ways to achieve load balancing of connections across RAC nodes and yet maintain the sticky [...]

Read more

Java data compression

introductionDo you need the ability to add data compression to your enterprise application? Well, look no further because Java 1.1 provides a package for zip-compatible data compression. The new package, java.util.zip, allows software developers to read, create, modify and write PKZIP and GZIP compatible files. This article will provide step-by-step examples for reading data from [...]

Read more
Servlet Applet Communication

Servlet Applet Communication

Introduction Java servlets provide a new and exciting method of developing server-side solutions. Servlets provide the features of traditional CGI scripts with the added benefits of efficiency and portability. Currently, major corporations are making the migration from CGI scripts to Java servlets. As a result, the demand for applet and servlet communication is on the [...]

Read more