struts2

What jars shoul i include to a struts 2 app to work JasperReports?

I am using Struts 2.1.8.1 with full-hibernate-plugin and jfreechart-plugin. I would like to use jasperreports plugin, but common-*.jar from struts are different versions from those in jasperreports 3.7.3. And when I run de app i get this error SEVERE: Exception starting filter struts2 Unable to load configuration. - action - file:/...

Struts2 form elements UI too rigid

Hello, i found a similar problem like this: http://stackoverflow.com/questions/2314296/struts2-form-elements but no answer is given until now. So here i post my difficulties with a vengeance. I am using Struts2 with version 2.1.6. When I leave the input elements such as <s:textfield>, <s:textarea>, etc. of a <s:form> with the default ...

How to access struts interceptor parameters in Java?

I have the following code in struts.xml: <interceptor-ref name="checkTabsStack"> <param name="tabName">availability</param> </interceptor-ref> and I want to access the parameter tabName in the interceptor routine, how do i do that? i tried Map params = ActionContext.getContext().getParameters(); but params comes empty... Thank...

Using struts.xml with convention plugin

This seems like it should be easy to do, but I just can make it work. I'm hooked on the convention plugin in Struts 2.1. However, I need to define some package-level configuration such as a new interceptor stack and exception mappings. I'd like to use the struts.xml file for this, but I can't get the convention-based packages matched to ...

load table data on jsp using struts2 with fixed table structure

Hi. I want to have a fixed table structure on my jsp page(3row, 4column). but I want to load data for this table from DataBase with using struts 2. I know if my table structure wasn't fixed I could have just get a List and iterate on it and add a data in every iteration, but how could I do this in this case. also if I don't have enough...

Sending mail from the struts 2 application using the spring Framework email library

Hi all , I have to send a mail from the struts2 application using the Spring Framework email library how can i do that any help can be appreciated .. Thanks ...

How do i send a mail using the Spring Framework utility library for sending mails in struts2 application ?

Hai all , I am developing a Struts2 Application where i have a jsp page with email inputbox and a submit button ,when i submit the button the mail has to send to the mailid , how do i do this ? and How do i send a mail using the Spring Framework utility library from my struts2 application ? Thanks ...

Weird behaviour in Struts 2 validation

I have a Struts 2 app, the validation works just fine, it validates the necessary fields and throws the adequate error message. The problem comes in a very specific location i.e. character number 5838 ! In my validation.xml file I have numerous fields defined, one of them is <field name="idState"> <field-validator type="re...

Get status of servlet request before the response is returned

Good evening, I am in the process of writing a Java Servlet (Struts 2, Tomcat, JSP etc) which is capable of doing some fairly complex simulations. These can take up to 2 minutes to complete on the and will return a graph of the results. It is trivial to calculate the percentage of the simulation completed because the process works by re...

Struts2 Converting Enum Array fills array with single null value

For a simple action class with these member variables: ... private TestConverterEnum test; private TestConverterEnum[] tests; private List<TestConverterEnum> tList; ... And a simple enum: public enum TestConverterEnum { A, B, C; } Using the default struts2 enum conversion, when I send the request like so: TestConterter...

struts2 invalid.token returned when form submitted using JQuery

Hi, I have inherited some code in which I now have to add CSRF prevention and am trying to use the struts2 tokenSession interceptor to do this. I am adding a token to my form using the struts2 token tag like so: <form id="updateObject" name="updateObject" action="<%=request.getContextPath()%>/prv/updateObject.action" method="POST"> ...

Create a Modal Dialog box containing a form using struts2

Hi, In my application I have a part of form which should allow details of a n number of persons. i.e, Field1 Field2 field3 now a button Details of persons on button click it open a modal dialog box containg a form with 3 fields about person.When I click save. the details of persons sections should update...This should repeat on eve...

Struts2, problem with 2 variables in one address.

Hi. I'm using struts2, now in my jsp file i've got 2 variables: ${server_address} ${pageContext.request.contextPath} Now i want to connect it in my tag: <s:form action="%{server_address}%{pageContext.request.contextPath}/actionName.action"> But generated output looks like that: <form method="post" action="http://10.0.0.5:8088...

How to Configure Parameter Interceptors ?

Hi In my Struts2 applicaion I have a Jsp page with some feilds , like this <s:form action="customer.action" method="post" validate="false"> <s:textfield name="cust.fname" key="fname" size="20" /> <s:textfield name="cust.lname" key="lname" size="20" /> <s:textfield name="cust.title" key="title" size="20" /> <s...

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 any new values from the form. Is there an easy way to access this same object in my second ...

Struts 2 session values

I need to pass some field values from one jsp to another jsp using Struts2 and action classes. Can any one suggest me the best way to do it. How to pass values using SessionAware interface? ...

Using an extended interceptor in struts2 does not work w/ action parameters

I have a default package w/ an interceptor configure, and i'm extending that package into another one and calling the same interceptor <action name="availability**"> <param name="subTab">availability</param> <interceptor-ref name="tabStack"/> <result>/WEB-INF/jsp/index.jsp?include=visibilit/...

how can i configure my custom result type using convetions plugin in result.

I have created custom result class to serialize json data to xml. I want to configure this result class as a result type for some specific actions via conventions plug ins. But it is giving errors at the time of starting container. My code and error is given below. Please advice ASAP. Thank you for your valuable advice. My custom Resul...

deploying multiple struts2 applications JBOSS

I am deploying two struts2 applications as war files to JBOSS4.1 Sp1, i am getting the below error for the second application, while the first application is deployed successfully. it works fine for tomcat5.5. Also if i deploy these applications separatly one by one it works. I have been working since two days to solve it out but no hel...

Redirection Error with struts2-ssl-plugin

Hi! I'm trying to get the login part of my web application to use SSL. I'm using Tomcat (standalone, without apache) with struts2 and struts2-ssl-plugin, and have managed to at least get the necessary ports and connectors up, but when I try to open the login page, the plugin redirects back and forth between ports 80 and 443. The only c...