Sitemesh in Resin server
Cobwebs <[email protected]> Sun, 25 Jul 2010 06:18:13 -0700 (PDT)
| Newsgroups | gmane.comp.web.sitemesh.general |
|---|---|
| Message-ID | <[email protected]> |
I am an beginer to Sitemesh. I am using it with Freemarker in Resin server.
But I have a problem when I request a main page after uploading my Spring
project with war file on Resin server.
Is there anyone who could help me? If there is, please help me.
Thenk you for your attention. Have a nice day..
And, in the Resin server, there are two virtual host in it.
It means that
the server has one more web.xml, decorators.xml etc.. in other directoryr.
It's working well now.
I have written a page, code and error message are as follows:=20
1. The content of decorators.xml is:
<decorators defaultdir=3D"/decorators">
<excludes>
<pattern>/css/*</pattern>
<pattern>/js/*</pattern>
<pattern>/images/*</pattern>
<pattern>/event/*</pattern>
<pattern>*/ajax/*</pattern>
</excludes>
<decorator name=3D"topLeft" page=3D"/sitemesh/frontIndex.ink">
<pattern>/index*</pattern>
<pattern>/*/*List*</pattern>
<pattern>/*/*Detail*</pattern>
<pattern>/*/*Main*</pattern>
<pattern>/*Main*</pattern>
<pattern>/*/guide*</pattern>
<pattern>/*/podcenterInfo*</pattern>
<pattern>/*/madeBook*</pattern>
<pattern>/*/publishAllianceInfo*</pattern>
=20
<pattern>/reviveBook/*List*</pattern>
<pattern>/reviveBook/reviveBookWrite*</pattern>
<pattern>/*</pattern>
=20
</decorator>
<decorator name=3D"onlyTop" page=3D"/sitemesh/frontIndex1.ink">
<pattern>/*/*soldOutPODBookDetailView*</pattern>
=20
=20
</decorator>
=20
<decorator name=3D"onlyBlank" page=3D"/sitemesh/frontIndex2.ink">
<pattern>/reviveBook/*Pop*</pattern>
</decorator>
=20
</decorators>
2. The content of sitemesh.xml is:
<sitemesh>
<property name=3D"decorators-file" value=3D"/WEB-INF/decorators.xml"/>
<excludes file=3D"${decorators-file}"/>=20
<page-parsers>
<parser default=3D"true"=20
class=3D"com.opensymphony.module.sitemesh.parser.HTMLPageParser=
"/>
<parser content-type=3D"text/html"=20
class=3D"com.opensymphony.module.sitemesh.parser.HTMLPageParser=
"/>
<parser content-type=3D"text/html;charset=3DUTF-8"
class=3D"com.opensymphony.module.sitemesh.parser.HTMLPageParser=
"/>
</page-parsers>
<decorator-mappers>
<mapper
class=3D"com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
=20
</mapper>
</decorator-mappers>
</sitemesh>
2. The decorator page is (frontIndex.ftl):=20
<#assign c=3DJspTaglibs["http://java.sun.com/jsp/jstl/core"]>=20
<#assign fmt=3DJspTaglibs["http://java.sun.com/jsp/jstl/fmt"]>
<#assign
decorator=3DJspTaglibs["http://www.opensymphony.com/sitemesh/decorator"]>
<#assign spring=3DJspTaglibs["http://www.springframework.org/tags"]>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"ko" xml:lang=3D"ko">
<head>
=09<META http-equiv=3D"Pragma" content=3D"nocache">
=09<META http-equiv=3D"Expires" content=3D"0"/>=20
=09<META http-equiv=3D"Cache-Control" content=3D"no-cache">
=09<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8"=
/>
=09<meta http-equiv=3D"X-UA-Compatible" content=3D"IE=3Dedge" />
=09<title><@spring.message code=3D"kyobo.title"/></title>
=09<link rel=3D"stylesheet" type=3D"text/css" href=3D"/css/layout.css" />
=09<link rel=3D"stylesheet" type=3D"text/css" href=3D"/css/sol_lnb.css" />
=09<link rel=3D"stylesheet" type=3D"text/css" href=3D"/css/sol_container.cs=
s" />
=09<link rel=3D"stylesheet" type=3D"text/css" href=3D"/css/sol_page.css" />
=09
=09<script type=3D"text/javascript"
src=3D"http://image.kyobobook.co.kr/new_ink/used/web/js/common/common.js"><=
/script>=09
=09<script type=3D"text/javascript"
src=3D"http://image.kyobobook.co.kr/new_ink/used/web/js/jquery/jquery-1.3.2=
.min.js"></script>
=09<script type=3D"text/javascript"
src=3D"http://image.kyobobook.co.kr/new_ink/used/web/js/jquery/jquery.tools=
.min.js"></script>
=09<script type=3D"text/javascript"
src=3D"http://image.kyobobook.co.kr/new_ink/used/web/js/jquery/jquery_commo=
n.js"></script>
=09<script type=3D"text/javascript"
src=3D"http://image.kyobobook.co.kr/new_ink/used/web/js/jquery/jquery_main.=
js"></script>
<script type=3D"text/javascript"
src=3D"../js/jquery/jquery_pod_main.js"></script>
<script type=3D"text/javascript"
src=3D"/js/jquery/jquery_pod_common.js"></script>
=09<script type=3D"text/javascript" src=3D"/js/common.js"></script> <!--=
=EC=A6=89=EC=8B=9C=EA=B5=AC=EB=A7=A4
=EC=A6=90=EA=B2=A8=EC=B0=BE=EA=B8=B0-->
<script type=3D"text/javascript"
src=3D"http://image.kyobobook.co.kr/new_ink/used/web/js/jquery/jquery.timer=
s-1.2.js"></script>
=20
=20
=09<@decorator.head />
</head> =20
<body>
<div id=3D"wrap" >
=09<#include "/include/head.ftl"/>
=09
=09
<!-- container -->
=09<div id=3D"container">
=09
=09=09<#include "/include/front_left_menu.ftl">=09
=09<script language=3D"javascript" src=3D"/js/KyoboBook.js"></script>
=09<script language=3D"javascript" src=3D"/js/Navigation.js"></script>
=09 <!-- content -->
<div id=3D"sol_con">
=09=09<@decorator.body />
=09=09</div>
=09=09
=09</div>
=09
=09<#include "/include/quick_menu.ftl">=09
=09<#include "/include/foot.ftl">
</div><!-- end wrap -->=09
</body>
</html>
3. The URL requested is :=20
start the application with http://poddev.kyobobook.co.kr/index.ink
4. The stack trace is :=20
500 Servlet Exception
[show] java.lang.RuntimeException:
org.springframework.web.util.NestedServletException:
Request processing failed; nested exception is
java.lang.NullPointerException
java.lang.RuntimeException:
org.springframework.web.util.NestedServletException:
Request processing failed; nested exception is
java.lang.NullPointerException
=09at
com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseW=
ebAppDecorator.java:39)
=09at
com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.jav=
a:84)
=09at
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.jav=
a:87)
=09at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:=
187)
=09at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java=
:265)
=09at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:436=
)
=09at com.caucho.server.port.TcpConnection.run(TcpConnection.java:682)
=09at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:743)
=09at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:662)
=09at java.lang.Thread.run(Thread.java:595)
--=20
View this message in context: http://old.nabble.com/Sitemesh-in-Resin-serve=
r-tp29259929p29259929.html
Sent from the OpenSymphony - SiteMesh mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]