Struts 2 Tutorials

struts2-thumbnail

Apache Struts 2 is another popular Model – View – Controller (MVC) framework from the Apache foundation. Since the inception of Struts 1, it is one of the most popular framework used by the Java developers. Struts 2 enhances the functionality to latest trend in the web applications development like AJAX, Annotations, etc. with simplified […]

Spring 4 Tutorials

spring-thumbnail

Spring 3 released on 2009. After a long time, a major release Spring 4 is from Spring community. In this time, there is lot of changes in the spring community. Spring is not just seen as the framework, it is moving beyond that level and seen as a enterprise solution provider. Spring is largest Java […]

How To Change Tomcat Default Port Configuration?

tomcat-thumbnail

Tomcat uses by default on port number 8080 on your computer. It is very common that you would have conflict of port number if there is another service running on the same port. You can change the port number for your tomcat server by changing in the configuration file or through the eclipse editor. 1. […]

Viewport Meta Tag For Responsive Design

html5-thumbnail

Responsive design is gaining more importance thanks to the fastest growth in interest usage using mobile phones and tablets. The web design has to adopt the different layouts looking at the user agent details like browser, desktop or mobile device, etc. It is not very easy to provide such a uniform user interface across all […]

Spring Security 3.2 Released

spring-thumbnail

Spring IO team has announced the Spring Security 3.2 release. There are couple of notable changes in this release are Java Configuration support, Improving security on CSRF attacks and click jacking and Servlet 3+ API support. As the list grows, there are plenty of minor API changes listed in their change notes. There are more […]

@Repeatable Annotation in Java 8

java-thumbnail

There are many features in the Java 8 release. Only few of them are discussed in the blogs and few are not noticed by many developers are not advertised as it is not popularly used by the common developers. One of such feature is the introduction of @Repeatable¬†annotation which tells the compiler that that annotation […]

Struts 2 + Log4j Integration

struts2-thumbnail

This example demonstrates how to integrate log4j to your struts 2 project. Add log4j.jar file in your project lib folder Create log4j.xml file with loggers and appenders. Here I have added file and console appenders. Each log message will be printed in console and a file. Make sure that log4j.xml file is in the classpath. […]

HttpServletContext in Struts 2 Action Class

struts2-thumbnail

There are two ways to get the servlet context object inside struts 2 action class’s execute method. ServletActionContext : Directly accessing the getContext method from the ServletActionContext class will return the context object. ServletContextAware : If you implement the action class with ServletContextAware interface, then struts controller will send the context object through setServletContext method. […]

HttpServletResponse in Struts 2 Action Class

struts2-thumbnail

There are two ways to get the servlet response object inside struts 2 action class’s execute method. ServletActionContext : Directly accessing the getresponse method from the ServletActionContext class will return the response object. ServletResponseAware : If you implement the action class with ServletResponseAware interface, then struts controller will send the response object through setServletResponse method. […]

HttpServletRequest in Struts 2 Action Class

struts2-thumbnail

There are two ways to get the servlet request object inside struts 2 action class’s execute method. ServletActionContext : Directly accessing the getRequest method from the ServletActionContext class will return the request object. ServletRequestAware : If you implement the action class with ServletRequestAware interface, then struts controller will send the request object through setServletRequest method. […]