Hi,

I've created a quickstart based on your code but I can't reproduce the issue. I've shared it on Dropbox: https://www.dropbox.com/s/qmolvzvp9a0xplf/ResourceIssue.tar.gz?dl=0 The only thing I've noted is that your resource url doesn't have starting segment 'wicket', i.e my resource url is:

./wicket/resource/org.apache.wicket.Application/pdfProducer

Maybe you have some custom setting for wicket segments ('wicket', 'bookmark', etc...)?
The problem (which I think is a bug) is in the way the url is produced.

The line
        String url = (String)RequestCycle.get().urlFor(resourceReference, null);

Produces the url to use for the resource ref.

In the non-working version it returns:

../resource/org.apache.wicket.Application/pdfProducer

If I set a breakpoint just after this line and I manually remove the first dot 
in the string  using the debugger to get:

./resource/org.apache.wicket.Application/pdfProducer

and then let the code continue to run, my pdf appears correctly.

The debug trace also shows the correct uri.

2015-03-13 17:59:30,292  DEBUG - ServletWebRequest          - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/wicket/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 17:59:30,298  DEBUG - ServletWebRequest          - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/wicket/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 17:59:30,301  DEBUG - ServletWebRequest          - Calculating 
context relative path from: context path '', filterPrefix '', uri 
'/wicket/resource/org.apache.wicket.Application/pdfProducer'
2015-03-13 17:59:30,305  DEBUG - CompoundRequestMapper      - One compatible 
mapper found for URL 'wicket/resource/org.apache.wicket.Application/pdfProducer' 
-> 'Mapper: org.apache.wicket.core.request.mapper.ResourceReferenceMapper; 
Score: 1'

Maybe someone knows how to fix this? I could strip the first dot as a 
workaround in the mean time.

Bruce



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to