Query servlet

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Query servlet

Valentin Olteanu
Hi all,

Is there a query servlet still available out of the box in Sling?
I've found that JsonQueryServlet was deprecated (SLING-2226), but I was
wondering what's the best alternative?

PS: JsonQueryServlet not only was deprecated, but it seems it's not working
anymore. When trying to access http://localhost:8080/home.query.json , I
get:
Invalid recursion selector value 'query' (400)

Thanks,
Valentin
Reply | Threaded
Open this post in threaded view
|

Re: Query servlet

Robert Munteanu-2
Hi,

On Tue, 2017-05-23 at 10:10 +0000, Valentin Olteanu wrote:
> Hi all,
>
> Is there a query servlet still available out of the box in Sling?
> I've found that JsonQueryServlet was deprecated (SLING-2226), but I
> was
> wondering what's the best alternative?

If you want to use this servlet you should deploy the
org.apache.sling.servlets.compat bundle to your launchpad instance.

>
> PS: JsonQueryServlet not only was deprecated, but it seems it's not
> working
> anymore. When trying to access http://localhost:8080/home.query.json
> , I
> get:
> Invalid recursion selector value 'query' (400)

That sounds like the DefaultGetServlet serving the request. You can
double-check if that is the case using the recent requests console

  http://localhost:8080/system/console/requests

Robert

Reply | Threaded
Open this post in threaded view
|

Re: Query servlet

Valentin Olteanu
Thanks Robert for the hints! I thought the compat bundle was already
present.

I get results after installing it, but I'm still looking for something that
comes out of the box in launchpad (and that's ideally not deprecated). Any
ideas?


On Tue, May 23, 2017 at 12:52 PM Robert Munteanu <[hidden email]> wrote:

> Hi,
>
> On Tue, 2017-05-23 at 10:10 +0000, Valentin Olteanu wrote:
> > Hi all,
> >
> > Is there a query servlet still available out of the box in Sling?
> > I've found that JsonQueryServlet was deprecated (SLING-2226), but I
> > was
> > wondering what's the best alternative?
>
> If you want to use this servlet you should deploy the
> org.apache.sling.servlets.compat bundle to your launchpad instance.
>
> >
> > PS: JsonQueryServlet not only was deprecated, but it seems it's not
> > working
> > anymore. When trying to access http://localhost:8080/home.query.json
> > , I
> > get:
> > Invalid recursion selector value 'query' (400)
>
> That sounds like the DefaultGetServlet serving the request. You can
> double-check if that is the case using the recent requests console
>
>   http://localhost:8080/system/console/requests
>
> Robert
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Query servlet

Robert Munteanu-2
On Tue, 2017-05-23 at 11:18 +0000, Valentin Olteanu wrote:
> I get results after installing it, but I'm still looking for
> something that
> comes out of the box in launchpad (and that's ideally not
> deprecated). Any
> ideas?

Composum does include a query functionality, but AFAICT it only returns
HTML. Not sure if that's what you're looking for.

Robert