struts

Struts2 redirectAction is not https?

感情迁移 提交于 2019-12-08 14:04:03
问题 One of my result mapping type is a "redirectAction" in struts.xml which when executed constructs a NON secure link... Why is that? i wanted to constructs secure link using "redirectAction" what should i do? <result type="redirectAction" name="auth_stat"> <param name="actionName">auth_stat</param> </result> 回答1: Use a redirect result <result type="redirect" name="auth_stat"> <param name="location">https://www.yourserver.com/auth_stat</param> </result> 来源: https://stackoverflow.com/questions

struts2 : How to bring up a pop up window

∥☆過路亽.° 提交于 2019-12-08 13:46:50
问题 I am working on a Struts 2 application .I have a JSP page in which there is a normal html table. In one of the columns , I have a link called ' update ' . When I click on the ' update ' , a new popup window will open and the pop up will have many other details of the current row (which means it has to pass through some action and fetch data from database). There is a Submit button in popup , which when clicked , must submit the edited data . How do I create this popup in struts 2? Should it

Issue with Tomcat pooling with Hibernate. MySQL timeout

风格不统一 提交于 2019-12-08 12:11:31
问题 I've been developing a struts web app with hibernate3 on tomcat7 using MySQL . At first i've been using c3p0 pooling... then I've swithched to tomcat pooling . But I get the same error after a one day. Every morning we have to restart the server. The log shows java.lang.NullPointerException like this sm.Login.execute(Login.java:24) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl

java.lang.ClassCastException during action chaining - from Struts 1 to Struts 2

心不动则不痛 提交于 2019-12-08 10:52:23
问题 We have Struts 1 application.We need to migrate to Struts 2. With minor change.We are not going to change anything in Action class. We are using existing action class and Action Form. Action is getting triggered without any issues. But action chain is not working as expected. We are using many values from LoginAction to FetchInboxAction. Both are using two different form. Please find the sample struts.xml and error stack. The chain action is not working for us. Currently we are getting the

java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction exception occur in MYSQL

北城以北 提交于 2019-12-08 09:33:16
问题 I am Using a table name "test" in MYSQL that is lock during a transaction T1 that will be complete with in 20 minutes. When I am updating this table by another transaction T2 within these 20 minutes . I am getting an exception:- 11:58:38,584 ERROR [STDERR] java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction 11:58:38,584 ERROR [STDERR] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928) 11:58:38,584 ERROR [STDERR] at com.mysql.jdbc.MysqlIO.sendCommand

Tomcat adds [/] to the URL, Struts can't get the correct action name?

荒凉一梦 提交于 2019-12-08 08:06:12
问题 I have this project was working fine in Jetty, recently as requested, I'm testing it on Tomcat, but i found a problem. we're using Struts2, and the action mapping is defined with no extension, such as http://www.somehost.com/projectname/home when i get everything deployed into Tomcat and access the url above and i got this error: "There is no Action mapped for namespace [/] and action name [home/]" clearly somehow Tomcat added an extra / to the url, so the struts thinks the action name is

Retrieve the values of a nested list from JSP and send it back to form

大兔子大兔子 提交于 2019-12-08 07:55:32
问题 EDIT Now I know my problem is due to this. The link also provided solutions but I can't seem to figure out how to do it in the 2nd list. I will first show you the code structure I am working on. Here is Class MyForm: public class MyForm extends ValidatorForm { private List<ADTO> aDTOList; // getters and setters for aDTOList below public ADTO getADTO(int index) { if (aDTOList == null) { aDTOList = new ArrayList<ADTO>(); } if (aDTOList.size() - 1 < index) { while (aDTOList.size() - 1 < index) {

Uploading a file in struts1

北城余情 提交于 2019-12-08 07:33:52
问题 I want to upload a file in struts1 application. Currently the implementation is using File, like this: <html:file property="upload"/> But this does not allow to upload file if app is accessed from remote machine as this widget passes only the name of the file instead the whole file. 回答1: using only <html:file property="upload" / > will not make your application to upload a file. to support upload functionality,your form must have enctype="multipart/form-data" <html:form action=

Is there any statistics regarding the usage of Spring MVC vs Struts 2 and other frameworks?

拥有回忆 提交于 2019-12-08 07:33:47
问题 I'm doing an analysis of request-based web application frameworks to determine which one would be the most suitable for a particular project, and I've been asked to include some solid evidence showing that our choice is widely used and supported compared to other frameworks. Is there any statistics on the matter? Or even a list of major companies that use each one or something? 回答1: Well its hard to say anything which framework best fit in your needs as only you can do the analysis based on

multiple struts actions on single form not working [duplicate]

半腔热情 提交于 2019-12-08 06:42:49
问题 This question already has answers here : How to detect submit button clicked in multiple submit buttons scenario in single Action class? (2 answers) Closed 4 years ago . I am trying to call an action on submit button but it is not working. index.jsp <s:form method="post" enctype="multipart/form-data"> <s:file label="Upload Matrix.csv file:" name="file"></s:file> <s:submit value="Upload" action="uploadFile" cssClass="btn btn-info"></s:submit> <s:submit value="Update" action="fileData" cssClass