xml-configuration

The requested resource (/StrutsHelloWorld/) is not available. Jboss AS7 Server

谁说胖子不能爱 提交于 2019-12-11 05:48:02
问题 I'm trying to build my very first struts application using Jboss AS 7 Server. I have the following error after deployed: HTTP Status 404 - /StrutsHelloWorld/ type Status report message /StrutsHelloWorld/ description The requested resource (/StrutsHelloWorld/) is not available. JBoss Web/7.0.13.Final I followed the guide from http://viralpatel.net/blogs/tutorial-create-struts-2-application-eclipse-example/ and changes my web.xml file on <filter-class>org.apache.struts2.dispatcher.ng.filter

Struts2 simple Application not executing

时间秒杀一切 提交于 2019-12-11 02:15:16
问题 Unable to load configuration. - bean - wsjar:file:/C:/Users/xx/IBM/rationalsdp/workspace/workspace1/Struts2Int/WebContent/WEB-INF/lib/struts2-gxp-plugin-2.3.15.3.jar!/struts-plugin.xml:8:162 I am unable to execute simple Struts 2.x application.I have tried solutions from all other Struts2 posts that are related to this but could not fix it. 回答1: The library struts2-gxp-plugin-2.3.15.3.jar is deployed with the application. But it should be removed from the library set if you don't use GXP in

Global results with Struts 2 and convention plugin

*爱你&永不变心* 提交于 2019-12-11 01:14:40
问题 i would like to have some global results in my application. In good old XML configuration it would look like: <global-results> <result name="error" type="redirectAction"> <param name="actionName">index</param> <param name="namespace">/</param> </result> </global-results> But as I'm using the convention plugin the global results in the XML seem to be ignored so how could I implement this using the convention plugin? I don't want to have all my action classes extend a custom class that has

Spring OAuth2 ClientId passed in as username for password grant type

孤街醉人 提交于 2019-12-10 18:53:35
问题 I am attempting a very basic implementation of the Spring OAuth2 library; however, when I send a request off to the server I receive the following error: { "error": "invalid_client", "error_description": "Bad client credentials" } When doing further debugging, I notice that for some reason the clientId is being passed in as the username within the resource owner flow. I have included my XML configuration and am curious if anyone could tell me if anything seems inherently wrong or if anyone

SpringBatch - javaconfig vs xml

家住魔仙堡 提交于 2019-12-08 02:29:43
问题 I have been using Xml configuration for Spring Batch for a while, and feel it is simpler and concise. However, nowadays, people are suggesting to use javaconfig over xml. I googled this topic. This site tells us why javaconfig is better https://blog.codecentric.de/en/2013/06/spring-batch-2-2-javaconfig-part-1-a-comparison-to-xml/ Top reasons to choose javaconfig over xml : We want to do some basic configurations in the framework. People add a dependency to our framework library and import

define interceptors with struts2 annotations

拜拜、爱过 提交于 2019-12-07 14:15:16
问题 I'm trying to use the struts2-convention-plugin which provides java annotations to define struts2 components. With Actions so far so good but how can i use annotations to define interceptors ? (i'm talking of @InterceptorRefs or @InterceptorRef ). Is this even possible ? At the moment i've configured actions with annotations and interceptors with the struts.xml file. Is it possible to completely eliminate the struts.xml file and use a 100% annotation oriented configuration ? 回答1: The struts2

Configuring Castle Windsor using xml/app.config

拈花ヽ惹草 提交于 2019-12-07 04:36:51
问题 I am currently building a sample application using Castle Windsor. The motto is to use xml/app.config to switch method interception on/off. I had used the Fluent API earlier and it worked as a charm. As the next step, I am trying to replace the fluent API with my xml. The gist of the code is as follows: A class called RandomOperations with two virtual methods. A LoggingAspect class which implements IInterceptor. A MyInterceptorsSelector class which implements IModelInterceptorsSelector A

Can I change the struts.xml file to anything else?

旧街凉风 提交于 2019-12-06 04:28:59
When I'm going though struts2, I came through a typical question. The question is that can I change the name of struts.xml file to some other thing and make it work? You can do that using your web.xml <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> <init-param> <param-name>config</param-name> <param-value>my-new-struts-config-file.xml,struts-plugin.xml,struts.xml</param-value> </init-param> </filter> Also, if you use the struts.properties you can do something like: struts.configuration.files=my-new

Elasticsearch HTTP authentication in Spring

时光总嘲笑我的痴心妄想 提交于 2019-12-06 04:20:03
问题 I want to access a remote elasticsearch which is protected by a username and password. https://[username]:[password]@aws-eu-west-1-portal1.dblayer.com:11109/ In Spring using the XML config I was able to access my localhost elastic as shown below <!-- ElasticSearch --> <elasticsearch:repositories base-package="be.smartsearch.service.repository.elasticsearch" /> <elasticsearch:transport-client id="esClient" cluster-nodes="localhost:9300" /> <bean id="elasticsearchTemplate" class="org

What's causing this NPE when I request an action?

谁都会走 提交于 2019-12-06 01:10:58
问题 This error was not there when I first run my program,then I tried some experiment to get the flow of MVC architecture but now it is showing me this exception. I guess the problem is when I request via subscribe button it will go to struts.xml where it will look for action. The problem is in package tag what should be there java.lang.NullPointerException org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:69) com.opensymphony.xwork2.DefaultActionProxy.prepare