> I agree that using Wicket's decoration mechanism is probably a better way to
> go. One small question though - how do I put the contextPath into URLs in my
> BasePage.html?  In my SiteMesh decorator, I have:
>
>     <c:set var="ctx" value="${pageContext.request.contextPath}"/>
>
>     <link rel="shortcut icon" href="${ctx}/images/favicon.ico"
> type="image/x-icon"/>
>     <link rel="stylesheet" type="text/css"
> href="${ctx}/styles/deliciouslyblue/theme.css" title="default" />
>     <link rel="alternate stylesheet" type="text/css"
> href="${ctx}/styles/deliciouslygreen/theme.css" title="green" />
>     <script type="text/javascript"
> src="${ctx}/scripts/prototype.js"></script>
>     <script type="text/javascript"
> src="${ctx}/scripts/scriptaculous.js"></script>
>     <script type="text/javascript"
> src="${ctx}/scripts/stylesheetswitcher.js"></script>
>     <script type="text/javascript" src="${ctx}/scripts/global.js"></script>

It should be done automatically for you. Just do:

<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css"
href="styles/deliciouslyblue/theme.css" title="default" />
<link rel="alternate stylesheet" type="text/css"
href="styles/deliciouslygreen/theme.css" title="green" />
<script type="text/javascript" src="scripts/prototype.js"></script>
<script type="text/javascript" src="scripts/scriptaculous.js"></script>
<script type="text/javascript" src="scripts/stylesheetswitcher.js"></script>
<script type="text/javascript" src="scripts/global.js"></script>

and all should work fine.

See PrependContextPathHandler for more info.

Eelco

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to