Form Authenticating the portal or jsp page

Before accessing a jsp page, I want the user to authenticate using login.jsp using the user role I created in console.
But when I hit the page, its not going to login.jsp. Instead its going directly to it. Please find the web.xml and weblogic.xml that I changed below,
--web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>webtest</web-resource-name>
<url-pattern>/portlets/tools/wnxinterface/wnxInterface.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>wnuser</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<!--turn on identity assertion-->
<login-config>
<auth-method>CLIENT-CERT,FORM</auth-method>
          <realm-name>myrealm</realm-name>
<form-login-config>
<form-login-page>login.jsp</form-login-page>
<form-error-page>error.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
          <role-name>AuthenticatedUserRole</role-name>
</security-role>
<security-role>
          <role-name>wnuser</role-name>
</security-role>
--weblogic.xml
<wls:security-role-assignment>
<wls:role-name>AuthenticatedUserRole</wls:role-name>
<wls:principal-name>AuthenticatedUsers</wls:principal-name>
</wls:security-role-assignment>
<wls:security-role-assignment>
     <wls:role-name>wnuser</wls:role-name>
     <wls:principal-name>wngroup</wls:principal-name>
</wls:security-role-assignment>
I created the wnuser in myrealm in my console. So I am trying to password protect the wnxInterface.jsp page.
Actually I have this wnxInterface.jsp as a portlet inside my portal. Is it similarly possible to authenticate the portal itself?
Thanks in advance

1. yes: URL u = new URL(this.getCodeBase(),"../relativeFolder/file.whatever");
http://javaalmanac.com/cgi-bin/search/find.pl?words=URL
2. yes: using JSObject you can call javaScript methods that can do it for you or retreive the
componenet directly.
http://forum.java.sun.com/thread.jspa?threadID=598123&messageID=3180053

