• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

@RolesAllowed, @PermitAll, etc Servlet . with Tomcat JDBC Realm

 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends..

i've a doubt about Servlet and Tomcat JDBC Realm..
i've two user credential, manager and admin
assume that i've configured Tomcat JDBC Realm.. does realm recognized in Servlet?..

i've configured Servlet like this instance..


then how to get User's Role for used on Servlet?

Thanks in advance..
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please help me and correct me if iam wrong..

Yap, iam just greenhorn..
Thanks in advance...
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if @RolesAllowed can be used with Servlets or not. I think it is not supported on glassfish at least (reference). I think it will be supported after servlet 3.0 as given here. You can refer to this tutorial to see how to do this with configuration in web.xml file...
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I can tell, the servlet API for 2.5 and earlier did not provide for any annotations. All configuration was via web.xml.

NOW - some projects, such as Jersey, used annotations but that was outside the servlet API.

Using annotations for configuration is one of the big jumps for servlet 3.0. Here is the JSR for servlet 3.0.

Where did you see RolesAllowed in use?

Bill
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is there any another way to configure roles in Servlet 2.5?..

i think i wanna save the role in Session.. (firstly, i save the role in Session when access Login Servlet)
and check it every access to Servlet.. .. yap, i think it's really "ticklish" to configure..
this is my implementation :


please correct me if i'm wrong..

Thanks in advance..
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic