struts2-convention-plugin

Struts 2 convention plugin - upload a file of more than 2 MB

落爺英雄遲暮 提交于 2019-12-02 07:11:22
If i try to upload a file of more than 2 MB size its error-ed. I found in apache web site saying "There are two separate file size limits. First is struts.multipart.maxSize which comes from the Struts 2 default.properties file. This setting exists for security reasons to prohibit a malicious user from uploading extremely large files to file up your servers disk space. This setting defaults to approximately 2 megabytes and should be adjusted to the maximum size file (2 gigs max) that your will need the framework to receive" So I found that this issue can be solved by adding the tag with the

Startup Error: java.lang.IncompatibleClassChangeError: org/apache/struts2/convention/DefaultClassFinder$InfoBuildingVisitor

陌路散爱 提交于 2019-12-01 14:12:52
I have a Struts2 application, originally XML-based, but now for the first time I introduced an Annotation-based action, and the application broke on startup. Given the following Action mapping, on startup of the application, I get the error java.lang.InstantiationError: com.opensymphony.xwork2.util.finder.ClassFinder at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:390) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:347) at org.apache.struts2.convention

Struts2 Convention Plugin is broken on Tomcat 8.x - org.apache.struts2.convention.PackageBasedActionConfigBuilder.error Unable to scan named packages

旧巷老猫 提交于 2019-12-01 08:29:02
问题 I'm using Struts 2.3.16 along with same version of the convention plugin. The application runs fine on Tomcat 7.0.35 but it fails with the following exception on Tomcat 8.0.3.0. 11-May-2014 06:26:01.421 WARNING [http-nio-8084-exec-5] com.opensymphony.xwork2.util.finder.UrlSet.warn Cannot translate url to external form! java.lang.NullPointerException at com.opensymphony.xwork2.util.finder.UrlSet.load(UrlSet.java:93) at com.opensymphony.xwork2.util.finder.UrlSet.<init>(UrlSet.java:83) at org

How do configure struts convention plugin with struts-spring plugin with Action class mapped with annotations

落爺英雄遲暮 提交于 2019-11-27 08:35:03
问题 I am trying to configure spring plugin with strut 2 application which is already running with convention plugin, so I am using annotations. I am using ExtJs for my form submission which was initially working well until I introduced the spring plugin, now the the ajax request cannot locate the actions and it's not showing any response in firebug. pom.xml <!-- struts 2 dependencies --> <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-core</artifactId> <version>${struts2

Struts 2 - reusing Custom Expression Validator

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 06:33:01
问题 In struts 2 we can develop @CustomValidator which can be used in application wide @CustomValidator(type = "CustomerNumberValidator", fieldName = "customerNo") For validation MORE THAN ONE FIELD we use @ExpressionValidator @ExpressionValidator(expression = "( (!''.equals(account.firstName) && (!''.equals(account.lastName) ) || (presonalAccount == false)", key = "validate.account.name") If the expression is too complicated and needs to work on MORE THAN ONE FIELD we use OGNL to call static

How to invoke a method on submit button in Struts 2 using convention plugin?

一曲冷凌霜 提交于 2019-11-26 18:30:15
问题 In the following piece of code about Struts action class, @Namespace("/admin_side") @ResultPath("/WEB-INF/content") // Default. public final class TestAction extends ActionSupport implements Serializable { private static final long serialVersionUID = 1L; private static final String SUCCESS = "success"; private String name; private String email; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void