Project

General

Profile

Actions

Bug #633

closed

JBoss ressource resolution issue

Added by Thim Anneessens almost 14 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
High
Assignee:
Pieter Libin
Category:
-
Target version:
Start date:
12/08/2010
Due date:
% Done:

0%

Estimated time:

Description

Hello, guess who's back :).

I just restarted with JWt and tried the 3.1.7. But I ran into trouble when trying to run the simple chat exemple on JBoss.

I got a : java.io.FileNotFoundException: C:\jboss\jboss-6-M5\server\default\deploy\simplechat.war\WEB-INF\classes\eu\webtoolkit\jwt\examples\simplechat\simplechat.xml

I guess that the problem is caused by the fact that the relative ressource path is resolved into an absolute file path. Wich is great if your runing on linux and that your .war is not compressed, but totaly invalide if your running on windows and that your .war is packed (which is my case :) ).

One solution to this would be to resolve relative ressource path into absolute urls and let the container figure out where the file is hidden. This would also give the possibility to have ressource files located in the WebRoot, or even any other server.

E.g.:

ressources/myRessource.xml becomes http://mydomain.com/ressources/myRessource.xml

instead of C:\jboss\jboss-6-M5\server\default\deploy\myApplication.war\WEB-INF\classes\eu\webtoolkit\jwt\examples\simplechat\myRessource.xml

Actions #1

Updated by Koen Deforche over 13 years ago

  • Status changed from New to Feedback

Hey Thim,

you mention a patch for this in a next issue. Could you care to share your solution ?

Regards,

koen

Actions #2

Updated by Thim Anneessens over 13 years ago

If I am not mistaken, I solved my problem by adding a feature to the WXmlLocalizedString.readXmlResource(). Its behavior is the same as before BUT if the file does not exist, we try by using the bundleName as a URL (e.g. bundleName="http://rationaldesign.be/myressource.xml").

This does not resolve the problem but:

- Adds a nice feature to JWT by allowing resource files that are not in the .war file and are therefore much easier to modify

  • Gives the possibility to the developer to circumvent the issue by putting his resource file on a web server or in the WebRoot of his app.

Sorry for the late response.

Best regards,

Thim.

Actions #3

Updated by Pieter Libin about 13 years ago

  • Status changed from Feedback to InProgress
  • Assignee set to Pieter Libin
Actions #4

Updated by Pieter Libin about 13 years ago

  • Status changed from InProgress to Resolved

this problem is solved in the latest version of jwt

Actions #5

Updated by Koen Deforche almost 13 years ago

  • Status changed from Resolved to Closed
  • Target version set to 3.2.0
Actions

Also available in: Atom PDF