Similar Messages

  • Javascript error throws the portal theme configuration page

    General Description: Javascript error and jump to the portal theme
    configuration page
    EP: NW04s SP12 including KMC
    We have a problem when we entry to the portal, a javascript
    error happens and immediately jumps to the portal theme configuration
    page. We entry at the portal with a user that have assigned the next groups.
    LR_Administrador LR_Administrador Base de datos UME
    Everyone Built-in Group Everyone Adaptador de grupo integrado
    Authenticated Users Built-in Group Authenticated Users Adaptador de
    grupo integrado
    The group LR_Administrador have assigned this role
    Nombre unívoco:
    pcd:portal_content/kof.com.mx.EP6_FLD_KOF/kof.com.mx.FLD_MX_LR/kof.com.mx.FLD_MX_LR_Roles/kof.com.mx.LR_MX_ROL_Administrador
    Nombre de visualización: kof.com.mx.LR_MX_ROL_Administrador
    Ubicación:
    pcd:portal_content/kof.com.mx.EP6_FLD_KOF/kof.com.mx.FLD_MX_LR/kof.com.mx.FLD_MX_LR_Roles
    Descripción: Libro Rojo
    ID unívoco: ROLE.PCD_ROLE_PERSISTENCE.38yt+Psq/fFQuE3Uxdt52Azfdpg=
    The role LR_MX_ROL_Administrador, have assigned only one page called:
    LR_MX_PAG_Edicion
    This page contains a KM Navigation iview.
    When we entry with this user, the browser show us this javascript error:
    Linea: 107
    Car: 116
    Error: 'children' es nulo o no es un objeto
    Codigo: 0
    URL: http://fedbdvep:50000/irj/portal
    And immediately show the portal theme configuration page.
    We need that the user see the page assigned, but this error shows him
    always the portal theme configuration page. This kind of error happens with
    other roles too. We've found a workaround
    for this situation, doing click on the first level navigation, the
    LR_MX_PAG_Edicion page shows normally.
    Thank for any help.
    Regards
    Jose

    Thanks for your update, we have resolved the issue with this help. Very thankfull.
    regards,
    kishore

  • How to enable the EL in jsp page

    hi can u tell 'how to enable the EL in jsp page'?

    *I am getting below exception in tomcat when i inclued +<%@ page isScriptingEnabled="true" isELEnabled="true"%>+*
    org.apache.jasper.JasperException: /index.jsp(1,1) Page directive has invalid attribute: isScriptingEnabled
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
         org.apache.jasper.compiler.JspUtil.checkAttributes(JspUtil.java:311)
         org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:106)
         org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
         org.apache.jasper.compiler.Validator.validate(Validator.java:1700)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • How to Hightlight the Data in Jsp Page

    How to Hightlight the Data in Jsp Page,
    I am doing doing search page,based on values given search page those are sent to servlet,in servlet based on some conditions if particuler id i am getting then i am redirecting to Respective jsp page with highlight the data from database..
    Thanks in advance...

    "Highlighting data in JSP sounds strange".
    Without looking at your search specific algorithms I feel you are finally going to display a page (HTML content) to user which contains highlighted text. Highlighting is not directly related to server side language you use (JSP, ASP, PHP etc.). This is purely HTML and CSS. However, server side script (such as JSP) should generate HTML content for getting highlight effect.
    Following HTML shows highlighted text using background-color property on span element.
    <html>
      <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
      </head>
      <body>
          <p style="font-size:1.1em">This is a long paragraph which contains <span style="background-color: yellow;">highlighted text</span> and non highlighted text.</p>
      </body>
    </html>Thanks,
    Mrityunjoy
    Edited by: mrityunjoy on 14 Jun, 2010 3:30 AM

  • How to halt the execution of JSP page..

    Hello all,
    I want to halt the execution of JSP page suppose for 10 seconds
    can anyone tell me how to do this
    Thanks
    Uttam

    ok
    thanks
    but this code will refresh the page after every 10 seconds.
    what i want that when click on a button on a page it will wait for 10 seconds
    then it should get refreshed only once i mean whenever i click on button
    not in ever 10 seconds
    thanks
    Uttam

  • How to Generate a complex smart form for the Sales Order different pages h

    How to Generate a complex smart form for the Sales Order different pages has different page Layouts  explain me?

    in print program in interface when calling the form there should be some option to tell it to make a NEW spool everytime.
    I have it in mind for sap-script it is ITCPO-TDNEWID. Dont have it in mind for SAMRTFORMS but still it should work somehow similar.

  • How to process the HTMLs or JSP pages?

    Hi all. my program need to process the HTML or JSP pages. But they are different from the XML. When I use SAXParser or something like that to process the HTML, Exception will always occur. Especially for processing the element "<% .... %>". So can anyone teach me the way to processing the HTML or JSP pages?

    These are from a Page Layout document. If you are using Word Processing, the button is called Sections instead of Pages but has the same icon.

  • How to declare value null to object at the end of jsp page.

    Hi
    I have two doubts.
    1. Im getting request from request.getParameter() method. i stored that value in one object. after process completion i have set null value to object at the end of jsp page.
    2. I declare jsp scriptlet within the javascript. in that jsp scriptlet i set session.setAttribute() values. i want to get the session.getAttribute value after javascript code completion.
    i tried but i got jasperException.
    please help me to solve this problem
    Thank u in advance

    Hai Sundaram,
    when ever u got the param from request at that time only u set the same parameter to null..
    i am not sure abt this is my idea only

  • HTML multipart form is not working in jsp page

    Hi
    i have jsp page, has a HTML from with file upload field , when i click the send button , nothing happened as if the button did not submit the form. ie the message at line 12 is not printed out.
    can any one help please.
    <%@ page errorPage="..\error\error.jsp" %>
    <%@ page pageEncoding="windows-1256" %>
    <%@ page language="java" import="javazoom.upload.*,java.util.*,java.sql.ResultSet" %>
    <jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
      <jsp:setProperty name="upBean" property="folderstore" value="<%=request.getRealPath("thuraya//uploads")%>"  />
    </jsp:useBean>
    <jsp:useBean id="dbc" class="mypackage.DBConnection" scope="session" />
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.println("addbtn");
            //do upload file + insert in database
             if (MultipartFormDataRequest.isMultipartFormData(request))
             // Uses MultipartFormDataRequest to parse the HTTP request.
             MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
             String todo = null;
             if (mrequest != null) todo = mrequest.getParameter("todo");
                 if ( (todo != null) && (todo.equalsIgnoreCase("upload")) )
                    Hashtable files = mrequest.getFiles();
                    if ( (files != null) && (!files.isEmpty()) )
                        UploadFile file = (UploadFile) files.get("filename");
                        if (file != null)
                                            out.println("<li>Form field : uploadfile"+"<BR> Uploaded file : "+file.getFileName()+" ("+file.getFileSize()+" bytes)"+"<BR> Content Type : "+file.getContentType());
                                            String fileName=file.getFileName();
                                            String ran=System.currentTimeMillis()+"";
                                            String ext=fileName.substring(   ( fileName.length()-4),fileName.length() );
                                            file.setFileName(ran+ext);
                        // Uses the bean now to store specified by jsp:setProperty at the top.
                        upBean.store(mrequest, "filename");
                                            String title=request.getParameter("title");
                                            String content=request.getParameter("elm1");
                                            int x=dbc.addNews(title,content,file.getFileName(),2,1);
                                            if(x==1)
                                                     out.print("New Vedio has been addedd Successfully");
                                                      response.setHeader("Refresh","1;URL=uploadVedio.jsp");
                                                     else{
                                                      out.print("An Error Occured while adding new Vedio");
                                                      response.setHeader("Refresh","1;URL=uploadVedio.jsp");
                    else
                      out.println("<li>No uploaded files");
             else out.println("<BR> todo="+todo);
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input onClick="submit()" name="addBTN" type="button" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

    the problem is not because of java code insdie jsp page
    I have removed all things but the form and it is still not working
    here is the modified code:
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.print("addBTN");
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input name="addBTN" type="submit" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

  • Problem with a form in the portal.

    Hi Masters,
    I'm getting this error in the portal when I'm executing a form. I'm the basis here but I need a hand because I can't find the solution to this. Thanks for the help!
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Error during call to AdobeDocumentServer: Processing exception during a "Render" operation. Request start time: Tue Jul 24 11:12:58 VET 2007 com.adobe.ProcessingError: Invalid XDP error while configuring the XMLForm module. Please validate the form template and try again: com.adobe.document.xmlform.InvalidXDPException: IDL:com/adobe/document/xmlform/InvalidXDPException:1.0 Exception Stack Trace: com.adobe.ProcessingError: Invalid XDP error while configuring the XMLForm module. Please validate the form template and try again: com.adobe.document.xmlform.InvalidXDPException: IDL:com/adobe/document/xmlform/InvalidXDPException:1.0 at com.adobe.Render.execute(Unknown Source) at com.adobe.BaseADSRequest.doWork(Unknown Source) at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source) at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source) at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source) at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0.java:120) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126) at

    Sounds like a problem with the privileges.
    Try creating a new user, say user_temp, and grant the user Manage privilege to All Portal DB Providers and Manage to All Schemas.
    Try creating a form after logging in as user_temp.
    The minimum privileges required to create a Portal DB provider component is Create privilege on the Portal DB Providers and Manage on the Portal DB Provider schema.

  • XML Forms on the Portal posting to an IDOC

    Scenario
    Goals
    1. Portal Based XML form being used by users to enter information
    2. Posting to an IDOC in R3
    Current Solution
    1. The XML form outputs a file to local file system through the EP
    2. XI then takes this file transforms
    3. XI Posts IDOC
    Question .
    Is there more elegant solution, making use of the file system to transfer files between system strikes me as "ugly". How would I configure the XML form to post directly to XI via a webservice call etc..., I understand how to make the service available in XI, Im just not sure how to make the EP post the XML XI so It can then post the IDOC ?
    Notes.
    1. The XML form has been developed using the Form builder in the Portal
    2. Both the Portal and XI are on NW6 at this stage.
    thanks

    Since researching a little I have discovered the idea of posting an XML form to an IDOC is flawed. So the desired archiecture is now, a form of some sort that can be visually appealing like an XML form that can post directly to an RFC in ECC.
    Enterprise Portal Form -
    > ECC (RFC)
    I have protyped this interaction with Guided Procedures in NW7 and it seems to work but the form presentation is still a mystery.
    How can I have complete control over the presentation of a form in GP to send the data into SAP, or is the visual composer a better solution ?

  • Selecting the Folders in JSP page??

    Hello
    Iam developing a e mail application.I have written some beans to render the directories and files of file system. Now I want to select a particular folder(directory) in the JSP page, so that I can rename it, delete it or move it to another place.How can I select a particular folder and how can I delegate this information to another page.
    I tried generating "radio" buttons for each folder.But since the contents of file system will be dynamically changing, I was not able to track the selected directory.
    Please help me in this regard.Is there any "Html-Only " solution to this.Or we have to use"JavaScript" to acieve this???Any taglibraries??Any JavaBeans??
    waiting for your generous replies.
    regards

    I think this you can do using JavaScript only. Because one of my friend involved development of document management. That also your sort of application. He use to told me that he used Javascript for creating directoried, swaping files, deleting files etc...
    Try in that way.. all the best

  • How to set the default login jsp page?

    i have written a jsp page called Login.jsp. i want it to be the default jsp page when i type the url "http://localhost:8080" , instead of the index.html of tomcat . how to make it ?

    It's in web.xml, eg. :
    <web-app>
      <welcome-file-list>
        <welcome-file>Login.jsp</welcome-file>
      </welcome-file-list>
    </web-app>

  • Is it possible for Backing Bean to drive  the rendering of  JSP page ?

    Any thoughts on this ......
    "Backing Beans should drive the rendering of first jsp page in the application " and not jsp page driving the backing bean or not to put some kind of hard coding in jsp page to see if its admin user then display certain set of UI Components or certain set of other UI components for other users.
    As we have atleast 10 different Roles and there can be Composite Roles i.e. combination of two roles. In this case how does the Backing Bean drives the rendering just the first jsp page in the application?
    Regards
    Bansi

    You can connect to it with file sharing, but you won't be able to use it as an installation source. In other words, you won't be able to reboot the G4 and see that drive over the network to boot from it.
    If your G4's optical drive is consistently problematic, you could replace it quite easily and cheaply (if it's a desktop), or you might look at external optical drives.
    Matt

  • Checking Form Modes in a single jsp page

    Hi
    I am developing a web application using ADF BC, struts and JSP technologies.
    I use JDeveloper 10.1.3. I need to check the mode which my form goes through; for example, if I am in the create mode, I can disable Delete and Find buttons
    and etc..Is there any code or property that would let me check the Foem Modes and act correspondingly??
    Message was edited by:
    Tami

    the only way would be to change the header and navigation includes that you have, so that they generate a correct html page when included.
    I would probably remove the head tag from the navigation stuff.
    Although javascript functions SHOULD be declared in the head tags, they normally do work elsewhere on the page.
    The page will probably still take a long time to load, even if you get the page formatted correctly - I would look more at the javascript functions running which would slow down the page.

Maybe you are looking for

  • Change table in new debuger

    hallow i wont to change  the name of table (in qa) that i do select in new debugger how i can do that? Regards

  • Urgent : TimeOut/DeadLock issue with DB Adapter

    Hi, I have a DB adapter that executes a Proc in Sybase.[The proc takes 5-10 minutes based on the load] There is another DB adapter after this which fetches the data from DB based on the completion of previous proc. This Bpel is called from another Bp

  • MSI R9 280x fan failure

    Hi! I have 2 MSI R9 in crossfire I can see 3 out of 4 fans... are dying.. 2 stops.. and I have to manually start spinning them by hand and 1 other is really wobbly! is it possible to send me replacement fans so I can replace them myself?

  • What is my license key # ????

    What is my license key #.  I cannot open pdf documents withour it????

  • Two PR Number Range at single plant

    Hi, Actually we are running MRP, and we want Two type of number range of Purchase Requisition at single plant. Pls advice it's feasible or not. Thanx Paramjeet.