Questions tagged [struts-action]

An Action is an adapter between the contents of an incoming HTTP request and the corresponding business logic that should be executed to process this request.

Action classes act as the controller in the MVC pattern. Action classes respond to a user action, execute business logic (or call upon other classes to do that), and then return a result that tells Struts what view to render.

One of the most common responsibilities of the Action class is to process user input on a form and then make the result of the processing available to the view page. When the form is submitted, Struts will call any set methods of the Action class that match the form field names.

98 questions
0
votes
2 answers

How to get struts2 action messages on to Modal

I have a login modal. The modal(bootstrap) form is a part of header.jsp which gets included in every JSP. How do I get action error messages back to my modal if user enters wrong username/password? Struts.xml
user1493834
  • 756
  • 4
  • 11
  • 25
0
votes
1 answer

Struts. Go back to same page after an action

my situation is the following: I have a project with JSP, Struts and a lot of actions. Lets say that I have these 3 main groups {contacts.do, calendar.do and notes.do} with lot of actions in each of them. I have an action unrelated to all of them…
framara
  • 2,833
  • 5
  • 28
  • 32
0
votes
0 answers

There is no Action mapped for namespace [/] and action name [login] associated with context path [/jilmt]

I am getting this exception in jboss 5.1.0m but if I deploy it in jboss 5.0.0 it works fine. 10:02:28,379 WARN [ServletUrlRenderer] No configuration found for the specified action: 'login' in namespace: '/'. Form action defaulting to 'action'…
NULL Pointer
  • 129
  • 1
  • 1
  • 10
0
votes
1 answer

Why struts.xml is correct, but the page is 404?

Struts version is 2.3.16 In struts.xml, I added this /out.jsp the xml and the UserAccount class are correct, because some request to this url is…
CL So
  • 3,647
  • 10
  • 51
  • 95
0
votes
1 answer

How to send strings to server using Java?

I need to send a lot of strings to a web server using Java. I have a List with huge amount of strings and I need to send it via POST request to the Struts2 action on the server side. I have tried something starting with HttpPost httppost =…
Magno C
  • 1,922
  • 4
  • 28
  • 53
0
votes
0 answers

There is no Action mapped for namespace [/] and action name [searchUser] associated with context path []

Before converting my Struts Action into annotations, the project was working fine. But now I was trying to do with annotations, and having this error. My Earlier struts.xml file that contained the action is :
0
votes
1 answer

Using request across 2 different struts-action flows

I have a struts action flow(struts-1.x framework), which, when executes, the action class ActionFlowActionUnit1.java sets a String variable varName to request using the code request.setAttribute("varNameFromRequest", varName); and the flow finally…
AlwaysALearner
  • 6,320
  • 15
  • 44
  • 59
0
votes
0 answers

Struts compare value between entitty class and action form

I've a website which build using struts framework. I want to keep track if there any changes made to value that previously save in database. So I want to compare value between actionForm and entities class. The idea is something like this, public…
Zahary
  • 329
  • 8
  • 23
0
votes
2 answers

struts taglib: set request parameter in jsp

i iterate a list of news on a page with two buttons there: edit and view,so i want to set news id to request scope to use it then in edit action, here is the form
DeadKennedy
  • 749
  • 3
  • 14
  • 22
0
votes
1 answer

Struts Error Message not getting Displayed in UI

I am using Struts 1.2 for my application. I have a validate method for my form where I am doing some validation for the inputs provided by the user. Below is the code for the userName provided by the user: @Override public ActionErrors…
user182944
  • 7,897
  • 33
  • 108
  • 174
0
votes
0 answers

Need to look up a description for an id from database; can i use struts type converter?

I have an id in the bean and mapped in orm.xml to database. For each id I have to lookup description from database and display. If I have enum values R:"RED" G:"GREEN". Struts does type conversion using EnumConverter. I just want to do similar…
user1769790
  • 1,183
  • 3
  • 11
  • 23
0
votes
1 answer

Struts help needed

I have an issue.I need to run a query to get a data say test from a table t.The query currently runs in an action class.Its taking 20 seconds to run.Now my problem is not all times t is going to have value and the users will be annoyed if I make…
Harish
  • 1,617
  • 4
  • 21
  • 20
0
votes
2 answers

Session handling in a Struts application

I am facing an issue in handling an object in session. I store an object in the session like this. Assume object is the name of the object. I do this in my action class: if(object!=null) { session.settAttribute("objectName",object); return…
Harish
  • 1,617
  • 4
  • 21
  • 20
0
votes
2 answers

Struts 1.3 Passing undeclared value to mapping.findForaward

In Struts 1.3 Action class, we return value as return mapping.findForward("success"); What will happen if "success" is undefined in the action tag for that action
Kaushik Lele
  • 6,439
  • 13
  • 50
  • 76
0
votes
1 answer

how to specify action url in struts 1

the action as specified below is not found
****
the error is : message Invalid path /situationAdministrative/evaluation/editEvaluation was requested but where i write the url as this…
fatiDev
  • 5,752
  • 7
  • 28
  • 45