• web.xml
Código:
• commerceapp-servlet.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_2_5.xsd" version="2.5"> <display-name>extjs_commerceapp-solution</display-name> <session-config> <session-timeout>30</session-timeout> </session-config> <welcome-file-list> <welcome-file>login.jsp</welcome-file> </welcome-file-list> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/commerceapp-servlet.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>commerceapp</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>commerceapp</servlet-name> <url-pattern>/mvc/*</url-pattern> </servlet-mapping> </web-app>
Código:
• Atraves de commerceapp-servlet.xml, importo los otros dos XML de mi configuracion Hibernate.<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" 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://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd "> <mvc:annotation-driven /> <context:component-scan base-package="com.limati.commerceapp" /> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <property name="prefix" value="/WEB-INF/jsp/com/limati/commerceapp/" /> <property name="suffix" value=".jsp" /> </bean> <!-- Configures Hibernate - Database Config --> <import resource="commerceapp-dao-hibernate.xml" /> <import resource="commerceapp-service.xml" /> </beans>
El problema es que para es mi pagina principal donde carga mi interfaz RIA, le tengo que poner este ruteo (pageContext.request.contextPath):
Código:
Alguien me puede ayudar con este problema. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>CommerceApp</title> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/ext4/resources/css/ext-all.css"/> <script type="text/javascript" src="${pageContext.request.contextPath}/ext4/ext-all-debug.js"></script> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resources/css/app.css"/> </head> <body style="background-color: #95B0CD" > <script type="text/javascript"> Ext.Loader.setConfig({ enabled: true, paths:{ "app": "${pageContext.request.contextPath}/app" } }); var CONTEXT_PATH = "${pageContext.request.contextPath}"; var USER = "${sessionScope.user.userName}"; app=Ext.create('Ext.app.Application',{ name:'LTI', appFolder: 'app/base/user', //controllers:['UserController'], //si se quiere inicializar un controlador en la creación launch: function(){ Ext.create("app.principal.view.Desktop",{ }); } }); </script> </body> </html>