Aaron
Aaron

Reputation: 883

How to fix 404 from Sitemesh demo App

I have created the sitemesh demo app as described at http://wiki.sitemesh.org/wiki/display/sitemesh/Start+Using+SiteMesh+in+10+Minutes. I am running in jboss eap 6.4 in eclipse oxygen. The app comes up without errors. I can reach an index.html page I have placed in my WebContent folder. But the two sitemesh pages (menu.jsp and hours.jsp) yield 404 errors. No errors are logged on the console.

I am getting the 404 error on localhost:8080/mesh/menu.jsp

I suspect I have some config error, but I can't see any typos. Is there any way to get more logging or anything to point the way to the issue?

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" 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>mesh</display-name>

<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>

<welcome-file-list>
  <welcome-file>index.html</welcome-file>
</welcome-file-list>

</web-app>

decorators.xml

<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/decorators">
    <decorator name="basic-theme" page="basic-theme.jsp">
        <pattern>/data/*</pattern>
    </decorator>
</decorators>

File Layout

File layout

Upvotes: 0

Views: 268

Answers (1)

Aaron
Aaron

Reputation: 883

My problem was that I was not pointing my browser to localhost:8080/mesh/data/menu.jsp.

Like I suspected earlier. A configuration/understanding error on my part.

Upvotes: 0

Related Questions