Questions tagged [actioncontext]

The ActionContext is a Struts 2 container for objects needed by the application when the action is executed.

The ActionContext is a Struts 2 container for objects needed by the application when the action is executed. An action context used to access those objects during the the action execution. When Struts2 request is handled by the framework it creates an ActionContext and populate it with the framework core objects, such as request, session, application, valueStack, servlet context objects, parameters, locale, etc. The benefit of this is there's no need to worry about a user specific action context, and it could get statically from the class ActionContext which is ThreadLocal in every request.

References:

66 questions
0
votes
1 answer

session objects action context struts2

I am going through some of the links like this SO question and found that a new action context is created for every new Action request. suppose if there is a request to an Action A, a new ActionContext AC1 is created. I save something like…
vjk
  • 2,163
  • 6
  • 28
  • 42
0
votes
2 answers

Struts2 insert and update child and parent the same table

I use Hibernate and Struts2 to build a small website I have a table call Category Struture like: ID Category Name Parentcatid ... All My Files are: Category Pojo import java.io.Serializable; import java.util.List; import…
Shen
  • 102
  • 1
  • 19
0
votes
0 answers

How can i invoke the "execute" method of an Action redirected from another action in Struts 2?

I've got a problem with redirecting from one action to another in struts 2. In action one (called: StudentZuPruefungHinzufuegen) i am creating action errors and want to show these in action two (called:ZeigePruefungsliste). If i just use the…
0
votes
2 answers

can not login when using Interceptor in struts2

I have a small application to learn Struts2 Application I write a admin page and inside that , my code will check if user logged or not, if not it will redirect to login page. I write interceptor to check for all pages that user try to access but…
Shen
  • 102
  • 1
  • 19
0
votes
1 answer

Strut 2.3.1.2 Unit test, how to remove Spring codependency vs NPE with getContext()

I'm just upgrading to Struts 2.3.1.2, and having a few issues with JUnit tests. My old test code was like this.... public class HomeActionTest { @Test public void testUserNameErrorMessage() throws Exception { HomeAction action = new…
jeff porter
  • 6,560
  • 13
  • 65
  • 123
-1
votes
1 answer

Whats the difference between ActionContext,ServletContext and ServletActionContext?

In Java EE, we often use ActionContext,ServletContext and ServletActionContext, they have similar name, but I don't know the difference between them. I only know the ServletActionContext inherit the ActionContext. Someone can explain them?
s-n-2
  • 405
  • 1
  • 6
  • 24
1 2 3 4
5