• Menu
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

JavaBeat

Java Tutorial Blog

  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)

Struts 2 Tutorials

Struts 2 Tutorials

December 21, 2013 //  by Krishna Srinivasan//  Leave a Comment

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 …

Category: TutorialsTag: Struts 2 Tutorials

Struts 2 + Log4j Integration

December 16, 2013 //  by Krishna Srinivasan//  Leave a Comment

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. …

Category: StrutsTag: Struts 2 Tutorials

HttpServletContext in Struts 2 Action Class

December 16, 2013 //  by Krishna Srinivasan//  Leave a Comment

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. …

Category: JavaTag: Struts 2 Tutorials

HttpServletResponse in Struts 2 Action Class

December 16, 2013 //  by Krishna Srinivasan//  Leave a Comment

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. …

Category: StrutsTag: Struts 2 Tutorials

HttpServletRequest in Struts 2 Action Class

December 16, 2013 //  by Krishna Srinivasan//  Leave a Comment

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. …

Category: StrutsTag: Struts 2 Tutorials

Struts 2 Interceptors Example

December 15, 2013 //  by Krishna Srinivasan//  Leave a Comment

Interceptors are powerful mechanism to control the flow of each request. These are custom and default implementations which can be enforced to work as the callback methods at certain point of time. Struts 2 provides handful of default interceptors behind the scenes. One example is the exception handling at action level. Also we can write …

Category: StrutsTag: Struts 2 Tutorials

Struts 2 + JSON Integration

December 15, 2013 //  by Krishna Srinivasan//  Leave a Comment

Struts 2 provides struts2-json-plugin.jar for supporting the conversion of result type to JSON strings. Nowadays every framework supports the JSON formats because it is the most preferred format for the REST web services. This example shows how you can integrate Struts 2 and JSON. Get the struts2-json-plugin.jar and add to the lib folder In the …

Category: StrutsTag: Struts 2 Tutorials

Struts 2 Annotation Example

December 15, 2013 //  by Krishna Srinivasan//  Leave a Comment

Struts 2 supports annotations out of the box in its latest release without even a single line of configuration changes. You are not needed to create struts.xml file and there is no need to mention the scanning path anywhere like we mention in the spring framework. You have to add one extra JAR file struts2-convention-plugin.jar …

Category: StrutsTag: Struts 2 Tutorials

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 5
  • Go to Next Page »

Primary Sidebar

Follow Us

  • Facebook
  • Pinterest

FEATURED TUTORIALS

New Features in Spring Boot 1.4

Difference Between @RequestParam and @PathVariable in Spring MVC

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

Introductiion to Jakarta Struts

What’s new in Struts 2.0? – Struts 2.0 Framework

JavaBeat

Copyright © by JavaBeat · All rights reserved
Privacy Policy | Contact