Java Virtual Machine, or JVM as its name suggest is a "virtual" computer that resides in the "real" computer as a software process. JVM gives Java the flexibility of platform independence. Let us see first how exactly Java program is created, compiled and executed.Java code is written in .java file. This code contains one or more Java language attributes like Classes, Methods, Variable, Objects etc. ...
Let us see how to create a JAR file using Java's jar command as well as using Eclipse IDE. The JAR file format is based on the popular ZIP file format. Usually these file are used for archiving and distribution the files and implementing various libraries, components and plug-ins in java applications. Compiler and JVMs (Java Virtual Machine) can understand and implement these formats for ...
In this article we will explore the ways to implementation of LDAP (Lightweight Directory Access Protocol) authentication in Tomcat as well as JBoss server.First let us see briefly what LDAP is.Introduction to LDAPFollowing is what Wikipedia has to say about LDAP:The Lightweight Directory Access Protocol, or LDAP is an application protocol for querying and modifying directory services running over TCP/IP.A directory is a set of ...
Note: If you looking for tutorial "Create Struts2 Application in Eclipse"
Click here. In this tutorial we will create a hello world Struts application in Eclipse editor. First let us see what are the tools required to create our hello world Struts application.JDK 1.5 above (
download) Tomcat 5.x above or any other container (Glassfish, JBoss, Websphere, Weblogic etc) (
download) Eclipse 3.2.x ...
Remote procedure call (RPC) in javascript is a great concept of creating rich web applications. First we will see some background about RPC using JavaScript Object Notation (JSON). See following quote from Wikipedia entry of JSON-RPC. JSON-RPC is a remote procedure call protocol encoded in JSON. It is a very simple protocol (and very similar to ...
ZIP files offer a packaging mechanism, allowing multiple files to be bundled together as one. Thus, when you need to download a group of files from the web, you can package them into one ZIP file for easier transport as a single file. The bundling can include additional information like directory hierarchy, thus preserving necessary paths for an application or series of resources once unbundled.This ...
I encountered this problem with message resource property files in Struts. The problem is:I have an entry in property file where in it takes few arguements {0}, {1} etc.some.property.key = Hello {0}, Following is your account's detail. \ Please note that your registration no. {1} \ is going to expire on {2}, kindly login into your \ account {3} and update it.Now when I put the value for the ...
Recently I came up with a requirement where in we have to display messages from multiple bundle resource (message resource) property files in Struts using <bean:message>. Following are the steps for the same:Make an entry of message resource file name in struts-config.xml file.Once this is done, the message resource file can be accessed by using the key (in this case we have ...
This example lists the files and subdirectories in a directory.File dir = new File("directoryName"); String; } } // It is also possible to filter the list of returned files. // This example does not return any files that start with ...
Problem statement: While running following code, UnsupportedOperationException is thrown both at .add() and .remove() method. What is the problem with the code?List myNewList = Array.asList(someArrayOfLong); myNewList.add(new Long(15)); //add an element in the list. myNewList.remove(0); //remove element from the list at index 0.Solution: By the time you get to the remove(i) statement, list is no longer a java.util.ArrayList. When you call Arrays.asList it does not return a java.util.ArrayList. It returns ...