integrate with后能加and吗

How to integrate Spring-security, struts2 and tiles3 [如何整合Spring Security,Struts2和tiles3] - 问题-字节技术
How to integrate Spring-security, struts2 and tiles3
如何整合Spring Security,Struts2和tiles3
问题 (Question)
I am trying to integrate Springsecurity, struts2 and tiles3, once I run my application, it runs into following error, please let me know if I should include any other part of my code.
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.view.tiles3.tilesConfigurer] for bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.view.tiles3.tilesConfigurer. Please see server.log for more details.
The module has not been deployed.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178)
org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130)
org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
According to this question Spring does not support Tiles3 is that correct ?
applicationContext.xml
&?xml version='1.0' encoding='UTF-8'?&
&beans xmlns='http://www.springframework.org/schema/beans'
xmlns:context='http://www.springframework.org/schema/context'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd'&
&context:component-scan base-package='com.MyProject'/&
&bean id='internalResourceResolver'
class='org.springframework.web.servlet.view.InternalResourceViewResolver'&
&property name='prefix' value='/Web Pages/'/&
&property name='suffix' value='.jsp'/&
class='org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping'/&
class='org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter'/&
&bean id='placeholderConfig'
class='org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'/&
&bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver"&
&property name="viewClass"&
org.springframework.web.servlet.view.tiles3.tileviewresolver
&/property&
&bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles3.tilesConfigurer"&
&property name="definitions"&
&value&/WEB-INF/tiles.xml&/value&
&/property&
&?xml version="1.0" encoding="UTF-8"?&
&web-app version="3.0" xmlns="/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="/xml/ns/javaee /xml/ns/javaee/web-
app_3_0.xsd"&
&context-param&
&param-name&org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG&/param-name&
&param-value&/WEB-INF/tiles.xml&/param-value&
&/context-param&
&listener&
&listener-class&org.apache.pleteAutoloadTilesListener&/listener-
&/listener&
&listener&
&listener-class&org.springframework.web.context.ContextLoaderListener&/listener-
&/listener&
&context-param&
&param-name&contextConfigLocation&/param-name&
&param-value&
/WEB-INF/applicationContext.xml
/WEB-INF/myProject-security.xml
/WEB-INF/login-service.xml
&/param-value&
&/context-param&
&filter-name&springSecurityFilterChain&/filter-name&
&filter-class&
org.springframework.web.filter.DelegatingFilterProxy
&/filter-class&
&filter-mapping&
&filter-name&springSecurityFilterChain&/filter-name&
&url-pattern&/*&/url-pattern&
&/filter-mapping&
&filter-name&struts2&/filter-name&
class&org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&/filter-
&filter-mapping&
&filter-name&struts2&/filter-name&
&url-pattern&/*&/url-pattern&
&/filter-mapping&
&session-config&
&session-timeout&
&/session-timeout&
&/session-config&
&welcome-file-list&
&welcome-file&index.jsp&/welcome-file&
&/welcome-file-list&
&/web-app&
&project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-
4.0.0.xsd"&
&modelVersion&4.0.0&/modelVersion&
&groupId&com.myproject&/groupId&
&artifactId&MyProject&/artifactId&
&version&1.0&/version&
&packaging&war&/packaging&
&name&MyProject&/name&
&properties&
&endorsed.dir&${project.build.directory}/endorsed&/endorsed.dir&
&project.build.sourceEncoding&UTF-8&/project.build.sourceEncoding&
&glassfish.embedded-static-shell.jar&C:\Program
Files\Java\jre7\bin\glassfish\lib\embedded\glassfish-embedded-static-
shell.jar&/glassfish.embedded-static-shell.jar&
&netbeans.hint.deploy.server&gfv3ee6&/netbeans.hint.deploy.server&
&/properties&
&dependencies&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts2-core&/artifactId&
&version&2.3.8&/version&
&/dependency&
&dependency&
&groupId&commons-fileupload&/groupId&
&artifactId&commons-fileupload&/artifactId&
&version&1.2.1&/version&
&/dependency&
&dependency&
&groupId&org.mortbay.jetty&/groupId&
&artifactId&jsp-2.1-glassfish&/artifactId&
&version&9.1.02.B04.p0&/version&
&/dependency&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts2-convention-plugin&/artifactId&
&version&2.3.14&/version&
&/dependency&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts2-dojo-plugin&/artifactId&
&version&2.3.14&/version&
&/dependency&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts-taglib&/artifactId&
&version&1.3.10&/version&
&/dependency&
&dependency&
&groupId&jdbc&/groupId&
&artifactId&jdbc-stdext&/artifactId&
&version&2.0&/version&
&type&pom&/type&
&/dependency&
&dependency&
&groupId&javax.sql&/groupId&
&artifactId&jdbc-stdext&/artifactId&
&version&2.0&/version&
&type&pom&/type&
&/dependency&
&dependency&
&groupId&org.glassfish.extras&/groupId&
&artifactId&glassfish-embedded-static-shell&/artifactId&
&version&3.1.1&/version&
&scope&system&/scope&
&systemPath&${glassfish.embedded-static-shell.jar}&/systemPath&
&/dependency&
&dependency&
&groupId&com.kenai.nbpwr&/groupId&
&artifactId&org-apache-commons-dbcp&/artifactId&
&version&1.2.2-&/version&
&type&nbm&/type&
&/dependency&
&dependency&
&groupId&mysql&/groupId&
&artifactId&mysql-connector-java&/artifactId&
&version&5.1.24&/version&
&/dependency&
&dependency&
&groupId&org.springframework&/groupId&
&artifactId&spring-webmvc&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&org.springframework.security&/groupId&
&artifactId&spring-security-web&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&org.springframework.security&/groupId&
&artifactId&spring-security-core&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&org.springframework.security&/groupId&
&artifactId&spring-security-taglibs&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&org.springframework.security&/groupId&
&artifactId&spring-security-config&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&commons-dbutils&/groupId&
&artifactId&commons-dbutils&/artifactId&
&version&1.5&/version&
&type&jar&/type&
&/dependency&
&dependency&
&groupId&struts&/groupId&
&artifactId&struts&/artifactId&
&version&1.2.9&/version&
&/dependency&
&dependency&
&groupId&javax.servlet&/groupId&
&artifactId&jstl&/artifactId&
&version&1.2&/version&
&/dependency&
&dependency&
&groupId&org.apache.taglibs&/groupId&
&artifactId&taglibs-parent&/artifactId&
&version&3&/version&
&type&pom&/type&
&/dependency&
&dependency&
&groupId&com.itextpdf&/groupId&
&artifactId&itextpdf&/artifactId&
&version&5.3.2&/version&
&/dependency&
&dependency&
&groupId&com.google.zxing&/groupId&
&artifactId&javase&/artifactId&
&version&1.7&/version&
&/dependency&
&dependency&
&groupId&com.google.zxing&/groupId&
&artifactId&core&/artifactId&
&version&1.7&/version&
&/dependency&
&dependency&
&groupId&javax.xml&/groupId&
&artifactId&jaxrpc&/artifactId&
&version&1.1&/version&
&type&pom&/type&
&/dependency&
&dependency&
&groupId&taglibs&/groupId&
&artifactId&fmt&/artifactId&
&version&1.1.2&/version&
&type&tld&/type&
&/dependency&
&dependency&
&groupId&commons-beanutils&/groupId&
&artifactId&commons-beanutils&/artifactId&
&version&1.8.0&/version&
&/dependency&
&dependency&
&groupId&commons-digester&/groupId&
&artifactId&commons-digester&/artifactId&
&version&2.0&/version&
&/dependency&
&dependency&
&groupId&commons-io&/groupId&
&artifactId&commons-io&/artifactId&
&version&1.3.2&/version&
&/dependency&
&dependency&
&groupId&net.sf.opencsv&/groupId&
&artifactId&opencsv&/artifactId&
&version&2.3&/version&
&type&jar&/type&
&/dependency&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts2-tiles3-plugin&/artifactId&
&version&2.3.14&/version&
&/dependency&
&dependency&
&groupId&javax&/groupId&
&artifactId&javaee-web-api&/artifactId&
&version&6.0&/version&
&type&jar&/type&
&/dependency&
&dependency&
&groupId&axis&/groupId&
&artifactId&axis&/artifactId&
&version&1.4&/version&
&/dependency&
&dependency&
&groupId&commons-discovery&/groupId&
&artifactId&commons-discovery&/artifactId&
&version&0.2&/version&
&/dependency&
&dependency&
&groupId&commons-logging&/groupId&
&artifactId&commons-logging&/artifactId&
&version&1.1.1&/version&
&/dependency&
&dependency&
&groupId&org.slf4j&/groupId&
&artifactId&slf4j-log4j12&/artifactId&
&version&1.5.6&/version&
&/dependency&
&dependency&
&groupId&log4j&/groupId&
&artifactId&log4j&/artifactId&
&version&1.2.15&/version&
&exclusions&
&exclusion&
&groupId&com.sun.jmx&/groupId&
&artifactId&jmxri&/artifactId&
&/exclusion&
&exclusion&
&groupId&com.sun.jdmk&/groupId&
&artifactId&jmxtools&/artifactId&
&/exclusion&
&exclusion&
&groupId&javax.jms&/groupId&
&artifactId&jms&/artifactId&
&/exclusion&
&/exclusions&
&/dependency&
&dependency&
&groupId&org.slf4j&/groupId&
&artifactId&slf4j-api&/artifactId&
&version&1.5.6&/version&
&/dependency&
&/dependencies&
&groupId&org.apache.maven.plugins&/groupId&
&artifactId&maven-compiler-plugin&/artifactId&
&version&2.3.2&/version&
&configuration&
&source&1.6&/source&
&target&1.6&/target&
&compilerArguments&
&endorseddirs&${endorsed.dir}&/endorseddirs&
&/compilerArguments&
&/configuration&
&groupId&org.apache.maven.plugins&/groupId&
&artifactId&maven-war-plugin&/artifactId&
&version&2.1.1&/version&
&configuration&
&failOnMissingWebXml&false&/failOnMissingWebXml&
&/configuration&
&groupId&org.apache.maven.plugins&/groupId&
&artifactId&maven-dependency-plugin&/artifactId&
&version&2.1&/version&
&executions&
&execution&
&phase&validate&/phase&
&goal&copy&/goal&
&configuration&
&outputDirectory&${endorsed.dir}&/outputDirectory&
&silent&true&/silent&
&artifactItems&
&artifactItem&
&groupId&javax&/groupId&
&artifactId&javaee-endorsed-api&/artifactId&
&version&6.0&/version&
&type&jar&/type&
&/artifactItem&
&/artifactItems&
&/configuration&
&/execution&
&/executions&
&/plugins&
&/project&
我试图整合springsecurity,Struts2和tiles3,一旦我运行我的应用程序,它运行到下面的错误,请让我知道如果我应该包括我的代码的其他部分。Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.web.servlet.view.tiles3.tilesConfigurer] for bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.web.servlet.view.tiles3.tilesConfigurer. Please see server.log for more details.
The module has not been deployed.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178)
org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130)
org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
针对这一问题弹簧不支持tiles3是正确吗?applicationContext.xml
&?xml version='1.0' encoding='UTF-8'?&
&beans xmlns='http://www.springframework.org/schema/beans'
xmlns:context='http://www.springframework.org/schema/context'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd'&
&context:component-scan base-package='com.MyProject'/&
&bean id='internalResourceResolver'
class='org.springframework.web.servlet.view.InternalResourceViewResolver'&
&property name='prefix' value='/Web Pages/'/&
&property name='suffix' value='.jsp'/&
class='org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping'/&
class='org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter'/&
&bean id='placeholderConfig'
class='org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'/&
&bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver"&
&property name="viewClass"&
org.springframework.web.servlet.view.tiles3.tileviewresolver
&/property&
&bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles3.tilesConfigurer"&
&property name="definitions"&
&value&/WEB-INF/tiles.xml&/value&
&/property&
&?xml version="1.0" encoding="UTF-8"?&
&web-app version="3.0" xmlns="/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="/xml/ns/javaee /xml/ns/javaee/web-
app_3_0.xsd"&
&context-param&
&param-name&org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG&/param-name&
&param-value&/WEB-INF/tiles.xml&/param-value&
&/context-param&
&listener&
&listener-class&org.apache.pleteAutoloadTilesListener&/listener-
&/listener&
&listener&
&listener-class&org.springframework.web.context.ContextLoaderListener&/listener-
&/listener&
&context-param&
&param-name&contextConfigLocation&/param-name&
&param-value&
/WEB-INF/applicationContext.xml
/WEB-INF/myProject-security.xml
/WEB-INF/login-service.xml
&/param-value&
&/context-param&
&filter-name&springSecurityFilterChain&/filter-name&
&filter-class&
org.springframework.web.filter.DelegatingFilterProxy
&/filter-class&
&filter-mapping&
&filter-name&springSecurityFilterChain&/filter-name&
&url-pattern&/*&/url-pattern&
&/filter-mapping&
&filter-name&struts2&/filter-name&
class&org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&/filter-
&filter-mapping&
&filter-name&struts2&/filter-name&
&url-pattern&/*&/url-pattern&
&/filter-mapping&
&session-config&
&session-timeout&
&/session-timeout&
&/session-config&
&welcome-file-list&
&welcome-file&index.jsp&/welcome-file&
&/welcome-file-list&
&/web-app&
pom.xml&project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-
4.0.0.xsd"&
&modelVersion&4.0.0&/modelVersion&
&groupId&com.myproject&/groupId&
&artifactId&MyProject&/artifactId&
&version&1.0&/version&
&packaging&war&/packaging&
&name&MyProject&/name&
&properties&
&endorsed.dir&${project.build.directory}/endorsed&/endorsed.dir&
&project.build.sourceEncoding&UTF-8&/project.build.sourceEncoding&
&glassfish.embedded-static-shell.jar&C:\Program
Files\Java\jre7\bin\glassfish\lib\embedded\glassfish-embedded-static-
shell.jar&/glassfish.embedded-static-shell.jar&
&netbeans.hint.deploy.server&gfv3ee6&/netbeans.hint.deploy.server&
&/properties&
&dependencies&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts2-core&/artifactId&
&version&2.3.8&/version&
&/dependency&
&dependency&
&groupId&commons-fileupload&/groupId&
&artifactId&commons-fileupload&/artifactId&
&version&1.2.1&/version&
&/dependency&
&dependency&
&groupId&org.mortbay.jetty&/groupId&
&artifactId&jsp-2.1-glassfish&/artifactId&
&version&9.1.02.B04.p0&/version&
&/dependency&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts2-convention-plugin&/artifactId&
&version&2.3.14&/version&
&/dependency&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts2-dojo-plugin&/artifactId&
&version&2.3.14&/version&
&/dependency&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts-taglib&/artifactId&
&version&1.3.10&/version&
&/dependency&
&dependency&
&groupId&jdbc&/groupId&
&artifactId&jdbc-stdext&/artifactId&
&version&2.0&/version&
&type&pom&/type&
&/dependency&
&dependency&
&groupId&javax.sql&/groupId&
&artifactId&jdbc-stdext&/artifactId&
&version&2.0&/version&
&type&pom&/type&
&/dependency&
&dependency&
&groupId&org.glassfish.extras&/groupId&
&artifactId&glassfish-embedded-static-shell&/artifactId&
&version&3.1.1&/version&
&scope&system&/scope&
&systemPath&${glassfish.embedded-static-shell.jar}&/systemPath&
&/dependency&
&dependency&
&groupId&com.kenai.nbpwr&/groupId&
&artifactId&org-apache-commons-dbcp&/artifactId&
&version&1.2.2-&/version&
&type&nbm&/type&
&/dependency&
&dependency&
&groupId&mysql&/groupId&
&artifactId&mysql-connector-java&/artifactId&
&version&5.1.24&/version&
&/dependency&
&dependency&
&groupId&org.springframework&/groupId&
&artifactId&spring-webmvc&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&org.springframework.security&/groupId&
&artifactId&spring-security-web&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&org.springframework.security&/groupId&
&artifactId&spring-security-core&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&org.springframework.security&/groupId&
&artifactId&spring-security-taglibs&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&org.springframework.security&/groupId&
&artifactId&spring-security-config&/artifactId&
&version&3.0.7.RELEASE&/version&
&/dependency&
&dependency&
&groupId&commons-dbutils&/groupId&
&artifactId&commons-dbutils&/artifactId&
&version&1.5&/version&
&type&jar&/type&
&/dependency&
&dependency&
&groupId&struts&/groupId&
&artifactId&struts&/artifactId&
&version&1.2.9&/version&
&/dependency&
&dependency&
&groupId&javax.servlet&/groupId&
&artifactId&jstl&/artifactId&
&version&1.2&/version&
&/dependency&
&dependency&
&groupId&org.apache.taglibs&/groupId&
&artifactId&taglibs-parent&/artifactId&
&version&3&/version&
&type&pom&/type&
&/dependency&
&dependency&
&groupId&com.itextpdf&/groupId&
&artifactId&itextpdf&/artifactId&
&version&5.3.2&/version&
&/dependency&
&dependency&
&groupId&com.google.zxing&/groupId&
&artifactId&javase&/artifactId&
&version&1.7&/version&
&/dependency&
&dependency&
&groupId&com.google.zxing&/groupId&
&artifactId&core&/artifactId&
&version&1.7&/version&
&/dependency&
&dependency&
&groupId&javax.xml&/groupId&
&artifactId&jaxrpc&/artifactId&
&version&1.1&/version&
&type&pom&/type&
&/dependency&
&dependency&
&groupId&taglibs&/groupId&
&artifactId&fmt&/artifactId&
&version&1.1.2&/version&
&type&tld&/type&
&/dependency&
&dependency&
&groupId&commons-beanutils&/groupId&
&artifactId&commons-beanutils&/artifactId&
&version&1.8.0&/version&
&/dependency&
&dependency&
&groupId&commons-digester&/groupId&
&artifactId&commons-digester&/artifactId&
&version&2.0&/version&
&/dependency&
&dependency&
&groupId&commons-io&/groupId&
&artifactId&commons-io&/artifactId&
&version&1.3.2&/version&
&/dependency&
&dependency&
&groupId&net.sf.opencsv&/groupId&
&artifactId&opencsv&/artifactId&
&version&2.3&/version&
&type&jar&/type&
&/dependency&
&dependency&
&groupId&org.apache.struts&/groupId&
&artifactId&struts2-tiles3-plugin&/artifactId&
&version&2.3.14&/version&
&/dependency&
&dependency&
&groupId&javax&/groupId&
&artifactId&javaee-web-api&/artifactId&
&version&6.0&/version&
&type&jar&/type&
&/dependency&
&dependency&
&groupId&axis&/groupId&
&artifactId&axis&/artifactId&
&version&1.4&/version&
&/dependency&
&dependency&
&groupId&commons-discovery&/groupId&
&artifactId&commons-discovery&/artifactId&
&version&0.2&/version&
&/dependency&
&dependency&
&groupId&commons-logging&/groupId&
&artifactId&commons-logging&/artifactId&
&version&1.1.1&/version&
&/dependency&
&dependency&
&groupId&org.slf4j&/groupId&
&artifactId&slf4j-log4j12&/artifactId&
&version&1.5.6&/version&
&/dependency&
&dependency&
&groupId&log4j&/groupId&
&artifactId&log4j&/artifactId&
&version&1.2.15&/version&
&exclusions&
&exclusion&
&groupId&com.sun.jmx&/groupId&
&artifactId&jmxri&/artifactId&
&/exclusion&
&exclusion&
&groupId&com.sun.jdmk&/groupId&
&artifactId&jmxtools&/artifactId&
&/exclusion&
&exclusion&
&groupId&javax.jms&/groupId&
&artifactId&jms&/artifactId&
&/exclusion&
&/exclusions&
&/dependency&
&dependency&
&groupId&org.slf4j&/groupId&
&artifactId&slf4j-api&/artifactId&
&version&1.5.6&/version&
&/dependency&
&/dependencies&
&groupId&org.apache.maven.plugins&/groupId&
&artifactId&maven-compiler-plugin&/artifactId&
&version&2.3.2&/version&
&configuration&
&source&1.6&/source&
&target&1.6&/target&
&compilerArguments&
&endorseddirs&${endorsed.dir}&/endorseddirs&
&/compilerArguments&
&/configuration&
&groupId&org.apache.maven.plugins&/groupId&
&artifactId&maven-war-plugin&/artifactId&
&version&2.1.1&/version&
&configuration&
&failOnMissingWebXml&false&/failOnMissingWebXml&
&/configuration&
&groupId&org.apache.maven.plugins&/groupId&
&artifactId&maven-dependency-plugin&/artifactId&
&version&2.1&/version&
&executions&
&execution&
&phase&validate&/phase&
&goal&copy&/goal&
&configuration&
&outputDirectory&${endorsed.dir}&/outputDirectory&
&silent&true&/silent&
&artifactItems&
&artifactItem&
&groupId&javax&/groupId&
&artifactId&javaee-endorsed-api&/artifactId&
&version&6.0&/version&
&type&jar&/type&
&/artifactItem&
&/artifactItems&
&/configuration&
&/execution&
&/executions&
&/plugins&
&/project&
最佳答案 (Best Answer)
I think I understand...
I don't particularly understand spring security. Not considering it, this is the general flow:
request -> struts2 resolves and executes action -> render view (which will sometimes be a tiles result)
A tiles result should be thought of as a view. Tiles lets you factor the commonality out of the views but at the end of the day it is just a view.
When using spring security, is it typical to secure each and every jsp in a web application?
If it isn't then I wouldn't try to secure the tiles views either.
Instead secure the struts2 actions... because if something is not secure the action will still execute and possibly bad things could happen. So block the "bad things" higher up the chain.
If this makes sense then you don't need any of that tiles based stuff in applicationContext.xml (just get rid of it). The error of course is happening because it can't resolve the class, but I have a feeling this class is really for spring-mvc integration, so just forget about it.
If you followed the tiles3-plugin integration guide then your web.xml contains:
&listener&
&listener-class&org.apache.pleteAutoloadTilesListener&/listener-class&
&/listener&
This will load everything needed for the struts2-tiles3 result to render.
我想我明白…我特别不理解弹簧安全。不考虑,这是一般的流程: struts2 resolves and executes action -& render view (which will sometimes be a tiles result)"&请求-& Struts2解决和执行行动-&渲染视图(这有时会成为瓷砖的结果)一个瓷砖的结果应该被认为是一个视图。瓷砖让你的因素的观点的共性但在一天结束的时候它只是一个视图。使用弹簧时的安全,这是典型的以确保每一个Web应用的每一个JSP?如果不是这样我就不尝试保护瓷砖的看法。而安全的Struts2的行动…因为如果有不安全行为仍将执行和可能的不好的事情都可能发生。所以块的“坏事”,提高链。如果这个道理你不需要任何的瓷砖在applicationContext.xml的东西(只是摆脱它)。当然,错误的发生是由于它不能解决的课,但我感觉这类是Spring MVC集成,所以就忘了它。如果你遵循tiles3插件集成指导你的xml包含:&listener&
&listener-class&org.apache.pleteAutoloadTilesListener&/listener-class&
&/listener&
这将加载到渲染struts2-tiles3结果所需要的一切。
本文翻译自StackoverFlow,英语好的童鞋可直接参考原文:}

我要回帖

更多关于 资生堂integrate 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信