Opa,
estou criando um projeto com vraptor + sitemesh, mas não esta funcionando…
Parece que está tudo certo, mas só aparece uma tela branca na URL do controller. Alguem já passou por isso?
WEB-INF/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_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>Test</display-name>
<context-param>
<param-name>br.com.caelum.vraptor.encoding</param-name>
<param-value>UTF-8</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<filter>
<filter-name>vraptor</filter-name>
<filter-class>br.com.caelum.vraptor.VRaptor</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>vraptor</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<page-encoding>UTF-8</page-encoding>
<include-prelude>/WEB-INF/jsp/prelude.jspf</include-prelude>
</jsp-property-group>
</jsp-config>
</web-app>
WEB-INF/decorators.xml
<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/WEB-INF/jsp/decorator">
<decorator name="decorator" page="decorator.jsp">
<pattern>/*</pattern>
</decorator>
</decorators>
WEB-INF/decorator/decorator.jsp
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"
prefix="decorator"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><decorator:title default="teste" /></title>
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/javascripts/temas/pepper_grinder/css/custom-theme/jquery-ui-1.8.13.custom.css" />
<script type="text/javascript"
src="${pageContext.request.contextPath}/javascripts/jquery-1.6.1.min.js" />
<script type="text/javascript"
src="${pageContext.request.contextPath}/javascripts/temas/pepper_grinder/jquery/jquery-ui-1.8.13.custom.min.js" />
<decorator:head />
</head>
<body>
<div id="container">
<div id="header" class="ui-widget-header">
<div id="user-navigation">
<ul class="wat-cf">
<li><a href="/logout" class="logout">Logout</a></li>
</ul>
</div>
</div>
<div id="wrapper" class="wat-cf">
<decorator:body />
<div id="footer">
<p>Laboratorio</p>
</div>
</div>
</div>
</body>
</html>
WEB-INF/jsp/home.jsp:
<body>
<div>
<h1>Hello World!!!</h1>
<h2>${var}</h2>
</div>
</body>