Hallo,

i try to deploy my web application to Karaf 3.0.0-SNAPSHOT, but he
application failed to load the resources.
I checked the code, in my opinion the Problem is in the pax-web
ResorceServlet.
There is following code (in my source version line 97)

    if (!"default".equalsIgnoreCase(m_name))
mapping = mapping.replaceFirst(m_alias, m_name);


The variable m_name is for me:
"C:\java\apache-karaf-3.0.0-SNAPSHOT\data\cache\bundle168\data\rwtcontext_30827939_1554794/rwt-resources"
The problem is that "\", the separator character on windows, is a
special Character for regular expressions.
After the call of String.replaceFirst, all "\" are lost and the result ist
an invalid
path: 
C:javaapache-karaf-3.0.0-SNAPSHOTdatacachebundle168datarwtcontext_30827939_1554794/rwt-resources/rap-client-cc82b8ac.js

 The JavaDoc to String.replaceFirst suggest the use of
java.util.regex.Matcher.quoteReplacement() if desired. I can image this
will fix the problem.

Best Regards

Peter

Reply via email to