Hi to everyone.

I think I know how to use eclipse to debug sling now. ;) Thank you for you advice, Delacretaz.

I get the bug now. It is in the regex pattern of url remapping.

Sling uses _a_b to map for a:b in jcr. The pattern is this /_(.+?)_|/:

But the regex is too greedy. So, if I have this, /_a/_b, <-- Only the valid path, no namespaces.

It will use this mapping /_(a/)_b. So the result will be /a/:b, and it is wrong.

I change the pattern to "/_([^/]+?)_|/:", only a tiny change. :)

It works well now. Should I file a ticket in the tracker?
-----
Jack



在 2008-10-1,下午3:55, Bertrand Delacretaz 写道:

Hi,

On Wed, Oct 1, 2008 at 9:08 AM, 付 尧 <[EMAIL PROTECTED]> wrote:
...By the way, how can I debug the Servlets(such as SlingMainServlet) in the
sling using Eclipse?...

What I do is start sling using java remote debugging parameters, and
setup Eclipse for remote debugging.

Example in launchpad/webapp:

export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=30303,server=y,suspend=n"

mvn jetty:run

...and connect remote debugger to port 30303

-Bertrand (no time to look at your other issue right now, sorry)

Reply via email to