struts

How to disable struts 2 validation before form submission?

一笑奈何 提交于 2019-12-12 04:39:20
问题 I'm doing a project with struts2, Hibernate. I want struts to validate my form. I have added a MyAction-validation.xml and it works fairly well. (I say fairly well because it doesn't validate on the client side. I have set the validate attribute of the <s:form/> tag to true) First it provided me some errors and googling it I got that I should add a result with input name. So now I have a result with input name in my action without understanding well how it works and why. My action returns a

Populate a list element on to jsp using display table

家住魔仙堡 提交于 2019-12-12 04:32:49
问题 I am trying to populate the list "li" from the LoginAction on to the jsp page using display-table.And that list should be selectable.But when i run my jsp it says "nothing found to display".What might be the problem.And is display-table a better approach to use to make the list selectable and editable? or is there any other turn around?Thanks LoginAction.java public class LoginAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest

How to find Spring XML definition from Java Class in Eclipse

邮差的信 提交于 2019-12-12 04:32:18
问题 I work on a large Spring/Struts project in Eclipse. One thing I have to do frequently is dig through the spring.xml file so that I can update the definition for the class that I am working on. It seems like there should be an easy 2 or 3 click way to go from the Java class I am in to the Spring definition. I have SpringSource installed, but this doesn't seem to offer anything that's actually useful to me. Does anyone know if this is possible in Eclipse and how to do it? Bonus Question: is it

How to generate events in jsp pages?

三世轮回 提交于 2019-12-12 04:05:01
问题 Want to generate page events( pageload() ) in jsp is that possible? How to check weather a page is reloaded? In asp.net there is method name isPostBack() to check weather the page is request or reload is there anything in jsp? How to get start with struts and hibernate? 回答1: To check for a page reload you could use 'onBodyload' and 'onBodyUnload' events in body tag of your HTML code. For struts and hibernate check out onlojne documentation available. Good material to start with. 回答2: You need

displaytag, how to integrate checkboxes?

会有一股神秘感。 提交于 2019-12-12 03:56:14
问题 I use displaytag on a list bean: utilisateurBean . I need to add a column on this tab to add a checkbox for selecting an element. Pb : With the displaytag struts looks for the property choixUtilisateur in the bean and not in the formBean . Is there a way to talk struts/displaytag to map this property in the form? I don't understand the mix of prestenation layer/ business layer that this involves. I understand that I iterate on the bean and that he looks for the property in. But I did not

How to define an Integer bean in Struts 1.x

萝らか妹 提交于 2019-12-12 03:55:19
问题 How do you instantiate an Integer bean, assigning a value, in the Struts 1.x framework? <bean:define id="index" type="java.lang.Integer" value="0"/> or <bean:define id="index" type="java.lang.Integer" value="${0}"/> Results in a: java.lang.ClassCastException: java.lang.String <bean:define id="index" type="java.lang.Integer" value="<%=0%>"/> Results in: The method setValue(String) in the type DefineTag is not applicable for the arguments (int) <% java.lang.Integer index = new java.lang.Integer

Error taglib in my jsp

我与影子孤独终老i 提交于 2019-12-12 03:17:24
问题 I have a project where i use Maven and Struts 1.3.10. My dependencies in my Pom.xml: <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts-core</artifactId> <version>1.3.10</version> </dependency> <dependency> <groupId>org.apache.struts<

Not able to initialise application data source on creating a connection pool using BoneCP

佐手、 提交于 2019-12-12 03:14:36
问题 I have tried database connection pooling using BoneCP with struts but on Running the program i got the folling LOG Please help. Thanks in advance. Feb 19, 2012 4:52:22 PM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /DbcpDemo threw load() exception javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:812) at org.apache.struts

Struts 1.x file upload when file size > 8MB

情到浓时终转凉″ 提交于 2019-12-12 02:36:49
问题 I want to upload a file(zipped excel) in my application. The file size is almost 8MB. So it gives size error. I have tried to upload a small file, it works fine. But for size> 1 MB, it does not work. Is there any work around for uploading big (zipped) files??? I am using Struts 1.x framework. Thanks in advance! 回答1: From http://tomcat.apache.org/tomcat-5.5-doc/config/http.html maxPostSize The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing.

right to left with apache poi

亡梦爱人 提交于 2019-12-12 01:33:48
问题 i'm using apache poi to modify some existing rtf files and return a copy to the client in a web application the issu with me is when i try to replacesome text and insert another wich is in arabic instead. here my code : FileInputStream in = new FileInputStream(mypath); POIFSFileSystem fs = new POIFSFileSystem(in); HWPFDocument doc = new HWPFDocument(fs); Range r = doc.getRange(); r.replaceText("<matricule>"," "+agent.getMatriculeAgent()); r.replaceText("<cin>"," "+agent.getCin());