Questions tagged [struts2]

Apache Struts 2 is an extensible framework based on servlets and implements model–view–controller (MVC) pattern in its architecture for creating enterprise-ready Java web applications.

Apache Struts 2 is an extensible framework based on servlets and implements (MVC) pattern in its architecture for creating enterprise-ready Java web applications. The framework is designed to streamline the full development cycle, from building, to deploying, to maintaining applications over time.

It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture.

Apache Struts 2 was originally known as WebWork 2. After working independently for several years, the WebWork and Struts communities joined forces to create Struts2. This new version of Struts is simpler to use and closer to how Struts was always meant to be.

Features of Struts2

  • Simple POJO-based actions
  • Simplified testability
  • Thread safe AJAX support
  • Template support
  • Support for different result types
  • Easy to extend with plugins


References

Related tags :

11368 questions
2
votes
2 answers

How to invoke a webservice in Struts 2

I create a sample web service, how i can invoke this web service in my Struts 2 project.
Anshul
  • 635
  • 2
  • 11
  • 27
2
votes
1 answer

Is there any way to kill session on closing browser? I have used the onunload and onbeforeunload event. but it doesnt work

I have used the (window.onunload) and (window.onbeforeunload) event for capturing browser close event to kill session. but it doesn't work for me in chrome. Is there any way to do?
lalit
  • 55
  • 5
2
votes
2 answers

Struts2 - Validation & Tiles Parameter

So, my scene is below. The page show Article by call newInfo.action with articleId parameter The form action will call postComment.action postComment.action will call validate() validate() return the validation error. * The problem is here, how can…
thang.nguyen
  • 61
  • 1
  • 6
2
votes
1 answer

EHCache - org.ehcache.StateTransitionException: Persistence directory already locked by another process

I am running a struts2 application am I have to implement a cache to cache certain responses. I have used EHCache and created a helper class to initialize and configure the cache as follows: import java.io.File; import org.ehcache.Cache; import…
Desmond27
  • 173
  • 1
  • 4
  • 17
2
votes
3 answers

How to pass object data between action class and jsp page?

I am having a Java class named Code. It has all the values related to code like codeId, codeDescription etc with their getters and setters. I am retrieving the data of the Code in one action class successfully (I am using struts 2). Now I want to…
adn295
  • 21
  • 1
  • 1
  • 2
2
votes
2 answers

Access ApplicationResource.properties file from Action Class in Struts 2

can i access ApplicationResource.properties file keys from Action Class in Struts 2 and update the values of the key ?
Sankar R.K
  • 77
  • 2
  • 10
2
votes
4 answers

Dynamic Tables with Struts 2

What would be the best way to create a dynamic HTML table using the JQuery plugin? What I want to do is be able to pull data from my action class and be able to perform CRUD operations on that data which is presented in a table. I also want to be…
Spacebob
  • 267
  • 3
  • 13
2
votes
1 answer

Struts 2 JUnit plugin and multiple struts configuration files

After several hours surfing the web looking for an answer to this issue, finally I decided to post the question here. I'm using the struts 2 junit plugin to test some actions of a struts 2 application. The main struts config file (struts.xml) is…
2
votes
2 answers

Give me an Example with reason for why we are use Struts?

I want to start learning Apache Struts 2. Please explain the benefits of using a web framework such as Struts 2. Also what are the differences between Struts 1 and Struts 2?
user529429
2
votes
3 answers

Strut2 - Get Property value in next Action

I am using my struts.xml contains demo
Lohit
  • 891
  • 5
  • 14
  • 26
2
votes
2 answers

Retrieve the elements of ArrayList using struts 2 tag without using s:iterate

Source Code of LoginAction.java package com.test; import java.util.ArrayList; import java.util.List; public class LoginAction { private List list; public void setList(List list) { this.list = list; } public List…
Shashi
  • 12,487
  • 17
  • 65
  • 111
2
votes
2 answers

How To Generate unique HTML id attributes within Struts 2 iterator tag

I need to generate unique id attributes within the struts iterator on the lines of
etc, etc. I've tried
user497087
  • 1,561
  • 3
  • 24
  • 41
2
votes
1 answer

My Struts.xml file is unable to redirect to my action class and giving me 404 error

I'm new to Struts and I have tried to build the basic application in Struts2. The Web app is giving me 404 Error as the the It cannot find the result or action class. Below are the code snippets of various files. Thank you in advance for…
2
votes
2 answers

Struts menu with Spring security. any advantage? tutorials? examples?

I am using simple JSP pages for menu. There are diffrent menu for user and admin. Both menu contains different links. I am using tiles to integrate those menu to my forms. Now, is there any advantages of using struts menu with spring security. Any…
Sagar
  • 1,242
  • 7
  • 22
  • 49
2
votes
1 answer

spring security not working

I am developing a struts2 + spring + tiles + hibernate + spring security application When I go to url /register I am correctly redirected to the login page, but on logging in with username and password specified in the bean configuration file, I am…
Sumit Jain
  • 1,484
  • 2
  • 25
  • 44