How to get credentials (password) in a jsp

Hi
Our application is launched as a jsp which has an applet communicating
with a rmi server. The jsp page is served as an WAR. The server
requires the password and the user name. For this we used the
statements
<PARAM NAME="userName" VALUE="<%= request.getRemoteUser() %>">
<PARAM NAME="password" VALUE="<%= ( (weblogic.security.acl.User)
request.getUserPrincipal() ).getCredential( request.getUserPrincipal()
) %>">
in our jsp. The second line always returns a blank string (something
is null).
Do we have to setup something in the weblogic properties to enable it
or should do somethig different in the code.
thanks in advance
suren

Hi Suren!
Suren schrieb:
Hi
Our application is launched as a jsp which has an applet communicating
with a rmi server. The jsp page is served as an WAR. The server
requires the password and the user name. For this we used the
statements
<PARAM NAME="userName" VALUE="<%= request.getRemoteUser() %>">
<PARAM NAME="password" VALUE="<%= ( (weblogic.security.acl.User)
request.getUserPrincipal() ).getCredential( request.getUserPrincipal()
) %>">
in our jsp. The second line always returns a blank string (something
is null).I've got this problem too. You can solve this by implementing a realm, that overwrites
the getCridential method and returns the password. I'm using an RDBMS realm and it
works fine.
Best regards,
Przemek

