Cannot access my application on Heroku - no context path - heroku

For the last two days I was struggling to get my Struts2 application (just one simple page for testing - no database or anything fancy for now) up and running on Heroku with Jetty Runner. I finally did it - it deployed successfully, however there is an error when I try to access it.
On my local development machine I access my app (named TestMaven) like this:
http://localhost:8080/TestMaven/
And it works. However when I try to access my app on Heroku (myappname.herokuapp.com) I get this error:
There is no Action mapped for namespace [/] and action name [] associated with context path [].
This looks like Heroku has no idea about context path which is TestMaven.
This is my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Nebula</display-name>
<context-param>
<param-name>org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
<listener>
<listener-class>
org.apache.struts2.tiles.StrutsTilesListener
</listener-class>
</listener>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
And struts.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="front" extends="struts-default">
<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
<action name="" class="com.eleeist.TestMaven.action.Index">
<result name="success" type="tiles">/index.tiles</result>
</action>
</package>
</struts>

Related

Could not resolve view with name X in servlet with name Y

I am using Spring and AngularJS for a rest web application. Base on this tutorial and based on this tutorial I've created the following folder structure:
-src
|----main
|----webapp
|----static
|----api
|----assets
|----resources
|----sections
|----services
|----index.html
|----WEB-INF
|----web.xml
|----spring
|----dispatcher-servlet.xml
|----applicationContext.xml
I want to serve static HTML files so I declared the resources as following:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<mvc:annotation-driven></mvc:annotation-driven>
<context:component-scan base-package="org.tools.mvc.controllers"></context:component-scan>
<mvc:resources location="/static/" mapping="/**"/>
<mvc:resources location="/static/api/" mapping="/api/**"/>
<mvc:resources location="/static/assets/" mapping="/assets/**"/>
<mvc:resources location="/static/resources/" mapping="/resources/**"/>
<mvc:resources location="/static/services/" mapping="/services/**"/>
<mvc:resources location="/static/sections/home/" mapping="/sections/home/**"/>
<bean name="viewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver"></bean>
<bean name="jsonTemplate" class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"></bean>
My problem is that when I deploy the application( I am using Glassfish server) the following error occurs( in Eclipse console and also in the browser page):
2016-05-27T04:46:06.640-0700|Warning: StandardWrapperValve[dispatcher]: Servlet.service() for servlet dispatcher threw exception
javax.servlet.ServletException: Could not resolve view with name 'index.html' in servlet with name 'dispatcher'
The functionality of the service is not affected( using Postman to test the rest api results in success). Until now, in order to further develop the application I manually added index.html to the end of the URL(like localhost:8080/status/index.html). The source of the "/" as declared in Web Deployment Assembly is:
Source: /src/main/webapp
Deploy Path: /
Update: The web.xml file is looking like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<display-name>status</display-name>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/dispatcher-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
How can I resolve this error?
Thank you
P.S The solutions found on SO didn't applied to my scenario.
I discovered that I've declared a view resolver ( BeanNameViewResolver) inside applicationContext.xml. After deleting the view resolver, I didn't receive the error.
The error occurred because Spring was trying to interpret my view( witch was a html static file) to a bean.

Picking up Tomcat's Context.xml parameters via SpEL

