Custom Validators in Struts 2.0

struts2-thumbnail

Struts 2.0 allows the use of Custom validators through the @CustomValidator annotation. The @CustomValidator annotation takes two mandatory parameters, type and message also read: Struts 2 Tutorials Struts Interview Questions Struts and Spring Integration type: Refers to the “name” given to the validator in the validators.xml file. message: Message to be displayed when this validator […]

Many-to-One Relationship in Hibernate Mappings – Example

This example program demonstrates how to write the many-to-one accociations using the hibernate mapping files. Book.java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 package hibernate;   import java.io.Serializable;   public class Book implements Serializable{ […]

Difference between hibernate’s save,update and saveOrUpdate() methods

Difference between hibernate’s save,update and saveOrUpdate() methods Hibetnate has set of methods for saving and updating the values in the database. The methods look like same and difficult to differentiate between them if you are not understanding them clearly. If you understand the hibernate mechanism clearly, it doesn’t execute the SQL statements directly to manipulate […]

How to enable SSL on JBoss application server?

wildfly-thumbnail

To enable SSL on JBoss add the following segment to JBOSS_HOME/server/default/deploy/jbossweb-tomcatxx.sar/server.xml as a child of the jboss.web Service element. also read: WebLogic Interview Questions JBoss Portal Server Development Tomcat Interview Questions NOTE: You can use any keystoreFile of your preference instead of the wso2wsas.jks which is shipped with WSO2 WSAS.

Sample code for SimpleDateFormat

java-thumbnail

also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials

Sample code for Listing file names in a directory

java-thumbnail

also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials

What is Shale Web Framework?

JSF-Thumbnail

Apache Shale is a Java Server Faces based Web Application Framework from the Apache software foundation. Shale is talked of as the “heir” Apache struts framework. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF We all know that struts is the most used Java Web Framework so far. While […]

EJB Webservices in JBoss application server sample code

java-ee-thumbnail

also read: Java EE Tutorials EJB Interview Questions EJB 3 Web Services Annotation and Dependency Injection in EJB 3 Query API in EJB 3 deploy above two classes by archieving in a jar and copy it to deploy folder of jboss then run ur jboss server with url http://localhost:8080/jbossws there u will get all ur […]

How to delete a cookie on server in a J2EE application

java-ee-thumbnail

There is no direct method offered by servlet API to delete a cookie on server side. This is how you can go about doing it. also read: Java EE Tutorials Servlets Interview Questions New Features in Servlets 3.0 Asynchronous Servlets in Servlets 3 Loop through the cookies in the request object to locate the one […]

Advantages and Disadvantages – JSF

JSF-Thumbnail

JSF is becoming more popular framework for user interface layer development, many architects and companies assuming that Struts is becoming outdated and JSF is catching up the market. I am not sure whether it is true at this point of time. However I would like to express my critic on the advantages and disadvantages of […]

Close
Please support the site
By clicking any of these buttons you help our site to get better