Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By gimbal2

Thread: Basic Newb question

  1. #1
    Dark Knight is offline Member
    Join Date
    Feb 2014
    Posts
    20
    Rep Power
    0

    Default Basic Newb question

    Hi guys,

    Im just starting out learning jsp and was following a tutorial here: JSP Tutorial. At the bottom of the page it says: "Write a JSP to output all the values returned by System.getProperties with "<BR>" embedded after each property name and value. Do not output the "<BR>" using the "out" variable." .

    I know how to print all the system propertied by doing this:
    Java Code:
    <%out.print(System.getProperties());%>
    But I was wondering if anyone could help me out with the bit where each property has the break after it?

    Any help would be appreciated.

    Thanks.

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,033
    Rep Power
    6

    Default Re: Basic Newb question

    You need to use a combination of java statements between <% and %> and embedded HTML tags. Hint: You will probably need a for loop.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,365
    Rep Power
    6

    Default Re: Basic Newb question

    If you learn JSP's before servlets, you're on a very bad learning path.

    Start with this free online resource and learn how to do it properly:

    Free Online Version of Core Servlets and JavaServer Pages (Second Edition) in PDF
    Tolls likes this.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Android Java NewB Question...
    By dmagician in forum Android
    Replies: 0
    Last Post: 06-25-2012, 12:32 PM
  2. A newb question
    By JavaJunkie2341 in forum New To Java
    Replies: 2
    Last Post: 03-30-2012, 08:00 PM
  3. Basic JSP question..
    By casid in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 12-28-2009, 07:51 PM
  4. [SOLVED] Probably a tooootal newb question... but
    By proeliumfessus in forum New To Java
    Replies: 6
    Last Post: 04-05-2009, 08:07 PM
  5. Basic question about EJB
    By javaplus in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 07-15-2008, 06:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •