Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: JAVA and JSP

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up JAVA and JSP

    How to compare two integers in jsp page.Thnks in advance


  2. #2
    Junior Member
    Join Date
    May 2013
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: JAVA and JSP


  4. #4
    Junior Member
    Join Date
    Jul 2013
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: JAVA and JSP

    Use this code in your jsp.I added String comparison also in the code.Feel free to use it if you want
    <%
     
    int a=100;
    int b=550;
    String q="abc";
    String w="ABC";
     
    if(q.equals(w))
    {
        System.out.println("STRING EQUAL");  
     
    }
    else
    {
     
        System.out.println("STRING NOT EQUAL");
    }
     
     
    if(a==b)
    {
    	System.out.println("EQUAL");    
    }
    else
    {
        System.out.println("NOT EQUAL");
    }
     
    %>


Similar Threads

  1. import java in jsp
    By game06 in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: April 17th, 2013, 07:55 AM
  2. import java in jsp
    By game06 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 16th, 2013, 04:26 PM
  3. Jsp Servlet problem with getting parameter vaules from another jsp page
    By venkat_tk in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: February 25th, 2013, 02:51 AM
  4. Parent JSP Page is not refreshing properly after modifying a child Jsp.
    By jay_84 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: December 14th, 2011, 09:59 AM
  5. saving the data of the child jsp into parent jsp
    By nrao in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: January 15th, 2011, 11:05 AM