Deploying war to Apache Tomcat 8 the following way.
Placing myApp.xml under $CATALINA_HOME/conf/[enginename]/[hostname]/
with the following contents:
<Context>
<Parameter name="myApp_configs" value="file:/the/path/to/configs/folder"
type="java.lang.String" override="false"/>
</Context>
B.t.w. I do not place any kind of Context.xml into war.
Then copying myApp.war to $CATALINA_HOME/webapps
This is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>service</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/beans.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<display-name>CXF Servlet</display-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
And this way I try loading properties-file in beans.xml (referenced in web.xml above).
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
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
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
<!-- Imported resources for cxf -->
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>
<!--context:property-placeholder
location="#{contextParameters['myApp_configs']}/myApp.properties"/-->
<bean id="configurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location"
value="#{contextParameters['myApp_configs']}/myApp.properties"/>
</bean>
...other lines follow here...
</beans>
However I am getting following error upon beans loading:
Field or property 'contextParameters' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext'
Could you help me understand the error and propose a fix so that I can access Context-defined parameters?
P.S. I have not put here, but I also have some <Environment>-nodes in Context, and they are successfully accessible via JNDI in other places.
So as we were not able to solve the root cause - why contextParameters bean is not available, the following workaround (using ol' syntax) took place:
<bean id="myConfigsLocation"
class="org.springframework.web.context.support.ServletContextParameterFactoryBean">
<property name="initParamName" value="myApp_configs" />
</bean>
<context:property-placeholder
location="#{myConfigsLocation}/myApp.properties" />
And it worked successfully.

Apache CXF and Spring but no WSDL (recursive links)

I have written a small sample web service, using Apache CXF (CXFServlet) and Spring (ContextLoaderListener) I have registered the CXFServlet to listen on the / url. And I am declaring my beans in beans.xml.
When I start the web service with tomcat and go to the service url, then I can see the web service definition (e.g. methods, endpoint, wsdl link). But the problem is that when I click on the wsdl link, then I do not get the WSDL file, but instead I am recursively forwarded back to the same page, but each time the name of the web service address is appended:
localhost:8080/Test/accountEndpoint
localhost:8080/Test/accountEndpointaccountEndpoint
localhost:8080/Test/accountEndpointaccountEndpointaccountEndpoint
The service is a "code-first" service which a #WebService annotated java interface and a implementation class.
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Test</display-name>
<servlet>
<servlet-name>cxf</servlet-name>
<display-name>cxf</display-name>
<description>Apache CXF Endpoint</description>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/beans.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
</web-app>
beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<bean id="account" class=".....AccountImpl" />
<jaxws:endpoint id="accountEndpoint" implementor="#account"
address="accountEndpoint" />
</beans>
As I understand it, CXF should automatically generate the WSDL file and provide it to me, when I click on the link, so I do not understand why that is not happening.
Specify the address this way, with a leading slash:
<jaxws:endpoint id="accountEndpoint" implementor="#account"
address="/accountEndpoint" />
Sorry, making a change, the above is not correct:
You are right, I am able to replicate the behavior with mapping CXFServlet to the "default" servlet path mapping of /, the fix that I could get to work for myself is to map it to /* instead:
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

Jboss6.1 ClassNotFound in WEB/lib for listener

I use jboss6.1. When I try to deploy a web app, it say class not found when try to load spring.
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
the error is
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationListener
I put the spring in WEB/lib. Is that wrong? Or should be something else?
Thanks for the kind replies. What confuses me is I put the spring jars in my webapp's WEB/lib folder. Isn't that enough?
Following are the web.xml and the jars. ( I put all I grabbed in the dist folder of spring3.1)
But I wonder maybe is because I use jboss and there's something special in it? I google some post class loader but don't understand.
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="CMDB_WS_HOST" version="3.0">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<session-config>
<session-timeout>99999999</session-timeout>
</session-config>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/beans.xml</param-value>
</context-param>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<listener>
<listener-class>com.inspur.cmdb.system.StartupListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
spring jars in web/lib
org.springframework.aop-3.1.0.M2.jar
org.springframework.asm-3.1.0.M2.jar
org.springframework.aspects-3.1.0.M2.jar
org.springframework.beans-3.1.0.M2.jar
org.springframework.context.support-3.1.0.M2.jar
org.springframework.context-3.1.0.M2.jar
org.springframework.core-3.1.0.M2.jar
org.springframework.expression-3.1.0.M2.jar
org.springframework.instrument.tomcat-3.1.0.M2.jar
org.springframework.instrument-3.1.0.M2.jar
org.springframework.jdbc-3.1.0.M2.jar
org.springframework.jms-3.1.0.M2.jar
org.springframework.orm-3.1.0.M2.jar
org.springframework.oxm-3.1.0.M2.jar
org.springframework.test-3.1.0.M2.jar
org.springframework.transaction-3.1.0.M2.jar
org.springframework.web.portlet-3.1.0.M2.jar
org.springframework.web.servlet-3.1.0.M2.jar
org.springframework.web.struts-3.1.0.M2.jar
org.springframework.web-3.1.0.M2.jar
Make sure your server classpath has included the Spring jar library. In Spring 3 its, spring-web.jar
check whether you have these jars in WEB/lib
commons-logging-1.1.1.jar
jstl-1.2.jar
spring-asm-3.0.3.RELEASE.jar
spring-beans-3.0.3.RELEASE.jar
spring-context-3.0.3.RELEASE.jar
spring-core-3.0.3.RELEASE.jar
spring-expression-3.0.3.RELEASE.jar
spring-web-3.0.3.RELEASE.jar
spring-webmvc-3.0.3.RELEASE.jar
It is ok with JBoss 7.It is classloading effect.
Config : /WEB-INF/jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 4.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
myapp:loader=anyUniqueName
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
Otherwise
I reference here.
I have not tried with JBoss 6 yet. But, I hope, the following configuration will be helpful for JBoss 6.
NOTE:
On JBoss 6.0, to avoid the container loading the classes before the application actually starts, one needs to add a WEB-INF/jboss-scanning.xml file to the application archive - with the following content:
Config : /WEB-INF/jboss-scanning.xml
<scanning xmlns="urn:jboss:scanning:1.0"/>

can't running project when add springsecurity.taglib.xml

i've problem when implement spring security and jsf 2.0, exactly when add springsecurity.taglib.xml in web.xml
server : glassfish server 3
springframework 3.0.2
jsf 2.0
library :
org.springframework.faces.sources 3
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>HelloWorldExampleWithSpring3MVCInEclipse</display-name>
<context-param>
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
<param-value>/WEB-INF/springsecurity.taglib.xml</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/app-config.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Production</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/app-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>faces/index.jsp</welcome-file>
</welcome-file-list>
springsecurity.taglib.xml
<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
"http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
<facelet-taglib>
<namespace>http://www.springframework.org/security/tags</namespace>
<tag>
<tag-name>authorize</tag-name>
<handler-class>org.springframework.faces.security.FaceletsAuthorizeTagHandler</handler-class>
</tag>
<function>
<function-name>areAllGranted</function-name>
<function-class>org.springframework.faces.security.FaceletsAuthorizeTagUtils</function-class>
<function-signature>boolean areAllGranted(java.lang.String)</function-signature>
</function>
<function>
<function-name>areAnyGranted</function-name>
<function-class>org.springframework.faces.security.FaceletsAuthorizeTagUtils</function-class>
<function-signature>boolean areAnyGranted(java.lang.String)</function-signature>
</function>
<function>
<function-name>areNotGranted</function-name>
<function-class>org.springframework.faces.security.FaceletsAuthorizeTagUtils</function-class>
<function-signature>boolean areNotGranted(java.lang.String)</function-signature>
</function>
<function>
<function-name>isAllowed</function-name>
<function-class>org.springframework.faces.security.FaceletsAuthorizeTagUtils</function-class>
<function-signature>boolean isAllowed(java.lang.String, java.lang.String) </function-signature>
</function>
</facelet-taglib>
this is error message
In-place deployment at D:\Project\Secret Project\Hobic Project EE\Yeah\build\web
deploy?path=D:\Project\Secret Project\Hobic Project EE\Yeah\build\web&name=Yeah&force=true failed on GlassFish Server 3
D:\Project\Secret Project\Hobic Project EE\Yeah\nbproject\build-impl.xml:760: The module has not been deployed.
BUILD FAILED (total time: 1 minute 29 seconds)
server error message
SEVERE: Exception while loading the app
SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException:
Source Document: jar:file:/D:/Project/Secret%20Project/Hobic%20Project%20EE/Zest/build/web/WEB- INF/lib/org.springframework.faces-2.0.4.RELEASE.jar!/META-INF/faces-config.xml
Cause: Class 'org.springframework.faces.webflow.FlowActionListener' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/springframework/webflow/execution/RequestContext
your suggest right [java.lang.NoClassDefFoundError: org/springframework/webflow/execution/RequestContext], and i got new error now :(
SEVERE: Exception while loading the app
SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [security.xml]
Offending resource: ServletContext resource [/WEB-INF/app-config.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
Offending resource: ServletContext resource [/WEB-INF/security.xml]
*solution [Offending resource: ServletContext resource [/WEB-INF/security.xml]] *
![.jar needed][1]
can you give suggest for my problem ?
thx agung
I don't use Netbeans, so I don't know its ins and outs, but this error message seems to indicate that some error/exception has been occurred beforehand. Is there really not anything more into the build log?
Anyway, not sure if that solves the problem and is related to the concrete problem, but one thing which caught my eye is that your <facelet-taglib> is declared conform Facelets 1.x while you're using JSF 2.x which has Facelets 2.x bundled. Netbeans might have fallen over that.
Fix the root declaration of .taglib.xml file as follows:
<?xml version="1.0" encoding="UTF-8"?>
<facelet-taglib
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
version="2.0"
>
<!-- Config here. -->
</facelet-taglib>
Further, Glassfish is a Servlet 3.0 compatible container, but your web.xml root declaration complies Servlet 2.5. This should technically also not immediately cause a problem, but you'll miss Servlet 3.0 / EL 2.2 advantages this way.
I'd fix the root declaration of the web.xml as well:
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0"
>
<!-- Config here. -->
</web-app>
Update as per your update the root cause of your concrete problem seems to be the following:
java.lang.NoClassDefFoundError: org/springframework/webflow/execution/RequestContext
The NoClassDefFoundError means that the in the message mentioned class is missing in the classpath, while it is (indirectly) required by other classes in your application. The solution would be to add the class (or in this particular case, the JAR file with the class) to the classpath. The mentioned class is part of Spring WebFlow. You need to download it and include it in the classpath (the buildpath as the IDE calls it) the same way as you did for the core Spring framework and Spring Security.
Update 2 as per your second update, a new problem appeared after fixing the first:
Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security] Offending resource: ServletContext resource [/WEB-INF/security.xml]
I'm no Spring guy so I can't answer that from top of head, but Google suggests that this problem is caused by a missing Spring Security Config JAR file.

Resources