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
1 answer

Namespace problem in Struts2 when using Apache Tiles

I have a simple problem when I come to Struts2. I use tiles plugin in my Struts2 project. As all of us know, tiles are used for making templates. We can give namespace for our package in struts.xml, the configuration file :
Deepesh
  • 57
  • 8
2
votes
1 answer

struts2-rest-plugin failing: "org.apache.struts2.dispatcher.Dispatcher - Could not find action or result"

I'm writing a REST server, using struts2-rest-plugin. I'm testing the REST calls with SoapUI and Postman. I'm following the sample code here: https://cwiki.apache.org/confluence/display/WW/REST+Plugin My REST calls for controller.index())and…
FoggyDay
  • 11,962
  • 4
  • 34
  • 48
2
votes
2 answers

How to update an arraylist from a jsp file using Struts2

i'm generating an html table into a jsp file using struts2. i would like to change values contained into this arraylist, but the behaviour is not what i was expecting... my flow: Action.java: generate an arraylist "struct" which contains "n" (for…
kakashi99
  • 137
  • 3
  • 11
2
votes
1 answer

How to customize the Struts Json Plugin Date format for a global scope

As for the title. I don't want to add an annotation(@Json(format="yyyy-MM-dd HH:mm:ss") on every getXXXDate(),can anybody give a solution?
vivia
  • 21
  • 2
2
votes
2 answers

struts2+spring3: passing a variable from action to jsp (javascript code)

First of all, thank you very much to all these that are trying to solve our problems in this forum;) I am developing a web application with struts2+spring3. And I have a question about how to pass a variable (an array of arrays) from the action…
Aleix
  • 663
  • 1
  • 8
  • 22
2
votes
4 answers

Simple JSON example using Struts 2.2.x?

I’m having trouble getting JSON results working with Struts 2.2.1.1. Does anyone have a simple working example that returns a JSON result to a JSP using Struts 2.2.1.1 and is ready to run in Eclipse as a dynamic web project? Please include the…
johnnieb
  • 3,982
  • 4
  • 29
  • 32
2
votes
0 answers

How to use JWT with struts2

Can I use JWT tokens with struts2, if yes, please guide. We have an authentication server that provided JWT token and my old struts2 app must validate through it.
2
votes
0 answers

Programmatic configuration of Struts in Jetty

I'm trying to configure struts2 within Jetty programmatically, but am having a lot of trouble doing so. As these are for 'unit' tests, I don't wish to use spring or any other 'DI Framework'. here is what i have - (this is using my wrapper around…
time4tea
  • 2,169
  • 3
  • 16
  • 21
2
votes
0 answers

getting gateway timeout while executing a stored procedure via jdbc

I am using a struts2 framework which is basically like:- ActionClass execute { call function in business class which returns an object and store this object in session redirect to jsp } BusinessClass function() { sysout("start"); …
2
votes
2 answers

How to retrieve image struts 2 jquery plugin JSON result?

I want my application to retrieve an image from the database (or file system). Either way how can the div anchor tag handle an image? see the example link under Remove link with JSON Result here: struts2-jquery-plugin I have a struts2 action with…
Eras
  • 21
  • 3
2
votes
2 answers

Struts2 Convention Plugin @Actions not mapping with Spring Boot

When upgrading my application to use Spring Boot version 2.1.8.RELEASE + struts2-convention-plugin with Struts2-core version 2.5.20 the actions are not being mapped correctly and I am getting the…
clD
  • 2,523
  • 2
  • 22
  • 38
2
votes
1 answer

How to migrate Struts from V2.0 to V2.5

We are currently using Struts2.0, and planning to upgrade it to 2.5.X. Is there any migration process which helps me to directly upgrade to 2.5.X?, cause V2.0 is very old and lot of new things are implemented in later versions. Some have suggested…
AnilGoud
  • 45
  • 7
2
votes
1 answer

Question on Struts 2 and Struts-jQuery Autocompleter

Update: I get the result using firebug, but the result doesn't show on the pages? Anyone knows why? the result are like : {"results":["hello","bye"]} (PS: the jason plugin I posted is deprecated, which fires an error. I switched to the default…
Sheldon Rong
  • 1,506
  • 2
  • 14
  • 19
2
votes
1 answer

Location of jsp class file inside war file

When I am creating a war file for struts2.xx project called 'test'. I want to know where my *.jsp are converted into *.class, can you tell me the exact location of jsp's class file inside my war file? Environment Should running in Tomcat7.xx
Vinodh
  • 21
  • 2
2
votes
2 answers

Problem with html tags in Struts2 while displaying

Hi I have data which includes HTML tags in database, am retriving below data from database and displaying the same in UI, but issue is am not getting CC6 Filament text in bold, i had placed these 2 words in between html tag.... Data from…
Warrior
  • 3,184
  • 12
  • 44
  • 53