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

Calling struts 2 action from filter class

I added a filter in my struts 2 application. I am using this filter to check cookie values. If appropriate cookie is found then i want to redirect user to home page rather than normal login page. So for displaying home page I want to call struts 2…
Harsh
  • 1
  • 2
0
votes
2 answers

Action tag not executes in Struts 2

I have a problem invoking actions from my jsp pages with tag in struts2. I have the login.jsp file:
Vasi
  • 41
  • 1
  • 5
0
votes
0 answers

Mapping an action in the struts framework

I am facing problem in struts 1 , I want to call one action class for different url. Like service1.do service2.do service3.do i want to hit this service in same action class. and after i want to distinguish that request base on name of service in…
rampatel
  • 521
  • 3
  • 10
  • 17
0
votes
1 answer

Trying to set the right URL - Struts 2

I have a Struts2 app and I'm having a bit of a problem: at the first page (index.jsp) I have a javascript line that sets the url to './admin/Search' like this: window.location='./admin/Search'; that sends me to the login page and if I have access…
Tiago Farias
  • 3,397
  • 1
  • 27
  • 30
0
votes
1 answer

Struts2 - Validate error not refreshing on action tag call

I'm currently having a problem with my setup. I have this action tag in my JSP and below is the corresponding struts.xml entry
Jiro Manio
  • 137
  • 10
0
votes
1 answer

Error in my struts Action class

I have a JSP where I am showing date and description from database. Every entry has a unique id, but I am not showing on the page(showing checkbox) These entries are thrown using a "logic:iterate", so the number of rows is always changing based on…
Some Java Guy
  • 4,992
  • 19
  • 71
  • 108
0
votes
2 answers

Session management in interceptors and action of struts 2 application

I am having problem with session management in struts2. I am setting an attribute in the session in an interceptor which is the default interceptor for my entire application. In my action I am implementing SessionAware interface and grabbing the…
chandu
  • 1
  • 1
  • 1
0
votes
1 answer

Java Struts2 - How do I create an arraylist using struts tags, to be populated by user then the values should be passed to action?

I'm a newbie in Struts 2 and I want to create an arraylist in JSP using Struts tags. And then, the values inputted should be passed to an action. Also, how do I get it back from action into JSP? Bean public class BookingListAction extends…
iamjpcbau
  • 374
  • 1
  • 11
  • 29
0
votes
1 answer

There is no Action mapped for namespace [/] and action name error

This is the error messages: WARNING: No configuration found for the specified action: 'welcome' in namespace: ''. Form action defaulting to 'action' attribute's literal value. I have tried to put the struts under WEB-INF/classes already but it…
Andy
  • 103
  • 1
  • 5
0
votes
1 answer

How to recognize redirect and submit in struts action

My website use struts and tiles. I use this link to link to register form: Register here is the register.jsp:
hieu
  • 56
  • 2
  • 6
0
votes
2 answers

Struts 1.x ActionForm Action Class

I've got a simple html page with four buttons. I know how to map the buttons so that the Action Class gets the value of whatever is selected and call a method based on each button in the Action Class. However, what should I do with the Action Form?…
REAL O G
  • 693
  • 7
  • 23
0
votes
1 answer

Downloading pdf from intranet link to public URL

I am using Struts 1.x framework in my web application . When the user hits the application URL... ..intranet link is fetched from the db and it should generate the PDF and send this to the user.. Shall I use response.sendRedirect(intranet…
androidDev
  • 1,179
  • 4
  • 13
  • 31
0
votes
1 answer

Please explain Action in Struts 2.0 XML file

/user-login.jsp ${retUrl}
chetan
  • 3,175
  • 20
  • 72
  • 113
0
votes
1 answer

Struts 1.x action is being called multiple times

My application is using Struts 1.x and it's running on WAS.. All action classes are working fine except one wherein I click on one button and one action(which is expected to complete in 1hour) is called and then it starts executing ..the issue comes…
androidDev
  • 1,179
  • 4
  • 13
  • 31
0
votes
1 answer

Update object in Struts action with form values from JSP

I have a struts2 action that builds a form and pre-populates the fields with data from an instance of my object. When I click submit on this form, I get taken to a second action, my formSubmit action. Here I'd like the object to be updated with…
jcovert
  • 550
  • 1
  • 7
  • 21