You don't *have* to use the form/input components, you can still use a plain html form. Anyway, check the action url the the form is posting to. I'm guessing Shiro prevents access to it since you are not posting to your login url (/login.jspx). You can allow access to it or change the login url configuration accordingly (but it's still just a shot in the dark - need to see more code to know for sure).
Kalle On Tue, Oct 5, 2010 at 12:25 AM, [email protected] <[email protected]> wrote: > > Hi Kalle, > > I am managing the login myself, and have tried it in a simple html form. > This worked in a standalone test program, but when inserted into the > Icefaces application it failed. When I converted the form to use an Icefaces > managed bean the page was displayed OK, and input was accepted to the name > and password fields, but it was like the login code just wasn't being > called. > > There were no error messages in the tomcat logs, and my own log files > weren't being created. > > This is the servlet code I used for authentication: > > String username = request.getParameter("username"); > String password = request.getParameter("password"); > > //create a UsernamePasswordToken using the > //username and password provided by the user > UsernamePasswordToken token = > new UsernamePasswordToken(username, password); > > try { > > //get the user (aka subject) associated with > //this request. > > Subject subject = SecurityUtils.getSubject(); > subject.login(token); > > regards, > Philip > > -- > View this message in context: > http://shiro-user.582556.n2.nabble.com/Using-Shiro-with-Icefaces-tp5600653p5602121.html > Sent from the Shiro User mailing list archive at Nabble.com. >
