Jsp and jspx and scriplets - Hiding buttons based on J2EE security roles

Hello:
I have security a scoped managed bean with methods is Technician(), isUser() etc. In the jsp world, it was very easy to inspect these methods in the jsp via scriplets and show/hide buttons/links etc. I am just curious. Or, is rendering via EL expression the way to go?
(1) In the jspx world (SRList.jspx in my case), is there an easy way to inspect these managed bean methods and use scriplets to access them and show/hide buttons.
In the jsp world, I would have written something like
if (SecurityInfo.isTechnician()
{ %>
<Button>
<% } %>
There would be an import statement to have access to SecurityInfo class in jsp world. I know something is out there in the ADFBC/jspx world. Please advice? If you know of any urls, please let me know.
(2) Is there a way to grant read/write access to individual pages in my app? I can hide/view buttons based on roles but can't grant update/view access to individual fields on my pages. I know I have to wait for JDEV 11 release to grant permissions via pagedef/iterator as is done in file based security.. Any other solution till then?
Thanks

hi useradfbc
about (1), you could try something like this
<af:commandButton text="my button for managers" rendered="#{userInfo.manager}"/>(tip : You can use "Your Control Panel" to make your name visible in forum posts.)
success
Jan Vervecken

Similar Messages

  • Hiding buttons based up on business role; Is possible by the BASIS?

    Hi Experts,
    I have done one enhancement for hiding the buttons according to Business role using coding but it was not possible for all the desired buttons since I couldnu2019t find out relevant internal tables for the buttons.
    Now we are planning to do the same activity by the BASIS help.
    Are Hiding buttons based up on user or business role can be possible by the BASIS activity like authorization object to handle the drop downs based up on roles .
    If possible please suggest me the way out to resolve the issue using any kind of BASIS activity.
    Thanks
    Chand

    Hello,
    I do not think that the BASIS can help you in deleting/hiding buttons from the UI. Generally, the buttons are stored in the GT_BUTTON/GT_BUTTONS attribute of the overview view/viewset controller. In some cases it may be hard coded inside the htm page as well in the form of HTML tags.
    We'd definitely need to do some programming to achieve the functionality you are looking for, Also remember it is different for different views. You need to find out the view that has the buttons.
    Do a F2 on your UI screen to find out the details of the screen.
    Regards
    Prasenjit

  • OID Dynamic Groups and J2EE security roles

    Hi
    I've searched the forums but can't get a definite answer. Is it possible to use OID dynamic groups and map them to J2EE security roles? I can't find anything that says specificially not but I can't seem to get it to work.
    Thanks
    Adam

    Hi,
    Let me know if you find answer of your question.
    thanks

  • Showing or hiding buttons/ enabling text boxes depending upon security role in Portal

    Hi All,
    Is it possible to show or hide ceratin text box or buttons depending on the security
    role of the user ? Let's suppose we have screen with buttons update, delete. Now
    we want that when a administrator logs in he will see a screen with data in editable
    text boxes and update and delete button. In case of normal user, only the phone
    no. will be editable and he can't see the delete button.
    Is it possible using portal feature ?
    Any suggestion is welcome.
    TIA,
    Sudarson

    Sudarson,
    Not that I know of. If you'd like to eloborate on the feature you're
    building I can log an enhancement request for you.
    Sincerely,
    Daniel Selman
    "sudarson" <[email protected]> wrote in message
    news:3c5f698e$[email protected]..
    >
    Hi Daniel,
    Thanks for the reply. I think, I should elaborate my query.
    Yeah, programattically we can do the stuff. But my question is that isthere any
    such feature in weblogic portal so that in stead of using is UserInRoleand doing
    it programatically, we can do it thru portal, thus having bettermaintainability.
    >
    Regards,
    Sudarson
    "Daniel Selman" <[email protected]> wrote:
    Sudarson,
    Yes this is possible. You can programmatically check the logged in user's
    role within your JSP and react accordingly (all standard J2EE). You
    should
    do this with caution however as you could quickly create a maintenance
    problem for yourself. Declarative security externalizes all security
    settings (groups. permissions etc.) away from application code and is
    usually to be preferred.
    Programmatic security through EJB mechanisms such as the SessionContext
    isCallerInRole and getCallerPrincipal methods and web-tier methods
    getRemoteUser, isUserInRole and getUserPrincipal.
    http://java.sun.com/j2ee/j2sdkee/techdocs/guides/ejb/html/Security5.html
    Sincerely,
    Daniel Selman
    "sudarson" <[email protected]> wrote in message
    news:3c5e81cf$[email protected]..
    Hi All,
    Is it possible to show or hide ceratin text box or buttons dependingon
    the security
    role of the user ? Let's suppose we have screen with buttons update,delete. Now
    we want that when a administrator logs in he will see a screen withdata
    in editable
    text boxes and update and delete button. In case of normal user, onlythe
    phone
    no. will be editable and he can't see the delete button.
    Is it possible using portal feature ?
    Any suggestion is welcome.
    TIA,
    Sudarson

  • Jsp and Jspx  generates error when attempting to open for edit.

    This occurred trying to open index.jsp.(Happens trying to .jsp or .jspx files)
    Here’s what the "Details>>" button showed
    java.lang.NullPointerException
         at oracle.jdevimpl.webapp.model.content.DocumentInfoManager$XmlDocumentInfoImpl.<init>(DocumentInfoManager.java:360)
         at oracle.jdevimpl.webapp.model.content.DocumentInfoManager$XmlDocumentInfoImpl.<init>(DocumentInfoManager.java:351)
         at oracle.jdevimpl.webapp.model.content.DocumentInfoManager.getDocumentInfo(DocumentInfoManager.java:176)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.getDocumentInfo(HtmlEditor.java:592)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.createDocuments(AbstractWebAppEditor.java:1197)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.open(AbstractWebAppEditor.java:393)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.open(HtmlEditor.java:172)
         at oracle.jdevimpl.webapp.editor.jsp.JspEditor.open(JspEditor.java:113)
         at oracle.ideimpl.editor.EditorState.openEditor(EditorState.java:239)
         at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:147)
         at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:90)
         at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
         at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
         at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
         at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:275)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1261)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1196)
         at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1131)
         at oracle.ideimpl.editor.EditorManagerImpl.whenOpenEditor(EditorManagerImpl.java:2332)
         at oracle.ideimpl.editor.EditorManagerImpl.handleEvent(EditorManagerImpl.java:1944)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:525)
         at oracle.ide.controller.IdeAction$1.run(IdeAction.java:772)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:789)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:498)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    If it helps, I also get message when I Selected Project Properties -> JSP Tag Libraries
    java.lang.ArrayIndexOutOfBoundsException: 2835
         at oracle.ide.net.JarIndex.buildIndex(JarIndex.java:538)
         at oracle.ide.net.JarUtil.getJarIndex(JarUtil.java:270)
         at oracle.ide.net.JarURLFileSystemHelper.tryGetJarIndex(JarURLFileSystemHelper.java:425)
         at oracle.ide.net.JarURLFileSystemHelper.exists(JarURLFileSystemHelper.java:125)
         at oracle.ide.net.URLFileSystem.exists(URLFileSystem.java:498)
         at oracle.jdevimpl.webapp.jsp.libraries.TldUtils.findLibraries(TldUtils.java:607)
         at oracle.jdevimpl.webapp.jsp.libraries.TldUtils.findLibraries(TldUtils.java:549)
         at oracle.jdevimpl.webapp.jsp.libraries.LocalJspLibraryManager.updateDistributedLibraries(LocalJspLibraryManager.java:1231)
         at oracle.jdevimpl.webapp.jsp.libraries.LocalJspLibraryManager.scan(LocalJspLibraryManager.java:1199)
         at oracle.jdevimpl.webapp.jsp.libraries.LocalJspLibraryManager.scan(LocalJspLibraryManager.java:1180)
         at oracle.jdevimpl.webapp.jsp.libraries.LocalJspLibraryManager.init(LocalJspLibraryManager.java:350)
         at oracle.jdevimpl.webapp.jsp.libraries.LocalJspLibraryManager.getManager(LocalJspLibraryManager.java:91)
         at oracle.jdevimpl.webapp.jsp.libraries.wizards.TagLibrariesPanel.onProjectPanelEntry(TagLibrariesPanel.java:250)
         at oracle.ide.model.panels.ProjectSettingsTraversablePanel.onEntry(ProjectSettingsTraversablePanel.java:87)
         at oracle.ide.panels.MDDPanel.enterTraversableImpl(MDDPanel.java:926)
         at oracle.ide.panels.MDDPanel.enterTraversable(MDDPanel.java:899)
         at oracle.ide.panels.MDDPanel.mav$enterTraversable(MDDPanel.java)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelectedNavigable(MDDPanel.java:1348)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelection(MDDPanel.java:1216)
         at oracle.ide.panels.MDDPanel$Tsl.actionPerformed(MDDPanel.java:1210)
         at javax.swing.Timer.fireActionPerformed(Timer.java:271)
         at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:515)
         at java.awt.Dialog.show(Dialog.java:536)
         at java.awt.Component.show(Component.java:1300)
         at java.awt.Component.setVisible(Component.java:1253)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
         at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:276)
         at oracle.ide.model.panels.ProjectPropertiesDialog.showDialog(ProjectPropertiesDialog.java:223)
         at oracle.ide.model.panels.ProjectPropertiesDialog.showDialog(ProjectPropertiesDialog.java:89)
         at oracle.ide.model.panels.ProjectPropertiesDialog.showDialog(ProjectPropertiesDialog.java:80)
         at oracle.jdeveloper.model.JProjectStructureController.handleEvent(JProjectStructureController.java:111)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:525)
         at oracle.ide.controller.IdeAction$1.run(IdeAction.java:772)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:789)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:498)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Is this fixable?

    I am getting this error message as well. I have just downloaded Lightroom recently. I try to click on Lightroom / preferences....and nothing happens. I tried to uninstall and it is greyed out so I can't do that either. Suggestions? Please help?

  • How to realize Checkbox and Radio Buttons based on Attributes in JHeadstart

    Hy@ all,
    I try to redevelop the Summit Forms Demo in ADF.
    The module "ORDER" contains, among other things, a checkbox and radio buttons based on database columns(VARCHAR2).
    The column(checkbox) named PAYMENT_TYPE contains the values CASH and CREDIT and the column(radio button) called ORDER_FILLED contains the values Y and N.
    After creating the business components, I set in JHeadstarts Application Definition the Display Type of these two attributes to checkBox and radio-horizontal.
    I created a dymanic domain for the radio-horizontal and a static domain for the checkBox.
    The radio-horizontal within the dymanic domain works nearly correct.
    I set the Data Collection in this dynamic domain to the required Group and the Value and Meaning Attribute to the necessary Attribute.
    Within the JSF- Page the values are shown right but unfortunately there are too many radio buttons available. Instead of displaying the two radio buttons CASH and CREDIT were many CASH and CREDIT radio buttons shown.
    I can´t find any solution for this case.
    The problem with the checkBox is that therfore a static domain is required but I want to show the value of the checkBox based on the described attribute, like the handling of the radio horizontal.
    But I don´t know how to implement this, if it is possible.
    I´m using JHeadstart v10.1.3.2 and I´m pleased about any reply or solution.
    Best regards
    Chris

    Chris,
    If you run the application module tester, and query the view object usage underlying your dynamic domain, how many rows does it return? It should return only two rows, one for CASH and one for CREDIT. If more than two rows are returned, your query is wrong.
    What is the problem with using a static domain for the checkbox?
    Steven Davelaar,
    JHeadstart Team.

  • Hiding buttons when printing and adjusting field to compensate

    Hi,
    I had a request for a form in which the Add a Row button and Delete Row button are hidden when printed to make it look a little nicer.  I was able to hide the buttons when printing, but the table that the delete is part of still looks odd and there is a larger space than I'd like to have between the tables once the add a row doesn't show.  Is there are a way to make things look nicer?  I've attached the demo of the form I'm working on a sample of what it looks like right now when I print.
    I did see a post about Hiding text field borders when printing and it sounded like I might need to do something similar, but I'm not quite sure what.
    Thanks!
    Image: https://acrobat.com/#d=HvU8V27oA*Ki6HzoI2Ec0w
    Form: https://acrobat.com/#d=1K*EfksEnAH0azzxTrx31w

    The easiest way to deal with the buttons down the side is to set the borders of those cells to none, then you don't have to worry about it - you will end up with a little extra space down the right side but the table will look finished when the buttons hide. This is how I do it, because the button takes the whole space of the cell I just don't put a border on it. Getting into hiding columns and shifting table size to fill the space is getting pretty tricky.
    To get the tables closer together when you print and hide the add row button, put the following script in the prePrint event of the button:
    this.presence = "hidden";
    And this script in the postPrint event:
    this.presence = "visible";
    Because the button is part of the flowed subform the table is in when you set its presence to hidden the subform will close the gap.

  • Regarding jsp and multiple buttons

    hii to all
    i hav one doubt
    i hav one black.jsp file in tat 3 buttons are there like first ,second ,third
    if i click first button it ll go to one jsp
    if i click second button it ll go to another jsp file like tat the third button
    the condition is black.jsp contains only one form tag
    how can i do this pls help me

    U can try something like this.. ..
    <%@page language="java" %>
    <html>
    <head>
    <script language="javascript">
    function FormSubmit(txt){
    if(txt==1)
    document.ButtonsForm.action='First.jsp'
    else if(txt==2)
    document.ButtonsForm.action='Second.jsp'
    else if(txt==3)
    document.ButtonsForm.action='Third.jsp'
    document.ButtonsForm.method='POST'
    document.ButtonsForm.submit()
    </script>
    </head>
    <body>
    <form name='ButtonsForm'>
    <input type='button' name='Fristbutton' value='Frist Button' onclick =FormSubmit(1)>
    <input type='button' name='Secondtbutton' value='Second Button' onclick =FormSubmit(2)>
    <input type='button' name='Thirdtbutton' value='Third Button' onclick =FormSubmit(3)>
    </form>
    </body>
    </html>

  • When to use jsp,and when to use servlet?

    I think that jsp and servlet can realize the same functions, because when run a jsp, it is transferred to a servlet program, so when to use jsp and when to use servlet?
    I am now developing the input interface for a website, I just use jsp and javabean to connect to weblogic and database, and I didn't use servlet, Is there any unseemliness?
    Thank you!

    IMHO I use servlets to control the flow between my jsp's based on a number of factors in a webapp. For instance, user authorization. If a user has the authorization to conduct various administrative functions on an application (like change user rights, reset passwords etc) they will have access to specific buttons or links on some screens that others will not. I use servlets to establish what access rights a user has and direct them to the appropriate pages. I also use servlets to test data validity on form input screens. I know that I can also do this with JavaScript but that can be disabled by the client and in order to prevent that I also double check the form input from a servlet. All my jsp's do is display the results of a business process (which is held in a JavaBean or EJB) and the servlets act as the controllers for the application, connecting to multiple databases, verifying application state, flow control etc. I try to keep the jsp as simple as possible as some of them are maintained by html developers who lack the necessary experience to write java code. I hope this helps.

  • Weblogic 10 jaas and login.jsp and web.xml/weblogic.xml security constaints

    Hello,
    I struggled through and got the examples.security.jaas.SampleCallbackHandler.java and examples.common.utils.ExampleUtils.java/ExampleConstants.java into eclipse where they compile. A bean I made can call SambleCallbackHandler like such:
    mybean.logmein(username,password,url). I can then do a mybean.getStatus() or even a mybean.returnCode(). It does seem to correctly identlify that it is authenticating me (I see in stdout logs that it shows success or failures. The problem I have is I do not know how to apply this weblogic and web.xml/weblogic.xml so that if authentication works it redirects me to the page requiring the authentication. In web.xml I have the following set up:
    <security-role>
         <role-name>Admins</role-name>
    </security-role>
    <login-config>
         <auth-method>FORM</auth-method>
         <realm-name>default</realm-name>
         <form-login-config>
              <form-login-page>/login.jsp</form-login-page>
              <form-error-page>/badlogin.html</form-error-page>
         </form-login-config>
    </login-config>
    <security-constraint>
         <web-resource-collection>
              <web-resource-name>empower</web-resource-name>
              <description>These pages are only accessible by authorized users.</description>
              <url-pattern>/admin/*</url-pattern>
              <http-method>GET</http-method>
              <http-method>POST</http-method>
         </web-resource-collection>
    <auth-constraint>
    <description>These are the roles who have access</description>
    <role-name>Administrators</role-name>
    </auth-constraint>
         <user-data-constraint>
         <description>This is how the user data must be transmitted</description>
         <transport-guarantee>NONE</transport-guarantee>
         </user-data-constraint>
    </security-constraint>
    My weblogic.xml has:
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
    <wls:security-role-assignment>
    <wls:role-name>Admins</wls:role-name>
    <wls:principal-name>Administrators</wls:principal-name>
    <wls:principal-name>dashap</wls:principal-name>
    </wls:security-role-assignment>
    </wls:weblogic-web-app>
    With this set up, if I try to go to a page in /admin folder in my application, it correctly pops up the login page. The jaas in the bean is doing a loginContext.login(), which I thought does authentication too, but it never goes back to the /admin page I was going to that needed the authentication. With jaas, can I not use the web.xml FORM security option? Do I Need to use j_security in the login.jsp's form's action= option and j_username and j_password for the input type names? How do I use j_username/j_password things if I am using jaas? I could just ignore using the web.xml security stuff and put something in the pages that need authentication, but it would be easier if I could use jaas with the security featurs without doing all that. Note that my code above is using a realm called default just because that was what was in the example I got from the web. Does that need to be something else?

    Hi John,
    I would like magic of course. However, in this case I want something special: my authentication provider uses special means and contents of headers, cookies and service from external identity management systems to determine the user's identity.
    I do not want the application to present the login dialog! I want to derive the identity and the fact that the user is logged in from whatever the authentication provider returns in terms of Subject.
    Ideally, the flow is something like:
    - user accesses an unprotected resource - resource is shown, no interaction with authentication provider
    - user presses a link or button that takes him/her to a protected resource
    - the authentication provider is contacted to work with the identity asserter to establish the identity of the current user and create a subject object for this user
    - the application can access the subject and principals
    - ADF Security recognizes the identity and the roles (based on the principals) and coordinates access based on this.
    the authentication method is client certificate. presumably this prompts WebLogic/OPS to use an identity asserter to work with custom headers and cookies ("... when you configure a web application to use CLIENT-CERT authentication. In this case, WebLogic can perform identity assertion based on values from request headers and cookies. If the header name or cookie name matches the active token type for the provider, the value is passed to the provider."). No login form should be presented to the user, as all information required to perform the authentication is already available.
    I am trying to understand what I must do to have the ADF application adopt the subject set by the authentication provider - if anything?!
    If you more ideas to share - I would love to hear them.
    best regards,
    Lucas

  • Serverlets, JSP and Java Web Start

    Hi As I have heard J2EE is used for serverlet's and JSP programming But JSP and Serverlet programming can be created and implemented using java web start which comes with J2SE what then is the difference between J2EE and J2SE

    Clarification:
    J2EE has an additional E in it, while J2SE as an additional S.
    Ok, now that we cleared that up, Lets see if I can answer your question.
    There is no magic button such as 'java web start' that will automatically generate computer code for you. You have to write java line by line and debug each and every line of code. A typical whole project may consist up up to 1500 functions (mine has over 12000). You read whole books on the subject as I discuss below and work through thier examples. Within about 2 or 3 years of hard study, you should be a pretty good programmer.
    Java is an object oriented language that you'll need to become familiar with that takes some practice to learn. Also, a java based web site consists of several technologies in addition to the java language that you'll need to be familiar with. Many programmers will read articles on the internet and pick up fragments of information on these various technologies and throw a web site together thats impossible to maintain and enhance. I think it would be better if you read whole books and experiment with the technologies. Consider it an at-come college course. Here is my suggested reading list read in roughly this order ( I suggest buying them one at a time via the internet (its cheaper) before moving onto the next book).
    "Thinking In Java" - Bruce Eckel
    HTML & XHTML: The Definitive Guide
    JavaServer Pages - Hans Bergsten
    Programming Jakarta Struts
    JavaScript: The Definitive Guide
    SAMs Teach Yourself SQL
    JDBC and Java
    Also, visit the Web Tools Platform (WTP) Project (www.eclipse.org/webtools) . Its a free Eclipse Java development tool that has the bulk of the java development IDE market (above even JBuilder).However, I suggest creating a few small java programs using the dos command line before you let this IDE do a lot of the work for you. You also might want to install some type of database (Oracle Lite, MySql, etc) on your computer so you have a database to play with (you'll need a computer with at least 2Gbytes of memory).

  • Problem with JSP and Java Servlet Web Application....

    Hi every body....
    I av developed a web based application with java (jsp and Java Servlets)....
    that was working fine on Lane and Local Host....
    But when i upload on internet with unix package my servlets and Java Beans are not working .....
    also not access database which i developed on My Sql....
    M using cpanel support on web server
    Plz gave me solution...
    Thanx looking forward Adnan

    You need to elaborate "not working" in developer's perspective instead of in user's perspective.

  • APEX_ITEM.TEXT and solution for enabling and dispabling a button

    Hi All,
    Please let me know how can we have a format mask for an Item created using apex_item.text.
    I would like to add a Number format mask with three decimals in this report column
    APEX_ITEM.TEXT (2, INV_VALUE, 15, 20, 'readonly=readonly style=""')
    Also do let me know the following points based on the followup to this link:
    Use of Checkbox in Report for calculation and determine checked records
    1. How can I enable or disable a button based on value of a Page Item being > 0, this also should be done when a check box is checked or unchecked.
    2. One more clarification about adding the total depending upon check box checked or unchecked.
    On checking and un-checking the total gets added and subtracted as required, but I have noticed that the the session values of the Item for Total is not as the one displayed. Why is it so. Please guide.
    Thanks & regards
    Arif Khadas

    Hi Vee,
    Thanks for the reply.
    document.getElementById(...)' is null or not an objectCheck if the button is rendered with id="PAY_DUES"+ or not. You can view the HTML source code of the button and see if it has such an id or not. The source code is as follows:
    <a href="javascript:popUp2('f?p=1002:23:3713834878987986::NO::P23_INVOICES,P23_RCP_AMOUNT_PAID:,0', 320, 450)" class="t20Button">Pay Dues</a>
    Else add an id attribute to the button in button attributes(ensure that you have the BUTTON_ATTRIBUTES substitution string used in the button template)Template of button is as follows and the Substitution String #BUTTON_ATTRIBUTES# is not Referenced.
    <a href="#LINK#" class="t20Button">#LABEL#</a>
    but I have noticed that the the session values of the Item for Total is not as the one displayedThe session value of the item is usually set when you submit the page or use an ajax process/ Dynamic Action to set it. If you this is required , set the item's session state calling a dummy/null ondemand process or a dummy PLSQL dynamic Action using the item name in the "List of items to Submit" field.This issue is resolved for me in other thread.
    Thanks & Regards
    Arif Khadas

  • Print, Export and Page Navigation Buttons in the Report

    When I view a report through CR4E, the generated report has 3 buttons namely Print, Export and Page Navigation buttons. But when I click on either of the buttons I get a &#39;null pointer exception&#39;. This is a critical error as I am unable to navigate past the first page. Do I have to add code to these buttons? If not, why am I getting an error? Kindly solve my problem as soon as possible.

    <p>Looking at your code it appears that you are storing the ReportSource in session prior to passing in the ResultSet. This will create a problem when a postback is made on  the viewer page (which all of the viewer actions do). If you look at the sample code which is generated when you use the JSP Page Wizard you will notice that the ResultSet is passed to the ReportClientDocument object prior to it being stored in session. Then, when the page is called again this object is retrieved and the ReportSource is used by the viewer. You can quickly run the test using one of our sample reports to see what I am talking about. The code below was generated using the Consolidated Balance Sheet.rpt and did not experience any problems doing any of the viewer actions.</p><%@page import="com.businessobjects.samples.JRCHelperSample,<br />com.crystaldecisions.report.web.viewer.CrystalReportViewer,<br />com.crystaldecisions.reports.sdk.ReportClientDocument,<br />com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,<br />com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,<br />com.crystaldecisions.sdk.occa.report.reportsource.IReportSource,<br />java.sql.Connection,<br />java.sql.DriverManager,<br />java.sql.ResultSet,<br />java.sql.SQLException,<br />java.sql.Statement"%><%<br /><br /><br />    try {<br /><br />        String reportName = "Sample Reports/Consolidated Balance Sheet.rpt";<br />        ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);<br /><br />        if (clientDoc == null) {<br /><br />            clientDoc = new ReportClientDocument();<br />            <br />            // Open report<br />            clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);<br /><br />  <br />            {<br />                // **** POPULATE MAIN REPORT ****<br />                {<br />                     // Connection Info for fetching the resultSet<br />                    String connectStr = "jdbc:derby:classpath:/Xtreme";<br />                    String driverName = "org.apache.derby.jdbc.EmbeddedDriver";<br />                    String userName = "dbuser";        // TODO: Fill in database user<br />                    String password = "dbpassword";    // TODO: Fill in valid password<br /><br />                    String query = "SELECT CUSTOMER_NAME FROM APP.CUSTOMER WHERE COUNTRY = &#39;Australia&#39;";<br /><br />                    <br />                    String tableAlias = "FINANCIALS";        // TODO: Change to correct table alias<br /><br />                     <br />                    JRCHelperSample.passResultSet(clientDoc, fetchResultSet(driverName, connectStr, userName, password, query),<br />                        tableAlias, "");<br />                }<br /><br /><br />            }<br />        <br />            // Store the report document in session<br />            session.setAttribute(reportName, clientDoc);<br /><br />        }<br /><br /><br />            {<br />                // Create the CrystalReportViewer object<br />                CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();<br /><br />                //    set the reportsource property of the viewer<br />                IReportSource reportSource = clientDoc.getReportSource();                <br />                crystalReportPageViewer.setReportSource(reportSource);<br /><br />                // set viewer attributes<br />                crystalReportPageViewer.setOwnPage(true);<br />                crystalReportPageViewer.setOwnForm(true);<br /><br />                // Process the report<br />                crystalReportPageViewer.processHttpRequest(request, response, application, null); <br /><br />            }<br />            <br /><br />    } catch (ReportSDKExceptionBase e) {<br />        out.println(e);<br />    } <br />    <br />%><%!<br />// Simple utility function for obtaining result sets that will be pushed into the report.  <br />// This is just standard querying of a Java result set and does NOT involve any <br />// Crystal JRC SDK functions. <br /><br />    private static ResultSet fetchResultSet(String driverName,<br />            String connectStr, String userName, String password, String query) throws SQLException, ClassNotFoundException {<br /><br />        //Load JDBC driver for the database that will be queried    <br />        Class.forName(driverName);<br /><br />        Connection connection = DriverManager.getConnection(connectStr, userName, password);<br />        Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);<br /><br />        //Execute query and return result sets<br />        return statement.executeQuery(query);<br /><br />}%><p>Try using the code generated from the wizard to see if it works for you as well. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p>

  • Communication between jsp and abstractportalcomponent

    Hello All
    Communication between jsp and abstractPortalComponent.
    jsp contains one input text field and one submit button.
    when the user clicks on submit button it will call the component and that input value will
    display in same jsp page.
    how this communication will happen?
    Rgrds
    Sri

    Hi Srikanth,
    In the JAVA File, 
    OnSubmit Event,
    String inputvalue ;
    InputField myInputField = (InputField) getComponentByName("Input_Field_ID");
    if (myInputField != null) {
                   inputvalue = myInputField.getValueAsDataType().toString();
    request.putValue("textvalue", inputvalue);
    request is IPORTALCOMPONENTREQUEST Object.
    In JSP File,   to retreive the value,
    <%
    String  textstring = (String) ComponentRequest.getValue("textvalue");
    %>
    In PORTALAPP.XML File,
    <component name="component name">
          <component-config>
            <property name="ClassName" value="classname"/>
            <property name="SafetyLevel" value="no_safety"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
    Using the code above, You can pass and read values between abstract portal component and Jsp Page.
    Instead of this, I suggest you to use JSPDYNPAGE Component for Data Exchange.
    Check the [Link|http://help.sap.com/saphelp_nw2004s/helpdata/de/ce/e0a341354ca309e10000000a155106/frameset.htm].
    Hope this helps you.
    Regards,
    Eben Joyson

Maybe you are looking for

  • Mapping dependencies between objects

    I'm querying a database to obtain information from 10 tables. The goal is to display the information on a JSF based portlet using a tree-view, where an user can use the tree interface to drill to desired level of detailed information. The interface m

  • Upgrading to Mountain Lion from Snow Leopard

    I have a mid 2010 MacBook Pro (OS X 10.6.8) 2.53 GHz Intel Core i5 with 4 GB of memory. This is the first Mac I have ever owned and I am wanting to upgrade to Mountain Lion but I am getting lost in all the information that is out there in regards to

  • HP Recovery Manager failed. Error code = FFFFFF9

    Hello I used the HP recovery manager to create a backup of my exisiting laptop onto an external hard drive because I selected the 'minimized image recovery option'. The laptop finished and now I am trying to restore the files. But when it gets to 96%

  • Increase in size due to upgrade?

    i've just upgraded latest install and have genuis installed - when i want to update my 160gb ipod I was told i had insufficient memory - over 24gb to be precise! I have not imstalled any more songs, only a few podasts - can someone please explain wha

  • Adding/Activating Fonts in Flash CS4

    Okay, so this is probably a really simple fix, but I recently upgraded to CS4 from CS2 and for some reason only a dozen or so fonts are showing up in my menu. In Flash 8 everything I had in Suitcase would show up. Any advice on how to remedy this? or