Static files with Wicket and OSGi

2010-03-24 Thread Jaime Soriano Pastor
Hi, I register a wicket application in an OSGi http service using for that a WicketServlet with applicationClassName set to the name of my main application class. My problem now is that I don't know how to serve static files as CSS and so. Is there any place used by default to contain the static f

Re: Static files with Wicket and OSGi

2010-03-24 Thread Ernesto Reinaldo Barreiro
I see two options: 1-Use Wicket default machinery for serving resources (see IResourceSettings). 2-Mount a dedicated servlet: the same way you register wicket servlet. Ernesto On Wed, Mar 24, 2010 at 12:19 PM, Jaime Soriano Pastor < jsorianopas...@gmail.com> wrote: > Hi, > > I register a wicket

Re: Static files with Wicket and OSGi

2010-03-24 Thread Pedro Santos
Put then in the top-level directory of a web module. http://java.sun.com/javaee/5/docs/tutorial/doc/bnadx.html#bnadz "A web module has a specific structure. The top-level directory of a web module is the *document root* of the application. The document root is where JSP pages, *client-side* class

Re: Static files with Wicket and OSGi

2010-03-24 Thread Ernesto Reinaldo Barreiro
*document root* on an OSGI environment? Ernesto On Wed, Mar 24, 2010 at 12:46 PM, Pedro Santos wrote: > Put then in the top-level directory of a web module. > > http://java.sun.com/javaee/5/docs/tutorial/doc/bnadx.html#bnadz > > "A web module has a specific structure. The top-level directory of

Re: Static files with Wicket and OSGi

2010-03-24 Thread Jaime Soriano Pastor
On Wed, Mar 24, 2010 at 12:57 PM, Ernesto Reinaldo Barreiro wrote: > *document root* on an OSGI environment? > Yes, it's what I was just trying and it worked :) Many thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apa

Re: Static files with Wicket and OSGi

2010-03-24 Thread Ernesto Reinaldo Barreiro
Are you using bridge servlet approach? On Wed, Mar 24, 2010 at 12:59 PM, Jaime Soriano Pastor < jsorianopas...@gmail.com> wrote: > On Wed, Mar 24, 2010 at 12:57 PM, Ernesto Reinaldo Barreiro > wrote: > > *document root* on an OSGI environment? > > > Yes, it's what I was just trying and it worked

Re: Static files with Wicket and OSGi

2010-03-24 Thread Jaime Soriano Pastor
On Wed, Mar 24, 2010 at 1:05 PM, Ernesto Reinaldo Barreiro wrote: > Are you using bridge servlet approach? > I don't think so... Is it needed to have several Servlets? I have only one. What I do is to launch Apache Felix Http Jetty as implementation of the OSGi HTTP service and register the wicket

Re: Static files with Wicket and OSGi

2010-03-24 Thread Ernesto Reinaldo Barreiro
Interesting but that is not the same as a document root as in mentioned link. Isn't it? So, your document root is the root of the class-path? Best, Ernesto On Wed, Mar 24, 2010 at 1:18 PM, Jaime Soriano Pastor < jsorianopas...@gmail.com> wrote: > On Wed, Mar 24, 2010 at 1:05 PM, Ernesto Reinal

Re: Static files with Wicket and OSGi

2010-03-24 Thread Ernesto Reinaldo Barreiro
Hi, I have tried this with equinox and it works too. For instance I'm able to read file http://localhost:8080/hibernate.cfg.xml which is on root of the class path. They are just served by WicketServlet.fallback method. Ernesto On Wed, Mar 24, 2010 at 1:24 PM, Ernesto Reinaldo Barreiro < reier.

Re: Static files with Wicket and OSGi

2010-03-24 Thread Ernesto Reinaldo Barreiro
But it won't work if you mount the Servlet to something different than "/". E.g. mounting on "/manager" then http://localhost:8080/manager/hibernate.cfg.xml will not work. Just curious about what are the implications of mounting on "/" and what the OSGi specification says about this? Ernesto On

Re: Static files with Wicket and OSGi

2010-03-24 Thread Jaime Soriano Pastor
Weird, I have also tried to register the application on "/foo" instead of on "/" and, as you said, I cannot access to static files. I haven't seen anything special about root alias on OSGi specification (only that is the only alias allowed to end with "/") Jaime. -

Re: Static files with Wicket and OSGi

2010-03-24 Thread Ernesto Reinaldo Barreiro
Haven't had time to check the specification but this behavior (mounting on "/") might pose a security risk as you can fetch "invisible" things form the class path (e.g. configuration files containing sensitive information like passwords). On the other hand I see HttpService class has a registerReso

Re: Static files with Wicket and OSGi

2010-03-24 Thread Jaime Soriano Pastor
On Wed, Mar 24, 2010 at 3:08 PM, Ernesto Reinaldo Barreiro wrote: > Haven't had time to check the specification but this behavior (mounting on > "/") might pose a security risk as you can fetch "invisible" things form the > class path (e.g. configuration files containing sensitive information like