Jul 26, 2008

Implementing Permission-based System Using Struts - How to implement this

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

free web hosting

Implementing Permission-based System Using Struts - How to implement this

clemen
Hi guys,

Do you have ideas on implementing role-based and/or permission-based system on Struts?

Where can I implement the checking of the roles/permission?

we have a servlet extending ActionServlet, can i use that servlet to implement this?

Reply

patelg
First starting point is to create table user, role and user_role.

In role table make sure you have role like administratorm user, etc

Once you have all this information, you create all form and related action classes. Based on the roles of the user you can mapp different action as shown bellow:

<action-mappings>
<action path="/user/main"
type="com.something.user.AddUserAction"
roles="administrator"
validate="false" >
<forward name="success" path="main.menu"/>
</action>

<action path="/user/main"
type="com.something.user.UpdateUserAction"
roles="user,administrator"
validate="false" >
<forward name="success" path="main.menu"/>
</action>

<action>
.....
.....
</action>
</action-mappings>

There should be some tutorials out there....goooogled it.

Good luck, it will be interesting...

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : implementing permission based struts implement

  1. Hosting Struts Application - I need help here (1)
  2. Which Is The Best Java Web Framework? - JSF, Spring MVC, Stripes, Struts 2, Tapestry and Wicket (0)
    JSF Pros: Java EE Standard - lots of demand and jobs Fast and easy to develop with
    initially Lots of component libraries Cons: Tag soup for JSPs Doesn't play well with REST
    or Security No single source for implementation Spring MVC Pros: Lifecyle for
    overriding binding, validation, etc. Integrates with many view options seamlessly: JSP/JSTL, Tiles,
    Velocity, FreeMarker, Excel, PDF Inversion of Control makes it easy to test Cons: Configuration
    intensive - lots of XML Almost too flexible - no common parent Controller No built-in Aja...
  3. Is It Possible To Create A Web Based Mmo In Javascript? - And could there be free movement without reloading the page? (4)
    I would like to get some information before launching myself to the JS libraries. Is it possible to
    load maps or images and with the press of a button "scroll" or move the image inside some kind of
    window up, down, left or right? It would be like scrolling an image sideways, upwards or downwards.
    I would also like to know if multiple connections can be made and lets say there was a user
    standing in the location (127, 160) of the map, would there be the possibility of loading the image
    of that player? Maybe with database connections and storing their information there?...
  4. Struts Vs. Tapestry - (1)
    Which one do most likely prefer? Struts or Tapestry?...



Looking for implementing, permission, based, system, struts, implement

Searching Video's for implementing, permission, based, system, struts, implement
advertisement



Implementing Permission-based System Using Struts - How to implement this



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE