0

I am having trouble getting Shiro to redirect to both the login page and the desired url once logged in. This may be due to the fact that I do not have Shiro in my main web xml on the root context, but I would like to keep things separate if possible. Here's what I have so far...

context root: /root

This is the thing I want to protect access to using Shiro.

secondary context: /root/secondary

This is where I have Shiro enabled in web.xml

The way I would like this to work is when you navigate to /root you are redirected to /root/secondary/login.jsp. Then if you are able to login correctly you are directed back to /root. With my current configuration, I am only protecting access to /root/secondary and that's not my goal.

I think my question is, if the context path where Shiro is set up is /root/secondary, how to I have it listen for /root?

RadamHussein
  • 891
  • 7
  • 9
  • Sorry, I'm not sure what you are asking, it sounds like you have 2 questions: 1.) how to configure shiro in a web app, and 2.) how to protect paths? https://shiro.apache.org/web.html – Brian Demers Feb 02 '18 at 14:33
  • Well so far I have a very basic understanding of both, but what I am trying to do is configure shiro to protect the root path while the shiro.ini is located with the secondary context in my project structure. – RadamHussein Feb 02 '18 at 17:55
  • How are you configuring each application/context ? – Brian Demers Feb 05 '18 at 15:09
  • Can you post your web.xml having shiro environment listener and shiro.ini file – Dev Feb 15 '18 at 05:10

0 Answers0