Comparing two values in a jsp file.

Hi every one.
How can i compare to values ,one of them is picked up from a database and the second is passes to this page from html form as a parameter.
e.g
<c:when test="${param.password==user.password} ">
i did it like that but it dosen't work .if i replaced one of them with an actual value like "123466" it work.is there some thing like String.equalsIgnoreCase() function
to use it in such situations.
thnx for any help.

<c:when test="${param.password==user.password} ">instead try this..
<c:when test="${param.password.equals(user.password)} ">

Similar Messages

  • How to get the weblogic.httpd.session.timeoutSecs value in a JSP file

    Hi,
              We are using Weblogic 5.1 SP8. We set weblogic.httpd.session.timeoutSecs=900 in the weblogic.properties file. How can I get this value in a JSP file if I don't use java.util.Properties to parse the properties file?
              Can I use session.getValue(sessionName) to get it? If so, what is the session name for this property?
              Thanks.
              Frank
              

    I think something like this should work:
              T3ServicesDef services = T3Services.getT3Services();
                   services.config().getProperty("weblogic.httpd.session.timeoutSecs");
              Frank Yu <[email protected]> wrote:
              > Hi,
              > We are using Weblogic 5.1 SP8. We set weblogic.httpd.session.timeoutSecs=900 in the weblogic.properties file. How can I get this value in a JSP file if I don't use java.util.Properties to parse the properties file?
              > Can I use session.getValue(sessionName) to get it? If so, what is the session name for this property?
              > Thanks.
              > Frank
              Dimitri
              

  • SSRS Expression to compare two values and get data from another dataset

    Hi,
    I have a requirement where in i need to compare a value of a dataset (not the one which table is poiting to)
    with the value of a text box, and return the count if it matches else 0, the expression is as below. Here 
    industryName and recCount are from the dataset ds_MedimOrLowImpactEntities.  whats wrong in this expression
    =Sum(IIF(Fields!industryName.Value = reportItems!hpapra_name.Value, Fields!RecCount.Value, 0), "ds_MediumOrLowImpactEntities")
    This is the error that i am getting:
    Any help on this is appreciated
    Kruthi Hegde

    Hi Kruthi,
    After testing the issue in my local environment, I can reproduce it. Just the error message said, “Aggregate function can be used only on report items contained in page headers and footers”. So the sum function that contains report items should be stayed
    at page headers or footers. Besides, you said the hpapra_name textbox contain a field from another dataset, not the ds_MedimOrLowImpactEntities dataset. While in Reporting Services, Report item expressions can only refer to other report items within the same
    grouping scope or a containing grouping scope. So consider the two issues, we should use some other expression to instead the “reportItems!hpapra_name.Value” expression.
    Take a look at the "Looking up values from another dataset" topic here:
    http://msdn.microsoft.com/en-us/library/ms159673.aspx#LookupFunctions
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Passing values to a JSP file

    Help!
    This is a very trivial and simple problem but stupid me couldn't figure out. I am developing a web interface with a database. I retrieved some records with a recordset. Now I am passing the id value to the next jsp file. This is what my code looks like:
    <td>
    <a href="someDetail.jsp?id= + ""<%= results.getString("id") %">""><%= results.getString("name") %>
    </a>
    </td>
    Once the screen comes up with all the records and when I click one particular record it goes to the someDetail.jsp file but it is not taking the id with it. In the someDetail.jsp screen the URL looks like this.
    http://localhost/someData/someDetail.jsp?id=
    What am I missing here?
    Sue

    <a href="someDetail.jsp?id= + ""<%=
    results.getString("id") %>""><%=
    results.getString("name") %>Why not just assign a variable to the id? ie.
    <% while (results.next()) {
    String someId = results.getString("id");
    %>
    <td><a href="someDetail.jsp?id=<%=someId%>">Detail Page</a></td>
    <% } %>
    Hope this helps a bit.

  • Compare Two Values in logic:equal issue !!!!!!!!!!!

    Hi Techie !!!!
    I have list object from DB inwhich i want compare a field in <logic:equal> Struts EL ....... I have written the following code.....
    <%
             List list = (List)request.getAttribute("AppointmentDetailNavigationList");
          pageContext.setAttribute("list", list, pageContext.REQUEST_SCOPE);
    %>
    <body>
    <ul>
         <logic:iterate id="item" name="list" type="com.bean.AppoinmentInformation" scope="request">
               <logic:equal property="rsc_name" value="rsc_name">   // This is for test only
                         *// Here i want compare rsc_name if comes two times in list i want come out of this scope....*
               </logic:equal>
         </logic:iterate>
    </ul>
    </body>
    </html>          My requirement is a field with duplicate, wanna come out of the scope from the list...
    Any one help me out.....

    Wouldn't it be easier to use a Set which does not allow duplicates? That would nip the problem at the source rather than bringing it all the way to the jsp and not displaying it.
    However if you have to have it this way, there is no easy way to break out of a loop in logic tags. Maybe some murky servlet code with a break command in scriptlets would do the trick, but you really have to scour the source code to confirm that.
    cheers,
    ram.
    Edited by: Madathil_Prasad on Apr 26, 2010 1:00 PM

  • Compare two values input by user in JavaScript

    Hi, there,
    I have two text input boxes in my form, and user can input some value in the boxes. I want to check if the values in these two boxes are numerical and compare them in my JavaScript function. How can I do this?
    Thanks in advance.
    Fred

    Hi,
    You can make use of this code. You can user parseInt, which parses a string argument and returns an integer of the specified base.
    <html>
    <head>
    <script>
    function testCompare()
    var x = parseInt(document.myFrm.a.value);
    var y = parseInt(document.myFrm.b.value);
    if( x > y)
    alert ("X is greater");
    else
    alert("Y is greater");
    </script>
    </head>
    <body>
    <form name = myFrm>
    <input type = text name = a value = 100>
    <input type = text name = b value = 200 >
    <input type = button value = click onclick = testCompare()>
    </form>
    </body>
    </html>
    Hope this helps.
    Thanks,
    Senthil_Slash

  • How to pass value from the jsp file to a java bean

    I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
    <%db.setDatabase(database);%>are coding to set my databse connection
    private String database;
        public Conn(){
         try{
                   Class.forName("org.gjt.mm.mysql.Driver");
                   DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
                   String data=getDatabase();
                   String url = "jdbc:mysql://localhost/"+data;
                   Connection conn = DriverManager.getConnection(url);
                   setConnection(conn);
              catch(SQLException e){
                   System.out.println(e.toString());
              catch(Exception e){
                   System.out.println(e.toString());
         public void setDatabase(String Database){
          this.database = Database;
         public String getDatabase(){
         return this.database;
         }     and Below are error produce
    Note: sun.tools.javac.Main has been deprecated.
    /mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
    in class bgoc.dbConn.Conn.
    db.setDatabase(database);
    ^
    1 error, 1 warning
    please help me soon. any that come to your will help
    thank you

    I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
    <%db.setDatabase(database);%>are coding to set my databse connection
    private String database;
        public Conn(){
         try{
                   Class.forName("org.gjt.mm.mysql.Driver");
                   DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
                   String data=getDatabase();
                   String url = "jdbc:mysql://localhost/"+data;
                   Connection conn = DriverManager.getConnection(url);
                   setConnection(conn);
              catch(SQLException e){
                   System.out.println(e.toString());
              catch(Exception e){
                   System.out.println(e.toString());
         public void setDatabase(String Database){
          this.database = Database;
         public String getDatabase(){
         return this.database;
         }     and Below are error produce
    Note: sun.tools.javac.Main has been deprecated.
    /mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
    in class bgoc.dbConn.Conn.
    db.setDatabase(database);
    ^
    1 error, 1 warning
    please help me soon. any that come to your will help
    thank you

  • How to Compare Two Oracle 10g Form(FMB) file.

    Hi,
    One developer had done some changes in one file called N004 version 2. I have done some changes in N004 version 3. If I like to see difference between two Oracle Form Version(FMB) then How can we see them..?
    Thanks,
    Div

    I'd convert it to xml before, as you can't be sure that two fmb's which are exact the same could look different in a text editor; first form got compiled with forms compiler and the second not => should not differ in functional way but I'm pretty sure that the files itself look diffrerent.
    regards

  • UDF to compare two values and Pull another value if equals

    Hi all,
    I am looking for UDF to perform the following logic, please help me
    I will have 3 inputs, say field1, fields2, field3. If field1 = field2 then return field3.
    You may say that this can be implemented by message mapping with IF condition itself. But here field1 & field2 are from different segments.Field1 & field3 are from same segment.
    When i use message mapping because of this context problems, i am able to get this validation for the first set only.
    If i have the multiple values means, i am not able to get it.
    all these field1, field2 & field3 are multiple times
    Regards
    Suman gupta

    Chirag,
    I set the all 3 input's context to parent level and now error is not there.which is fine
    But i am not getting output even though field1 & field2 are equal/
    The logic should be in this way.
    Record1:
    ABC(segment)
       <Field2>01</field2>
      <Field1>20101110</field3>
    XYZ(segment)
         <Field1>10</field1>
    Record2:
    ABC(segment)
       <Field2>10</field2>
       <Field1>20090909</field3>
    XYZ(segment)
       <Field1>01</field1>
    In the above case Record1-field1 should check whether Record1-field1==Record1-field2 ?? NO
    Record1-field1==Record2-field2?? YES the return 20090909
    And
    Record2-field1 should check whether Record2-field1==Record2-field2 ???? NO
    Record2-field1==Record1-field2 ??? YES then return 20101110.
    Please let me know, i am not able to achieve this using graphical Mapping, thats why i am thinking about UDF.
    Regards

  • I want to send a value from JSP file to another JSP file without..

    I want to send a value from one.JSP file to another two.JSP file without to show the content HTML of the one.JSP in two.JSP (with include), only take the values processed in a Bean :
    ===================
    Bean
    package pck;
    import java.io.*;
    public class yyyy {
         public String getXxx() {    
              return cccc;
    ========================
    one.JSP
    <jsp:useBean id="idBean" class="pck.yyyy" scope="??"/>
    <%idBean.setXxx(ccc);%>
    ========================
    two.JSP
    <%@ include file="one.jsp"%>
    <%=idBean.getXxx()%>
    but without to show the content HTML of one.JSP in two.JSP.
    Can someone help me?, please.

    Why don't just put the common code in a separate file and include it in both. i.e. the code that is in one.jsp that is needed by two.jsp could be put in a common file and included in both pages, thus the HTML is separated off. If this will not work, set a boolean value in two.jsp that can be used by one.jsp to decide if the HTML should be displayed or not.
    Steve

  • Comparing  Two Items in javascript

    I TRY BELOW CODE BUT IT IS NOT WORKING , PLEASE HELP ME TO COMPAR TWO VALUE OF ITEM WITH JAVASCRIPT
    WHAT CHANGE I HAVE TO DO , IN BELOW CODE.
    LOGIC IS IF P25_VAL1 = P25_VAL2 THEN MQTY = SQTY
    function mfgsal()
    function getVal(item){
    if($x(item).value != "")
    return parseFloat($x(item).value);
    else
    return 0;
    if ( parseInt($v('P25_VAL1')) = ( parseInt($v('P25_VAL2'))) {
    $x('P26_SQTY').value =
    ($x('P26_MQTY').value );
    }

    Kanaiya Sindhavad wrote:
    I TRY BELOW CODE BUT IT IS NOT WORKING , PLEASE HELP ME TO COMPAR TWO VALUE OF ITEM WITH JAVASCRIPT
    WHAT CHANGE I HAVE TO DO , IN BELOW CODE.
    LOGIC IS IF P25_VAL1 = P25_VAL2 THEN MQTY = SQTYDon't shout, and always post code wrapped in <tt>\...\</tt> tags.
    if ( parseInt($v('P25_VAL1')) = ( parseInt($v('P25_VAL2')))"=" is the assignment operator in JavaScript, not used to test for equality. And the brackets dont match. It should be "===" (comparing both type and value):
    if ( parseInt($v('P25_VAL1')) === parseInt($v('P25_VAL2')))

  • In jsp file, how to transfer parameter between two javabean?

    In jsp file, how to transfer parameter between two javabean?
    for example
    Bean1 has a attribute A
    Bean2 has a attribute B
    how to transfer the value of A to B

    Have you tried something like...
    <jsp:setProperty name="Bean2" property="B" value="<jsp:getProperty name="Bean1" property="A" />" />

  • How to compare two XSD files programmatically

    Hi
    I want to compare two XSD files programmatically to find out whether one XSD is a sub set of another XSD(Means checking all the elements and attributes of one schema to be present in another schema).
    Please let me know how this can be done in an efficient way.
    Thanks in advance.
    Mithun K

    Or simply apply an oracle text index on your pdf column:
    SQL>  create table t (id integer primary key, bl blob)
    Table created.
    SQL>  declare
    bf bfile := bfilename('TEMP','b32001.pdf');
    bl blob;
    begin
    dbms_lob.createtemporary(bl,true);
    dbms_lob.open(bf,dbms_lob.lob_readonly);
    DBMS_LOB.LOADFROMFILE(bl, bf,dbms_lob.getlength(bf));
    insert into t values (1,bl);
    commit;
    dbms_lob.close(bf);
    dbms_lob.freetemporary(bl);
    end;
    PL/SQL procedure successfully completed.
    SQL>  create index t_idx on t (bl) indextype is ctxsys.context parameters ('filter ctxsys.auto_filter')
    Index created.
    SQL>  declare
       mklob   clob;
    begin
       ctx_doc.filter ('t_idx', '1', mklob, true);
       dbms_output.put_line (substr (mklob, 1, 250));
       dbms_lob.freetemporary (mklob);
    end;
    Oracle® Database
    Release Notes
    11
    g
    Release 1 (11.1) for Linux
    B32001-04
    November 2007
    This document contains important information that was not included in the
    platform-specific or product-specific documentation
    PL/SQL procedure successfully completed.This generates a text only version of your pdf and standard text comparison methods can be applied ....

  • Compare two XML files: Analysis and Design

    Hi, Java/XML/JDOM experts,
    I realised that an open source of Java utility to compare two XML is still missing. So I would like to write one for my JDOM excises.
    I plan to do it in three steps:
    1.Define the problem domain.
    2.Design the classes to be developed.
    3.Coding
    Below is the problem domain. Would you review it and tell me if it is fine?
    Best regards,
    AG
    Compare two XML files
    Schema assumption:
    The xml files used for the comparison must have the same schema.
    Definition:
    1. Two elements of simple type are said equal if their name and value are identical.
    2. Two elements of complex type are said comparable if their name, attributes are identical.
    3. Two elements of complex type are said equal if they are comparable and their children elements are identical.

    Hi,
    Thanks for reviewing my idea.
    The xml files used for the comparison must have the
    same schema.Including not having a schema at all? And if they do
    have a schema, must they be valid according to the
    schema?I will only support schema based xml files. To include a schema is a good practice. So I will valid them agaisnt schema (is this possible with JDOM? I am testing ...)
    >
    2. Two elements of complex type are said comparableif
    their name, attributes are identical.
    3. Two elements of complex type are said equal ifthey
    are comparable and their children elements are
    identical.Do you plan to require child elements to appear in the
    same order for the two documents to be equal? (Note
    that XML specifically says that the order of
    attributes is not significant.)No. The order is not significant as I use the attributes as the keys to find comparable element counterpart.
    Here is the sample code already tested. Any comments are welcome!
    The next step is to define the "delta xml schema" that will guide me to store the comparasion results. Do you have any suggestions?
    Regards.
    AG
    public static boolean comparable(Element element1, Element element2)
         boolean returnValue=false;
         if (element1.getName()!=element2.getName()) {
              return returnValue;
    } else {
              returnValue=true;
                        System.out.println ("place 2");
         List attributeList=element1.getAttributes();
         Iterator attributeIterator=attributeList.iterator();
         Attribute workingAttribute=null;
         while (attributeIterator.hasNext()) {
                             if (!workingAttribute.getValue().equals(
                             element2.getAttribute(workingAttribute.getName(), workingAttribute.getNamespace()).getValue()))
                                  returnValue=false;
                                  break;
         return returnValue;

  • How can compare two xml files.........

    Hi developers..........
    I have a problem in compare two xml files.My project description is I take two xml(file1,file2) files.Compare file1 with file2. Now I want what are the same words in to the file2.
    file1:
    <hello>
    <html>
    <jsp:plugin>
    file2:
    <hello>
    <jsp:usebean>
    <html>
    result:
    <hello>
    any give the code for this logic.....

    hi...can u pls send me the code which compares two
    xml files and gives the output as difference between
    two fileshttp://www.bmsi.com/java/#diff

Maybe you are looking for

  • Open/Close periods in PCA

    Dear all, We do Balance Sheet and P+L statements in PCA, and Finance department wants to close PCA periods for manual corrections after period close (similar to FI). How it can be solved? There are no customizing in PCA for posting periods. I've also

  • Check printing ,Please help : Urgent!!!!!!!

    One of the user printed wrong information on a check.She wants to void that check and reprint a new one.The information also came on next check,But the information of second check is not the check lot ,I mean in the system,where as first check inform

  • Restaure notes

    Hello I had lost all my notes from the NOTES application from my Ipad2. I daily synchronized all datas with my Imac that is synchronised with TimeCapsule. I am a new mac user since a week. Can someone give me all steps to find them back? Thank you fo

  • When will we have Khmer font (Cambodia) in iOS?

    When will we have Khmer font (Cambodia) in iOS?

  • CertView - results in Certification\Exam History

    Hi, Can somebody explain when exam results should be visible in 'Certification History' and when in 'Exam History' in CertView? I'm little confused because I thought when all exams for certificate are passed then results should not be visible in 'Exa