Similar Messages

  • How to get oc4jadmin password

    Hi,
    I forget oc4jadmin password. How to get oc4jadmin password ? Is there any file where I can look? How to change oc4jadmin password without effecting application?
    Please advice.

    you change oc4jadmin password in EM Console
    Oc4j_soa > Security Providers > Instance Level Security > Realms > Click oc4jadmin and modify password and Return to the Cluster Topology page and restart the OC4J instance.
    you can also change through system--jazn-data.xml and restart oc4j
    <user>
    <name>oc4jadmin</name>
    <display-name>OC4J Administrator</display-name>
    <guid>41A2E560C96711DABFD08D3BF8B780C4</guid>
    <description>OC4J Administrator</description>
    <credentials>{903}4nlfYYDwaqMJipVbGXuS2ce8egfwBPqp</credentials>
    </user>
    Modify credentials to say welcome123.
    <credentials>!welcome123</credentials>
    Regards,
    Deepa

  • How to get the password of a password protected Excel Sheet using java/jxl

    Hi ,
    how to get the password of a password protected Excel Sheet using java / jxl program.
    plz any one help me .
    Ramesh P
    [email protected]

    If they've implemented the password system correctly there probably isn't a way of getting the password at all.

  • How to get HTML form values in JSP

    retrieve<BR><BR>
    retrieveServicer<BR><BR>
    There are 2 links on a HTML page,code is in HTML page is above. I want to differentiate those two links at run time? Like which link the user has clicked, Is it possible I can do it request.getParameter() method, if so what is the syntax in HTML page and how to get it in JSP page.
    Could you please tell the answer? If anyone knows, Thanks,
    Nivas

    Hi!
    Your question is rather ambigouse!
    I guess you can use some javascript code like this!
    retrieve<BR><BR>
    retrieveServicer<BR><BR>
    <script language="javascript" >
    function a(){
    // you can change any form valuese here submit any form
    function b(){
    // you can change any form valuese here submit any form
    </script>
    If it's not your solution ,please describe you question
    in detail.
    Bye

  • How to get "clear passwords" on WGM

    When adding a user or editing an existing one, there is the problem that password fields (accounts section, tab "general") just show points (*) instead of the real password.
    I find this annoying, since there is definitively nobody that looks over my shoulder when I work in WGM
    It just forces me to keep a database with all my users' passwords in the case they have forgot theirs and just want to get remembered to the old ones.
    Is there a way (maybe a manually done setting in a *.plist file or anything else) to get readable password fields ?

    But let me say that is absolutely pointless to be paranoid about cgi's/scripts/
    whatever on one side and on the other side have a relaxed password "policy".
    You read my other thread, thanks (if you can provide me some tips, please do so there).
    Well, in the case a user's password is spread, the worst thing that could happen is someone unauthorized reads the user's e-mails and modifies his/her website (my users do not have access to any other service). Although this would be worst enough for the user, it doesn't hurt the server itself (don't know if system integrity would be the matching term, but let's use it).
    I agree fully to you that a password should not last too long... ideally the user could change its password without my assistance from time to time. But this seems not to be possible (you or someone else directed me to a plugin for WebMail/SquirrelMail that can be used to alter passwords from user's side, but I feared to install it so far since I know too less about SquirrelMail and how to bug-fix it in case of problems).
    But since I'm the only person that access my computer, the passwords are stored secure enough. Furthermore the fact that WGM replaces typed in chars to "*" for passwords doesn't make them secure. It just hides them when someone looks over my shoulder.
    Anyway, thank you for sharing your thoughts. If you can tell me how to make passwords visible in WGM, please don't hesitate and let me know. I will not take you responsible in case of stolen passwords. Promised

  • How to get iStore template name from jsp filename?

    Hi,
    We have implemented Oracle iStore R12.
    We have a requirement where we want to get template access name based on jsp file name. e.g. If jsp is ibeCCkdBHdrShip.jsp it should return STORE_CHKOUT_B2B_SHIP_HEADER.
    Is there any java API available for the same?
    We know we can get jsp filename from template access name as follows:
    String jspFilename = DisplayManager.getTemplate("STORE_CHKOUT_B2B_SHIP_HEADER").getFileName()
    However our requirement is other way round..getting access name based on jsp filename.
    Any prompt help/suggestion in this regard is appreciated.
    Thanks,
    Vivek

    Hi Vivek,
                            how about the query? can you use the query in your code ? If yes please use the query below.
    SELECT distinct I.ACCESS_NAME,
    A.FILE_NAME,i.description,I.Item_Name
      FROM JTF.JTF_AMV_ATTACHMENTS A,
      APPS.JTF_AMV_ITEMS_VL I,
      IBE.IBE_DSP_LGL_PHYS_MAP M,
      IBE.IBE_MSITES_TL S
      WHERE
      A.ATTACHMENT_ID = M.ATTACHMENT_ID
      AND I.ITEM_ID = M.ITEM_ID
      AND M.MSITE_ID = S.MSITE_ID
      AND A.File_Name like 'ibeCCtdStBlSuStI.jsp'
      Order by A.File_Name
    Thanks
    Shahzad Qamer

  • How to get price in basket.inc.jsp

    Hi All,
    Could someone let me know if I can get the Gross Value (Total price) in basket.inc.jsp
    When I tried to display the value of price in this jsp I get 0 GBP because
    SalesDocument instance (salesDoc ) which is available in basket.inc.jsp is giving false value for below Boolean fields.
         boolean isTaxValueAvailable = salesDoc.isTaxValueAvailable();
         boolean isNetValueAvailable = salesDoc.isNetValueAvailable();
         boolean isGrossValueAvailable = salesDoc.isGrossValueAvailable();
    Also item.getGrossValue() gives 0 price.
    The reason is the at this stage, in SalesDocumentthe Gross Value is not available.
    Is there any way to get the price at this stage itself?
    I am currently able to get the price in checkout.inc.jsp this is the next file which gets displayed after basket.inc.jsp.
    Thanks
    Neha

    Hi Shanto
    We are using JAVA basket.
    There is absolutely no errors in Pricing.
    We are getting price in checkout.inc.jsp which is next screen to basket.inc.jsp
    The reason is, when program control comes to basket.inc.jsp, the price is not yet calculated due to the reason I think SD_SALESDOCUMENT_CREATE RFC is not yet called,
    Thatu2019s the reason, the methods in basket.inc.jsp which return price is this screen, give 0 price as the values are not yet set.
    It has been this way since beginning, also we checked in Sapu2019s standard code as well, basket.inc.jsp shows 0 price due to the fact, price values arenu2019t set yet.
    Now the scenario, we have new requirement to get the price value in basket.inc.jsp itself.
    Do you have any idea how this can be achieved.
    Thanks
    Neha

  • I need to know how to get my password for when i want to download apps, i totally forgot it.. How do i get it back !?

    okay so i bought this ipod from a pawn shop
    && the person crap is still on here . && when
    i go to the App store on the ipod a thing pops
    up && says
    Apple ID Password
    && it says her email
    && Then there is a place for her password..
    I have no idea how to get her crap off of My new
    ipod.. :/ Help Me Someone !!!

    You do not have the legal right to use the last owners content, nor is it legal for you to hack her account by getting her password.
    You need to erase the ipod and pout your content on it.
    iPod touch User Guide (For iOS 4.3 Software)

  • How to get administration password

    Please advice how to get administrator password

    With 10.4, 10.5 or 10.6 put your install DVD into the optical drive (CD/DVD drive) and reboot. Be sure to either use the disc that came with your Mac, or, if you installed a later Mac OS X version from disc, use the newer disc. As soon as you hear the boot chime, hold down the "c" key on your keyboard (or the Option Key until the Install Disk shows up) until the apple shows up. That will force your MacBook to boot from the install DVD in the optical drive.
    When it does start up, you'll see a panel asking you to choose your language. Choose your language and press the Return key on your keyboard once. It will then present you with an Installation window. Completely ignore this window and click on Utilities in the top menu and scroll down to Reset Password. After resetting the password use Startup Disk from the same menu to choose your hard drive for startup and restart.
    With 10.4, 10.5 or 10.6 if you don’t have an install disk check this article. http://www.macyourself.com/2009/08/03/how-to-reset-your-mac-os-x-password-withou t-an-installer-disc/
    If you're running 10.7 Lion check this article
    http://osxdaily.com/2011/08/24/reset-mac-os-x-10-7-lion-password/
    With 10.8 restart holding the Command and R keys, then from the drop down
    of actions, choose Terminal.  When Terminal opens type:
    resetpassword
    and press enter.
    You will get a reset password window from which you can select the user you want to reset, the admin account in your case.  Type a new password twice, do not do anything with the hint box.  Click Save, then confirm you want to do this reset.  Then click apply to the user's home directory, and click the apple in the left corner, and choose Restart.

  • HT1766 need a paassword to restore from a 4 to 5 how do get forgotten password

    need a paassword to restore from a 4 to 5 how do get forgotten password

    bobbiejo2112 wrote:
    where should they be?
    "In Outlook (Windows) or Contacts (Mac)"

  • How to Get Portlet Namespace in a JSP attribute

    Hi All,
    The id of any component in a JSF application (with JSR168 portlets) takes the form
    'view'+'<portlet:namespace/>'+':'+'formname:componentidname';
    I need this id to be used for certain validations.
    Currently I am using it as below :-
    <h:intputText required="#{ ! empty param['viewns_7_CGAH47L000NAF0I04I42ND10P7_:form:login']}"/>
    Presently I have hardcoded the portlet namespace 'ns_7_CGAH47L000NAF0I04I42ND10P7_' by looking into the html source of the rendered page.
    Is there any way by which i can automatically get this portlet namespace within the param tag in the jsp.
    I know for a fact that within javascript tags, it can be used as <portlet:namespace/> as shown below :-
    <script type="text/javascript">
    function doSomething()
    buttonId= 'view' + '<portlet:namespace/>'+':'+'formName:buttonId';
    document.getElementById(buttonId).disabled = true;
    </script>
    Kindly treat this on high priority.
    Thanks and Regards,
    Darshan Shroff

    Perhaps so.
    I need to use it within param as below
    <h:inputText value="#{bean.userid}"
    required="#{!empty param['viewns_7_CGAH47L00GLRE0I0BCOUKS00I5_:form:login']}" />
    Here 'viewns_7_CGAH47L00GLRE0I0BCOUKS00I5_:form:login' is actually
    'view' + '<portlet:namespace/>'+':'+'formName:buttonId';
    I am just trying to check the presence of the client ID in the request paramameter map inorder to attain action dependent requiredness.
    Kindly tell me how i could access it within param.
    Thanks & Regards,
    Darshan Shroff

  • How to get the value in one JSP page to another?

    Hi,
    I have problems in passing the value around in JSP. I have two JSP pages as below:
    test1.jsp
    I try to get the vaule from my textbox by using:
    String strUser = request.getParameter ("strUserName");
    Then i print out by using: out.print(strUser); then i can get the value and put on my page (For example, i get ABC on my page).
    test2.jsp
    Next, i want to get the value from strUser (which mean that the one i already display on page in test1.jsp, ABC) to insert into my table by using INSERT INTO statement. Then i try by using
    String strUser1 = request.getParameter ("strUser");
    Is it possbile for me to do that? I cannot get anything to insert into my table. Then i tried out.print(strUser1); then i found that i get NULL value.
    Could you please give me some guidance?
    Thanks you very much for any advise you may give me.
    Kimsan

    Hi,
    Thank you very much for your help. It's working fine if i just get a one value to another page, however, i have problem while i pass the value in my loop to another page because i always get the last record. I try with the following code:
    logged_page.jsp
    <html>
    <head>
    <title>Welcome to the online Auction...</title></head>
    <body>
    <%@ page language ="java" import = "java.io.*, java.lang.*, java.sql.*" %>
    <% try
         String strUsername = request.getParameter("username");
         session.setAttribute("myUserName", strUsername);     
         String strPassword = request.getParameter("password");
         Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection myConn = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=C:/Auction/Auction.mdb");
         String strSQL = "SELECT [UserName], [Password] FROM tblUserDetails where [UserName] = ? and [Password] = ?";
         PreparedStatement statement = myConn.prepareStatement(strSQL);
         statement.setString(1, strUsername);
         statement.setString(2, strPassword);
         ResultSet myResult = statement.executeQuery();
         if(myResult.next())
         //out.println("Login Succesful! A record with the given user name and password exists");
         out.print("<center><h1>");
         out.print("Welcome  ");
         out.print(strUsername);
         out.print("</h1></center>");
         out.print("<center>");
         out.print("<BR><BR>");
         out.print("<font font face = Viner Hand ITC size= 5>Products on sales</font>");
         out.print("<BR><BR>");
         Statement myStatement = myConn.createStatement ();
         ResultSet myResult1 = myStatement.executeQuery("SELECT * FROM tblProduct");
         ResultSetMetaData myResultSet = myResult1.getMetaData();
         out.println("<font face=Tahoma>");
         out.print("<table border=1 CELLSPACING=0>");
         out.print("<TR>");
         out.print("<TD width = 200> Item Title");out.print("</TD>");
         out.print("<TD width = 200> Description");out.print("</TD>");
         out.print("<TD width = 200> Current bid");out.print("</TD>");
         out.print("<TD width = 200> Available Time");out.print("</TD>");
         out.print("<TD width = 200> Place Bid");out.print("</TD>");
         out.print("</TR>");
         out.print("</table>");
         while(myResult1.next())
              String strProName = myResult1.getString(1);
              session.setAttribute("myProName", strProName);          
              out.print("<table border=1 CELLSPACING=0>");
              out.print("<TR>");
              out.print("<TD width = 200>");
              out.println(strProName);
              out.print("</TD>");
              out.print("<TD width = 200>");
              out.println(myResult1.getString(3));
              out.print("</TD>");
              out.print("<TD width = 200>");
              out.println(myResult1.getString(2));
              out.print("</TD>");
              out.print("<TD width = 200>");
              out.println(myResult1.getString(4));
         out.print("</TD>");
         out.print("<TD>");
              out.print("<form action=bid_page.jsp method=post>");
              out.print("<input type=text name=place_bid>");
              out.print("<input type=submit name=okfunc value=Bid>");
              out.print("</TD>");
              out.print("</form>");
              out.print("</TR>");
              out.print("</table>");
              out.println("</font>");
              out.print("</center>");          
         else
              out.print("<center>");
              out.print("Sorry ");
              out.print("<font color = RED size = 5>");
              out.print(strUsername);
              out.print("</font>");
              out.print(" could not be found.");
              out.print("</center>");
         myResult.close();
         statement.close();
         myConn.close();
         catch(SQLException e)
         out.println(e);
    %>
    </body>
    </html>
    bid_page.jsp
    <HTML>
    <HEAD>
    <TITLE>Welcome to the online Auction...</TITLE>
    </HEAD>
    <BODY>
    <%@ page language ="java" import = "java.io.*" import = "java.lang.*" import = "java.sql.*" %>
    <% try
         String thisUserName = (String) session.getAttribute("myUserName");
         String thisProName = (String) session.getAttribute("myProName");
              Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection myConn = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=C:/Auction/Auction.mdb");
         PreparedStatement myStatement = myConn.prepareStatement("INSERT INTO tblHistory VALUES ('"+thisUserName+"', '"+thisProName+"', '"+request.getParameter("place_bid")+"')");
              myStatement.executeUpdate();
              myConn.commit();
              myStatement.close();
              myConn.close();
              catch(Exception e){}
    %>
    </BODY>
    </HTML>
    When i click on the BID button in the logged_page.jsp then i always get the last record and save into my table and that is not what i want to. i want to get the result on the same row as the BID button that just click and save to my table.
    Could you please advise?
    Thanks you very much for your time and any consideration you may give me.
    Best Regard,
    Kimsan

  • How to get SSO username in a JSP

    Hi,
    How can i get the value for SSO username in my JSP which is being called after the Single Sign On is done. Can anyone help on this?
    Thanks in advance
    Unmesh

    Unmesh --
    I think (albeit I've never tried) that you might be able to get it from the HttpServletRequest using something like:
    User is <%=request.getUserPrincipal().getName()%>[b/]
    The request.getUserPrincipal returns a java.security.UserPrincipal object, which should be populated with the name of the authenticated user.
    Can you see if that works?
    cheers
    -steve-

  • How to get variable from javascript to jsp

    Hi,
    I put a JSP page but in one frame it has a JAVAScript running. The Javascript is a viewer that user can input bounding coordinate and see updated results. Once user input the bounding coordinate in the javascript, I would like to make
    that variable available to the entire JSP, so I can submit all query (include the parameter user input in the JSP form) from jsp at a time. How to do this?
    Thanks
    Kenny

    Hi,
    Okey here is the code. There are three frames.
    1. KennyFrame.htm
    2. MapFrame.htm
    3. kenny.jsp
    Once you run the "KennyFrame.htm" it will show a page
    with two top-bottom frames. The top is
    "MapFrame.htm".
    The bottom is "kenny.jsp"
    Once user input something on MapFrame.htm, it will do
    a process in Javascript then update the "new answer".
    I will need to put that "new answer" into the "What's
    mapFrame Input? " Text box. Therefore, when user click
    on submit on kenny.jsp frame. The "new answer" will be
    submitted.
    Code:
    MapFrame.htm (the main page)
    <body bgcolor="#FFFFFF" text="#000000">
    Newmapframe
    <center>
    <form name=form>
    <input type=text name=box value="type in here!">
    <input type=button value="Convert"
    onClick="javascript:changeCase(this.form.box)">
    </form>
    </center>
    </body>
    </html>
    MapFrame.htm (the code with javascript on top frame)
    <html>
    <head>
    <title>Map Frame Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function changeCase(frmObj) {
    var tmpStr;
    tmpStr = "Some answer!";
    frmObj.value = tmpStr;
    // End -->
    </script>
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    Newmapframe
    <center>
    <form name=form>
    <input type=text name=box value="type in here!">
    <input type=button value="Convert"
    onClick="javascript:changeCase(this.form.box)">
    </form>
    </center>
    </body>
    </html>
    kenny.jsp (jsp on bottom frame for final submit)
    <html>
    <head><title>Number Test</title></head>
    <body bgcolor="white">
    <font size=4>
    <form method=get>
    What's mapFrame Input? <input type=text name=guess>
    <input type=submit value="Submit">
    </form>
    </font>
    </body>
    </html>
    let us the say the name of the frame in which kenny.jsp is placed be 'kennyframe' and u change the javascript function 'changeCase()' in MapFrame.htm to below:
    function changeCase(frmObj)
    var tmpStr;
    tmpStr = "Some answer!";
    frmObj.value = tmpStr;
    parent.frames["kennyframe"].document.form.guess.value = frmObj.value;

  • How to get a Value of a JSP field/Attribute?

    Hi im trying to get a value of a field from the EditCurrentRecord databeans. Im trying get the Value of the Attribute "Mdepempno", which will be used as a search field in the next customized webBean.
    Any suggestion? Thanks
    Muraly
    -- here is a portion of the code----
    RowEditor.useEditField("Mdepempno");
    RowEditor.getFieldRenderer("Mdepempno").setPromptText("Dept Manager");
    empnumber = RowEditor.getFieldRenderer("Mdepempno").toString();
    null

    Hi I managed to find the solution, by refering to the earlier replies..
    adding the following codes in teh .jsp page solve the problem.
    <%
    Row row = rsn.getRowSet().getCurrentRow();
    %>
    <% String empnumber = row.getAttribute("Mdepempno").toString(); %>
    Thanks for reading.
    regards
    muraly
    null

Maybe you are looking for