When I set a mountBookmarkablePage for my homepage some resources are not
rewritten with the correct path, specifically ones that are referenced from
JavaScript.  The path that it rewrites them with includes the application
servlet.  Any ideas?

The output from the server:

20:43:24,424 WARN  [WebExternalResourceRequestTarget] : the resource
requested by request [method = GET, protocol = HTTP/1.1, requestURL =
http://xxxxxxxx.com:8080/1/meetmoi/niftyCorners.css, contentType = null,
contentLength = -1, contextPath = /1, pathInfo = /niftyCorners.css,
requestURI = /1/meetmoi/niftyCorners.css, servletPath = /meetmoi,
pathTranslated =
/Users/jeremy/Projects/jboss/server/default/./tmp/deploy/tmp3077mdate.ear-contents/mDate-
Web.war/niftyCorners.css] was not found

The actual location of niftyCorners.css is in the root of my war.  The local
path which the exception complains about is valid.  The requestURL above
should not include /meetmoi/ as "meetmoi" is the application servlet.
niftyCorners.css is being referenced not from my HTML but from a JavaScript
file which is included in the HTML.  The valid path to it should be:
http://xxxxxxxx.com:8080/1/niftyCorners.css.

Snippet from my web.xml
----
  <servlet>
       <servlet-name>MeetMoi</servlet-name>
       <servlet-class>wicket.protocol.http.WicketServlet</servlet-class>
       <init-param>
           <param-name>applicationClassName</param-name>
           <param-value>com.mdate.web.MeetMoiApplication</param-value>
       </init-param>
       <init-param>
           <param-name>configuration</param-name>
           <!--param-value>DEPLOYMENT</param-value-->
           <param-value>DEVELOPMENT</param-value>
       </init-param>
       <load-on-startup>1</load-on-startup>
   </servlet>

   <servlet-mapping>
       <servlet-name>MeetMoi</servlet-name>
       <url-pattern>/meetmoi/*</url-pattern>
   </servlet-mapping>
----

Snippet from my MeetMoiApplication.java:
----
       mountBookmarkablePage("/home",Home.class);
       mountBookmarkablePage("/welcome",NoAuthHome.class);
-----

Snippet from the JS file which references the CSS:

-----

function AddCss(){
niftyCss=true;
var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","niftyCorners.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
}
---

I can try replicating this in a small application which I can upload if that
will help.  I am using Wicket 1.2.3. Thanks.

Jeremy
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to