Hi Bengt,

might be a flaw in our own "Resource" Servlet. Might need to register it
differently ...
This needs some investigation. But maybe you're able to write a simple
integration tests for it :)

regards, Achim


2016-11-02 10:29 GMT+01:00 Bengt Rodehav <[email protected]>:

> I'm using Pax-Web in Karaf 4.0.7.
>
> I'm also trying to get Apache Shiro working with the form authentication
> filter. I have the form in the file login.html.
>
> I use the registerResources() method of WebContainer to register all my
> static files (as well as login.html).
>
> Whenever I try to access a protected resource I get redirected to
> login.html - as I should be. If I enter valid credentials I then get
> redirected to where I wanted to go at first - works fine.
>
> However, if I enter invalid credentials, I should get back to the login
> page again but instead I get:
>
> *HTTP method POST is not supported by this URL*
>
> I'm not exactly sure how Shiro works internally but it seems like the url
> "/login.html" only supports GET (via the registerResources() call) but not
> POST. If so, how can I use registerResources() and also support POST?
>
> I assume that I could register a servlet connected to the login url and
> support both GET and POST. However, it seems like a lot of work since I
> must then create the login page dynamically instead of just serving a file.
>
> /Bengt
>
> --
> --
> ------------------
> OPS4J - http://www.ops4j.org - [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to