Closed GoogleCodeExporter closed 9 years ago
Huhm u think i put this on purpose;) I will check it our again and let you know
;)
Original comment by igor.spasic
on 17 Apr 2012 at 9:03
Ok, here is an example that works for me when application is deployed under
"/madvoc" servlet context.
http://code.google.com/p/jodd/source/browse/trunk/mod/serverside/web/js.jsp
http://code.google.com/p/jodd/source/browse/trunk/mod/serverside/web/stapler/js.
jsp
both pages work the same when deployed at root or under some context path.
can you check if this works for you, please?
Original comment by igor.spasic
on 17 Apr 2012 at 9:48
Hi Igor,
I think that the issue is there, even in the samples you mentioned above.
Let us say that for our example application context path is /myapp.
The following line, from one of your sample pages:
<script type="text/javascript" src="/jquery.tooltip.js"></script>
will work perfectly well with stapler. However, if you turn off the stapler
(which is standard way and should not break anything), you will see that
browser is getting the 404 response. That is because it tries to fetch the URL
http://localhost:8080/jquery.tooltip.js
instead of
http://localhost:8080/myapp/jquery.tooltip.js.
So, the correct script reference would be:
<script type="text/javascript" src="/myapp/jquery.tooltip.js"></script>
That is exactly the URL the <c:url> would produce - it would prepend the
context path.
However, that later script reference will produce stapler exception:
Can't create bundle.; <--- java.io.FileNotFoundException: Not found:
C:\projects\jodd-jetty\docroot\myapp\jquery.tooltip.js.
I hope this will help.
BTW, JODD is great framework, I am glad to help in resolving these minor issues
so it becomes even better. Great work.
Original comment by bandino....@gmail.com
on 18 Apr 2012 at 8:29
Haaaa, i've made example work with invalid html/css;)
thank you, i'm just about to fix it, need to remove context path when creating
local path.
and glad you like JODD :)
Original comment by igor.spasic
on 18 Apr 2012 at 1:29
This issue was closed by revision r1069.
Original comment by igor.spasic
on 18 Apr 2012 at 1:31
Original issue reported on code.google.com by
bandino....@gmail.com
on 17 Apr 2012 at 5:59