Anirban,

Your resources still start with "xxweb". If you want them to be served by wicket replace it with "xx/web" or something like that. If you want them to be served by something else (context xxweb?) prepend a "/".

Regards,
   Erik.


Alan Romaniusc wrote:
Could it be anything like this?
http://www.nabble.com/Wicket-1.4-m3,-wicket-auth-roles-and-Context-Path-td20249711.html

On Tue, Nov 11, 2008 at 9:51 AM, Anirban Basak <[EMAIL PROTECTED]> wrote:
(replacing proprietary names/texts with xx)



I'm running wicket web app with context 'xx'.



As long I'm mounting pages with mountBookmarkablePage(..) or other URL
encoding strategies (http://www.test-server.com/xx/web/page/partner) or
mentioning /xx/* as the filter pattern, everything is running fine. But I
was told not to append any word after the context
(http://www.test-server.com/xx/). I tried removing URL encoding strategies,
but wicket returning wrong relative urls by prepending unnecessary '../' to
the resource uris like:



<link href="xxweb/css/styles.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="xxweb/css/dhtmlwindow.css" type="text/css" />

<script type="text/javascript" src="xxweb/js/dhtmlwindow.js"></script>

<script type="text/javascript" src="xxweb/js/partnerpages.js"></script>



Wicket converting them into:



<link href="../xxweb/css/styles.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="../xxweb/css/dhtmlwindow.css" type="text/css"
/>

<script type="text/javascript" src="../xxweb/js/dhtmlwindow.js"></script>

<script type="text/javascript" src="../xxweb/js/partnerpages.js"></script>



This makes the browser unable to fetch the resources as

"../xxweb/css/styles.css" ==
"http://www.test-server.com/xxweb/css/styles.css";



Structure of the WAR

xx-snapshot.war

 |-- index.html (incase wicket not running)

 |-- xx-config.xml

 |-- WEB-INF

       |-- web.xml

       |-- lib

       |-- classes

 |-- xxweb

      |-- css

      |-- images

      |-- js





Web.xml

<filter>

           <filter-name>wicket.xx</filter-name>

           <filter-class>

                 org.apache.wicket.protocol.http.WicketFilter

           </filter-class>

           <init-param>

                 <param-name>applicationClassName</param-name>

                 <param-value>com.xx.xx.xxWebApplication</param-value>

           </init-param>

     </filter>



     <filter-mapping>

           <filter-name>wicket.xx</filter-name>

           <url-pattern>/*</url-pattern>

           <dispatcher>REQUEST</dispatcher>

           <dispatcher>INCLUDE</dispatcher>

     </filter-mapping>



Is this because of any wicket specific restriction or something else?



Anirban











--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to