Acess control in JSF

Hi,
I have some doubts about how I can create my control acess using JSF. I have already created this type of control in a desktop application, however is not equals in web applications. In my desktop application I had 3 entity's User, Menu and Permission. With this I defined what user's could be acess the menu. But in the web application, how can I do this? I don't think this is a good solution for web.
Anybody have a suggestion?
I am using:
Hibernate, Spring and Primefaces.

1000369 wrote:
I liked it and I am searching a good material, do you know something? JAAS is only used with JBoos, it is correct?Research more then, because your conclusions are not correct and even far fetched.
JAAS is indeed an API for authorization AND authentication. Any application server provides support for it to manage user authentication ("login") at least. If you want to know more about it, I suggest googling for articles. So far I have not seen any reason for you to post in a forum, you have no problems and your research is leading you into worthwhile areas to investigate. So go do that.

Similar Messages

  • Dynamic creation of Controls in JSF ??????

    i just started on JSF...I've good experience with ASP.NET....
    I have liked what I've seen so far in JSF.....It's pretty straight forward ...neat clean and simple...
    What I am looking for in JSF is a way to create controls in a page dynamically.... A simple thing like UIRootView.....parent control...add(controltype).. something like that.....
    Is it possible ? ie, can we have a staright forward access to the control tree at some stage of life cycle of a request without having to write view handlers or Phase listeners ?
    Pardon my ignorance....I am just a new guy who is getting sold on the JSF idea ....

    Thanks... but I am not sure if I understand you correctly. can you elaborate on it ?
    also, what's stopping me from accessing the API to do that same thing as ASP.net ? Tree,TreeFactory etc. might be the answer. There's got to be some API which does the management of control tree in the first place.
    Now the quest is to find it and use it.
    Any clues on this front ? Also, maybe this thread will catch the attentoin of someone who can add to the "wishlist" for JSF...It is an useful feature
    for the dynamic world we live in....DON'T YOU THINK ?

  • Ability to programmatically control a JSF tag outside the JSP?

    Hi All,
    I created my own JSF component (a small grid) and I would like to know if it's possible to programatically control it outside my JSP.
    For example let's say that I have the following snippet of code in my JSP:
    <mytag:grid id="grid1"/>
    Is it possible to access "grid1" in my controller (or somewhere else) and do something like that:
    grid1.addcolumn ("column1") --> my UI component has an addColumn method.
    grid1.addcolumn ("column2")
    // loop through the column and set the width
    for (int i=0; i<grid1.columns.count;i++) {
    grid1.columns.width="200px"
    Thanks for your help and Happy Thanksgiving!!!

    It is also possible to create a web application with Faces
    independent of JSP. We (the Faces team) have done some prototypes
    in this area. For example, you can programmatically do something
    like this for rendering:
    // Render the response content for an individual component
    protected void renderResponse(FacesContext context,
    UIComponent component) throws IOException {
    component.encodeBegin(context);
    if (component.getRendersChildren()) {
    component.encodeChildren(context);
    } else {
    Iterator kids = component.getChildren();
    while (kids.hasNext()) {
    renderResponse(context, (UIComponent) kids.next());
    component.encodeEnd(context);
    In one of our prototypes we've also used XUL (in replace of JSP) to
    describe a Faces page.
    Cheers,
    -roger

  • Logic control in JSF's jsp

    Hello I have fundmental question to ask;
    In Struts or JSP page, you can use logic control to determine what will display. For intance, the tag on strut <logic:match> <logic:equals>. I am wondering how to have this sort logic in JSF. Thanks!

    Thanks guys!
    the simple solution is what you said:
    in JSF page, binding rendered to a propertity in the bean. on the bean create the property - method to have the logic to return true or false. Do you think if it is a better solution than using jstl -- I dont know too much JSTL - I am more service side developer such as proxy service, application server to host tcp connection from clients...

  • What happens to regular input controls within JSF form?

    What does JSF do with plain HTML/XHTML input controls contained inside a JSF form? Considering an HTML form gets rendered I would image that the values of the plain HTML control gets submitted. Does JSF just trash them?

    Anthony_Smith wrote:
    That's what I thought would happen. My request maps are returning empty though (calling ExternalContext#getRequestParameterValuesMap()). Just in case I'm being misunderstood I'm going to try to explain my question again.
    I have a JSF form but I'm trying to stick regular input tags in them. I haven't had any luck getting them back through the request methods in ExternalContext. It's as if they're not getting submitted or JSF is just throwing them out. Any ideas?If the request parameter map was empty, JSF wouldn't be able to handle a postback. So, we arrive at one of the following possibilities:
    1) The request is not a postback, but a simple parameterless GET. But you indicate a form is being submitted, seemingly discounting this possibility. However, if you are using a redirect, it is not an uncommon mistake to forget that and assume that everything from the previous request will be available during the redirected request, which it is not.
    2) Your JSF implementation is completely broken.

  • JDev 1013, Webservice as Data Control in JSF page returns error

    Hello,
    For a client we are starting a project with Java Server Faces in combination with web services. In order to do some testing we created a web service in PLSQL (with a empno input field and a record output) and deployed this web service on an OC4J container. We then created a (new) JSF project, used the PLSQL web service as a Data Source, and used this Data Source in a JSF page.
    When this JSF page is started an error occurs validation -
    DCA-40007: The value for parameter "empNo" cannot be null..
    The webservice can however be called in the page, the output is shown but the error stays in the page.
    Communication with support gave me a temporary solution
    I've put in the page definition for both the methodIterator (getEmpIter) and the accessIterator (ReturnIterator) the Refresh="Deferred". Now the error doesn't show in the page at startup of the page. Data is presented correctly after pushing the button, though still in the Jdeveloper Embedded OC4J Server Log shows a list of
    ERROR Value for parameter : 'empNo' cannot be null.
    In a multi row Webservice (created by JDeveloper) however i still get this error.
    (1) What caused this error?
    (2) When is the next version of JDeveloper due?
    (3) I am looking for documentation on the following subjects
    (3.1) How a JSF page is rendered by the Oracle JSF implementation
    (3.2) How to read and adjust the JSF page definition, for example the <executables> part
    (3.3) Problem with the extra abstraction layer is that is very hard to find where an error occurs. Is a mechanism/documentation available to find in which JSF fase an error occurs and how to bypass it?
    Regards Leon Smiers

    (1) I think what is happening is that your page calls out to the Web service when you first run it without any parameter. This is why you get the error and also the reason that deffer works to solve this.
    I think a solution would be to have your Web service handle the case of receiving an empty parameter.
    (2) When it is ready :-)
    (3.2) right click the jsf page and choose "go to page defenition" you can then edit it using the structure pane and the property inspector.
    (3.3) you can run in debug mode, the code for ADF will be available when we go production, and with it a lot of more documentation.

  • Version Control - Web(JSF) project

    Hello fellows,
    Which version control for Web project you are using? I have been using CVS for common java (and nojava) projects but is there any another version control tool for Web projects. Any suggestion how web projects should be stored in repository?, how web project should be maintained ?.
    Any help and suggestion will be helpful.
    Thanks in advance.

    SVN is better then CVS

  • Create Roles with acess control in SAP MDM

    Hi Experts,
    I am new to SAP MDM.I want to know how to create roles with access control for various users in SAP MDM.
    Thanks,
    Manoj

    hi,
    in the console; you can create roles with access control and you can assign these roles to users.
    follow this path:
    Console --> repository --> Admin node --> roles,
    here you can create new role. for role here you can maintain
    1. role detail
    2. Functions --here you can restrict the particular role ,  none / Execute the functions.
    3. Tables/fields  -- here you can give access to the role Read only / Read and write, and you can apply constraints also.
    and follow the links:
    http://help.sap.com/saphelp_mdm550/helpdata/en/8e/9f9c427055c66ae10000000a155106/frameset.htm
    http://help.sap.com/saphelp_mdm550/helpdata/en/8e/9f9c427055c66ae10000000a155106/frameset.htm
    http://help.sap.com/saphelp_mdm550/helpdata/en/8e/9f9c427055c66ae10000000a155106/frameset.htm
    http://help.sap.com/saphelp_mdm550/helpdata/en/8e/9f9c427055c66ae10000000a155106/frameset.htm
    http://help.sap.com/saphelp_mdm550/helpdata/en/8e/9f9c427055c66ae10000000a155106/frameset.htm
    hope this may help you,
    Regards,
    Srinivas

  • Amber Light Issue -- Acess Control

    Just set up an Airport Extreme n and it's been working fine.
    I have SBC DSL running with a Siemens Speedstream modem, coonected to a D-Link Broadband Ethernet Router. From the router I have an old iMac set up, plus I've attached the Airport Extreme n to that.
    From there I set up the AirPort for wirless connections to a couple of last-generation 12" iBook computers with Airport Extreme cards. Everything works fine.
    I set up a closed network. Works fine. Then I implement access control.
    I'm following instructions in Airport Help and the first bump in the road is that I find no "Local" option in the dropdown menu for MAC address access control. (5.1 Airport Utility, 7.1 firmware) No problem, I choose "Timed Access" and "This Computer" and select the "Everyday" "All Day" options. As soon as I make this update the AirPort indicator light comes back amber and the error message says I have no valid IP address and I'm not connected to the internet.
    Only I am connected to the internet.
    Even after setting up both laptops and restarting them, I am connected to the internet (see, I'm here) but the indicator error message says I'm not. I've checked ignore, and things are green and happy, but I wonder what is going on here?
    Can anybody buy me a clue here?

    LCMamaBear wrote:
    tech help changed addresses...could that be related?
    Yes. Whenever you change a DSL or cable modem, its MAC address table becomes updated with the address of the last device connected to it. When you connected your iMac directly to the modem, they effectively married one another. Your modem, being faithful to your iMac, won't talk to your AE.
    To effect a divorce you need to reset the modem. Usually this means powering it down for a moment or two, but some relationships are more involved, requiring a few hours of down time.
    Try that, then connect your AE to it. They'll get along fine.

  • Best practice for Acess Control 10 nwbc (master data)

    We are in the process of bringing data over from our GRC AC 5.3 environment to GRC AC 10 and have ran into issues during Migrations. We have been able to go in and clean much of our data manually. We are at the point that we want to copy info over to our test system.  the ABAP layer data seems pretty strait forward either via transport.
    we are struggling with developing a method to bring over the data maintained in NWBC.
    Dose anyone have a working method do this or a way they have copied all content from one system to another?
    Thanks,
    Brian

    Lets see now;
    Leave the phone plugged in, maybe the phone shorts out You come home find a burnt out shell of what was once your home
    Take it with you or just switch it off

  • Is it possible to create data control from wsdl when complextype is used

    Getting DCA-40015 error when trying to create a data control from WSDL file.
    The error clearly says complextype is not supported . just trying to see if there are any workarounds . because creating data control will save time in developing user interface by dragging and dropping the the data control in jsf page. jdeveloper webservice tester is able to create user interface for me based on wsdl when i run it , trying to develop the user interface using jsf pages
    oracle.adf.model.adapter.AdapterException: DCA-40015: Failed to create the structure for schema element "result". The complex type definition of the element is not supported.

    Hi,
    I could reproduce what I did:
    - created WebService from custom Pojo Model
    - Made sure all entities implemented serializable
    - In the WebServices Wizard, I created XML representations for my entities
    - tested with OC4J WebServices tester
    - Built ADF data control from WSDL file of deployed WebService
    - Created dependency t project containing the POJO entities
    - Selected result.xml of each method exposed in the WebService project
    - In the structure window, selected "item" (result-->item)
    - changed Bean class to my entity class name (absolute name)
    This showed my entity in the DC palette
    Frank

  • Dynamic forms with JSF

    Hello guys !
    I hope you can help me. I am trying to do something with JSF, but I am not sure if JSF is the right approach.
    I am trying to build a dynamic web service, based on the information of a web service. That is I dont know the controls ( radio buttons, checkboxed, input boxes) , my form will have in advance, so I dont build any managed bean that maps all the controls.
    What I thought , it is to have a collection, which has the description of all the questions and posible answers, and dynamically go through the collection and build the form. (that is something I can do with datatables), and then when the user submits the form , in the action method ...I would recover the "answers" based on the ID or name of the controls, but for my surprise I cannot set the name of the controls with JSF , so I am clueless to send the answers of the form.
    I post the fill-up of the form to another web service which very briefl requires someting like this
    <answers>
            <answerid></answerid>
            <answervalue></answervalue>
    </answers>I might have the value , but not the answerid
    Thanks,
    Deibys

    or is there a way I cam force the id of a control ?
    <h:selectOneRadio id="#{question.questionid}"  layout="pageDirection" >
                             <f:selectItems value="#{question.answersOptions}" />
                        </h:selectOneRadio>this does not work for me
    org.apache.jasper.JasperException: /encuestaRiesgo.jsp(22,4) PWC6314: According to the TLD, the attribute id is not a deferred-value or deferred-method, but the specified value co

  • How to restrict acess to a single user for a proxy service in OSB

    how to restrict acess to a single user for a proxy service in OSB

    A.     Go to Proxy Service and Click on the Security tab
    B.     Click on Transport Acess Control Policies to Edit.
    C.     Click on Add Conditions to Restrict the users.
    D.     In the Predicate List Select the User Category
    E.     Give the User Name to which you want to give access.

  • Dynamically adding a row in a table in JSF

    Hi All,
    I am searching for a control in JSF using which I can dynamically add more than one row in a table. Currently I am handling this in javasript where I have to click on the "Add Row" button to add one more row at the bottom of the table. I want to get rid of javascript.
    If anyone knows about such control then please help me.
    Thanks in advance.
    Regards,
    Saket

    hello Saketh,
    here is the code for Create Delete Update code where a row is added for every button click..and the JSF code is at the bottom.. today u r blessed with ocean. :-) have fun!!
    package redrose;
    import net.sf.hibernate.Session;
    import net.sf.hibernate.Transaction;
    import net.sf.hibernate.Query;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    public class RowEntry {
         private DataModel datamodel = null;
         static Integer sid;
         private Medata mdobject = null;
         private Medata nm=null;
          * @return Returns the newMdobject.
         public Medata getNm() {
              nm = new Medata();
              return nm;
          * @param newMdobject The newMdobject to set.
         public void setNm(Medata newMdobject) {
              this.nm = newMdobject;
          * @return Returns the mdobject.
         public Medata getMdobject() {
              return mdobject;
          * @param mdobject The mdobject to set.
         public void setMdobject(Medata mdobject) {
              this.mdobject = mdobject;
         public DataModel getDatamodel()
              datamodel = new ListDataModel();
              Session hibSession;     
              try{
                   hibSession = HibernateSessionFactory.currentSession();
                   Query q = hibSession.createQuery("FROM Medata");                    
                   q.setMaxResults(9999);
                   datamodel.setWrappedData(q.list());
              catch(Exception ex){
                    System.err.println("%%%% Error GetData %%%%");
                    ex.printStackTrace();
              return datamodel;
          * Inserting a new Record by reading from Client
         public void insertEntry()
                  Transaction tx = null;
                   Session session = null;
                   try{
                        session = HibernateSessionFactory.currentSession();
                        tx = session.beginTransaction();
                        Medata     dbmedata = new Medata();
                             dbmedata.setEmploy(nm.getEmploy());
                             session.save(dbmedata);
                        tx.commit();
                        session.close();
                   catch(Exception ex){
                        System.err.println("%%%% Modify Data %%%%");
                        ex.printStackTrace();
          * Modify data
         public void updateEntry()
              int a =0;
             if (this.datamodel == null) return;
             Medata mdupdate = (Medata) this.datamodel.getRowData();
             if (mdupdate == null ) return;
              Transaction tx = null;
              Session session = null;
              try{
                   session = HibernateSessionFactory.currentSession();
                   tx = session.beginTransaction();
                   Medata dbmedata = (Medata) session.load(Medata.class,mdupdate.getId());
                   if (dbmedata != null){ // we have to update the record
                        dbmedata.setEmploy(mdupdate.getEmploy());
                        session.update(dbmedata);
                   else // we have to insert the record
                        dbmedata = new Medata();
                        dbmedata.setEmploy(mdupdate.getEmploy());
                        session.save(dbmedata);
                   tx.commit();
                   session.close();
              catch(Exception ex){
                   System.err.println("%%%% Modify Data %%%%");
                   ex.printStackTrace();
          * Delete Data
         public void removeEntry()
             if (this.datamodel == null) return;
             Medata mdupdate = (Medata) this.datamodel.getRowData();
              Transaction tx = null;
              Session session = null;
              try{
                   session = HibernateSessionFactory.currentSession();
                   tx = session.beginTransaction();
                   Medata dbmedata = (Medata) session.load(Medata.class,mdupdate.getId());
             if (mdupdate == null ) return;
                   if (dbmedata != null){ // we have to update the record
                        session.delete(dbmedata);
                        tx.commit();
              catch(Exception ex){
                   System.err.println("%%%% Delete Data %%%%");
                   ex.printStackTrace();
    Here starts the JSF code
    <%@ page language="java" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="<%=basePath%>">
         <title>My JSF 'trial.jsp' starting page</title>
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <!--
         <link rel="stylesheet" type="text/css" href="styles.css">
         -->
    </head>
    <body>
         <f:view>
              <h:form>
         <h:dataTable border="3" value="#{bla.all}" var="currentRow">
                          <h:column>
                            <f:facet name="header">
                                 <h:outputText value="Employee Name" />
                            </f:facet>
                  <h:inputText value="#{currentRow.employ}">
                            </h:inputText>
                       </h:column>
                          <h:column>
                            <f:facet name="header">
                                 <h:outputText value="Employee Number" />
                            </f:facet>
                            <h:inputText value="#{currentRow.id}"></h:inputText>
                       </h:column>
                       <h:column>
                       <f:facet name="header">
                       </f:facet>
                       <h:commandButton id="Delete" action="#{bla.insert}" value="Delete"></h:commandButton>
                  <h:commandButton id="Modify" action="#{bla.modify}" value="Modify"></h:commandButton>
                       </h:column>
                  </h:dataTable>
                   <h:commandButton id="Insert" action="#{bla.insert}" value="Insert"></h:commandButton>
               <%--h:outputText value="#{bla.sid}"></h:outputText--%>
               </h:form>
         </f:view>
    </body>
    </html>
    Faces-config file starts here
    <managed-bean>
              <description>Inserts a record</description>
              <managed-bean-name>bla</managed-bean-name>
              <managed-bean-class>redrose.RowEntry</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>     
         

  • After time capsule 7.6 Firmware upgrade I can't set up Access Control / Timed Access using mac adresses.

    After time capsule 7.6 Firmware upgrade I can't set up Access Control / Timed Access using mac adresses.
    I have a Time Capsule and an Airport express and when I change access control parameters on whatever one of those
    two devices through Airport Utility its duplicating the same setup on the other device !
    What a mess !
    I had to choose "Not Enabled" in the Access Control stup window.
    Has anyone experienced same problem ?
    Jean.

    I did downgraded firmware to 7.5.2 ...
    and the Acess Control Setting from Airport Utility is back to normal behaviour.
    Jean.

Maybe you are looking for

  • Business Partners - Alternate Payee Details

    Dear Members, I have a Business Partner, a supplier that has requested that we pay their invoices to a u201Cfinance companyu201D instead of them. How can I setup their records so that the payment file for upload to our bank i.e. the electronic funds

  • JEditorPane HTML link in the same page

    Hi, I want to show an HTML page in JEditorPane. The HTML page have <a> tags that link to a bookmark in the same page, but I can�t show this because I get an error like this: MalformedURL or similiar. I try to do somethig like this: public void hyperl

  • How do you switch between JRE v1.4.x and v1.5.x

    Java 2 Runtime Environment, v1.5.0_02-b09 Control Panel doesn't appear to let user switch back to a 1.4.x version. Hoping someone can can me how to do this. I have an application that uses JRE 1.4.2 and does not allow user into the interface until th

  • Keynote and PowerPoint

    I am considering using Keynote instead of PowerPoint. 2 Questions: 1. Can you save a Keynote file as a PowerPoint file. That is, export to PowerPoint? 2. Can you import a PowerPoint presentation into Keynote? Thank you whoever.

  • Link between AP and GL main tables in 11i

    Hello, Can anyone please provide the link between AP and GL main tables. I need a join between the AP_Invoices_All, AP_INVOICE_DISTRIBUTIONS_ALL, GL_JE_LINES, GL_JE_HEADERS. Actually, I found a query that is as below. I want to confirm if that is cor