Powered by Blogger.

How to configure Java in MyEclipse 9.1

>> Wednesday, August 29, 2012

Configure java1.5 on MyEclipse_JavabynataraJ
To run java using MyEclipse 9.1 we should configure this. MyEclipse having more features to develop projects and this will be very useful for developers. This is the next generation of the MyEclipse Enterprise Workbench IDE for enterprise Java and web developers. Basically it supports Java EE 6.0 features such as:
  • Servlet 3.0
  • JSF 2.0
  • JPA 2.0
  • EJB 3.1
  • JAX-RS 1.1
MyEclipse having some Struts 2 Enhancements
  • Improved connection routing
  • Better undo/redo suport
  • Struts 2 specific validation for Struts 2 configuration files
Install MyEclipse in you System.

Read more..

Display Current Date using GenericServlet

>> Sunday, August 26, 2012

We have a class named Date from java.util.Date package. We can use the Date class methods to display the date. We are going to display this date in the webpage using servlets.

Here we are using init methods to initialize the names and values. with this we can get the names and values from the web.xml file while the program runs. Actually this init(javax.servlet.ServletConfig) method is invoked by the container during initialization phase of the servlet interface.

init() method is a convienience method provided in javax.servlet.GenericServlet class. Generally, it is suggested that init(javax.servlet.ServletConfig) method present in javax.servlet.GenericServlet class should be given a chance to get executed, during servlet's initialization. This method, apart from performing some initialization process, invokes init() method at the end.

Read more..

How to Copy properties from one Bean OtherBean

>> Saturday, August 4, 2012

As we know the Bean class containing the variables with setters and getters methods. We can access through the getXxx and setXxx methods by different properties. To copy the properties form one bean to another they should have same datatypes.

To Run our program the requirements are:

As per shown in the below image you can create the files in Eclipse.

Read more..

How to Iterate Generic type of ArrayList

>> Sunday, June 10, 2012

Generics in Java
Generics were introduced in Java 1.5 to define abstract types for the variables of by enclosing a comma-separated list of their names within angle brackets after the name of the class or interface. We can user this type of variables any where in the class if a type is required in any instance fields or methods of the class.

Now in this post we are learning how to iterate the Generic type of list.

Normally we used to iterate any list we take the help of Iterator. If it is normal list as well we can iterate the Generic type.

Lets take a bean class of User with a constructor and setters and getters methods.

Here the User having the String type name and link variables.

Read more..

How to Reverse a String (Sentence) in Java

>> Sunday, April 22, 2012

Reverse a String the form of words we are taking the help of StringTokenizer class it is having six featured methods in its class. We can use two of them. First apply StringTokenizer on the String then Split the sentence to words using delimiter. Then push all the words into Stack class. At last pop all words from Stack.

We can form a reverse sentence in this easy way as show below diagram.

Read more..

Beginning JavaServer Pages Download

>> Friday, March 16, 2012

Beginning JavaServer Pages
JSP is one of the core technologies for server-side Java applications and the 2.0 release, which this book covers in detail, makes JSP an even more powerful tool.Walks Java programmers and Web developers through JSP fundamentals, including JSP syntax and directives, JSP Expression Language, JSP Tag libraries, JSTL, and techniques for testing and debugging.

Shows how to use JSP in real-world Web applications along with open source frameworks such as Struts, WebWork, and Turbine, software design methodologies, and developer tools like Ant, jUnit, and CVS, as well as popular IDEs (integrated development environmnents).Each chapter has an exercise section with solutions on the companion Web site.

Read more..

Related Posts Plugin for WordPress, Blogger...
© javabynataraj.blogspot.com from 2009 - 2022. All rights reserved.