unable to getRealPath for servlet context

2014-03-05 Thread asookazian2
I found the following Jetty bug report: http://jira.codehaus.org/browse/JETTY-675 http://jira.codehaus.org/browse/JETTY-675 User states the following: ServletContext.getRealPath() returns null instead of returning the root dir of the webapp I am able to reproduce this behavior in my WAR

seeing the latest features in Karaf

2014-03-05 Thread asookazian2
I know about feature:list cmd. but I'd like to see the features I have installed after extracting karaf out-of-the-box. Maybe at least showing the date that each feature was installed and sort by date would be nice. -- View this message in context:

RE: unable to getRealPath for servlet context

2014-03-05 Thread Tom Leung
It is not a bug, ServletContext.getRealPath() never return a real path on OSGI container. For Equinox framework, use the following code fragment: import org.eclipse.core.runtime. FileLocator; ... ServletContext context = request.getSession().getServletContext(); URL url =

Re: seeing the latest features in Karaf

2014-03-05 Thread Jean-Baptiste Onofré
Hi, don't hesitate to create a Jira for that (if you don't know how to do that, I can create it for you). Thanks, Regards JB On 03/06/2014 01:15 AM, asookazian2 wrote: I know about feature:list cmd. but I'd like to see the features I have installed after extracting karaf out-of-the-box.

Re: seeing the latest features in Karaf

2014-03-05 Thread asookazian2
please do so thx -- View this message in context: http://karaf.922171.n3.nabble.com/seeing-the-latest-features-in-Karaf-tp4032110p4032113.html Sent from the Karaf - User mailing list archive at Nabble.com.

RE: unable to getRealPath for servlet context

2014-03-05 Thread asookazian2
Thx for quick response. What is the equivalent to FileLocator in karaf? -- View this message in context: http://karaf.922171.n3.nabble.com/unable-to-getRealPath-for-servlet-context-tp4032109p4032114.html Sent from the Karaf - User mailing list archive at Nabble.com.

Re: seeing the latest features in Karaf

2014-03-05 Thread Jean-Baptiste Onofré
https://issues.apache.org/jira/browse/KARAF-2810 On 03/06/2014 05:57 AM, asookazian2 wrote: please do so thx -- View this message in context: http://karaf.922171.n3.nabble.com/seeing-the-latest-features-in-Karaf-tp4032110p4032113.html Sent from the Karaf - User mailing list archive at

RE: unable to getRealPath for servlet context

2014-03-05 Thread Tom Leung
May change Karaf to use Equinox instead of Felix. 1. check config.properties under /etc folder, make the following change. karaf.framework=equinox 2. then locate the Equinox version. For example, Karaf v2.3.4 uses Equinox v3.8.0 # # Framework selection properties # karaf.framework=equinox #

RE: unable to getRealPath for servlet context

2014-03-05 Thread asookazian2
So I tried the recommended approach in this thread and getting the following now: karaf@root() start 265 karaf@root() java.lang.NullPointerException at org.eclipse.core.internal.runtime.Activator.getURLConverter(Activator.java:313) at

RE: unable to getRealPath for servlet context

2014-03-05 Thread asookazian2
Sorry i replied before reading your reply a few mins ago. I didn't change the karaf.framework to equinox but i basically added the following dependency to my pom: dependency groupIdorg.mod4j.org.eclipse.equinox/groupId artifactIdcommon/artifactId

RE: unable to getRealPath for servlet context

2014-03-05 Thread asookazian2
OK so I made the change in config.properties to point as follows: karaf.framework=equinox saved, stopped, started karaf in debug mode i've attached a debugger session in Eclipse and see now: url = bundleentry://243.fwk42630947/ so that's not null any more. now i get the following warning in

RE: unable to getRealPath for servlet context

2014-03-05 Thread Tom Leung
It seems that org.eclipse.osgi.service.urlconversion.URLConverter cannot be found, try to install the following bundle, make sure to find a correct version for your Equinox dependency groupIdorg.eclipse.osgi/groupId artifactIdorg.eclipse.osgi/artifactId /dependency

Re: unable to getRealPath for servlet context

2014-03-05 Thread Achim Nierbeck
Hi, as already stated this won't work for an OSGi Servlet Container. All of the deployment together with those information are handled by Pax Web. Jetty is just the mere container to run the stuff. To retrieve the actual ServletPath you will need to call request. getServletPath() But, this