You can check the following:
http://java.sun.com/docs/books/tutorial/essential/environment/properties.htm
l

Keep in mind the system properties are ALREADY in a list. Your goal is to
locate the collection and use a loop to iterate through the existing
properties print them out (using the get) and concatenating a string value,
in this case "<br>" to the get value.

Hope this helps without doing it for you!!!

Enjoy


-----
Ken Robinson
[EMAIL PROTECTED]
www.shoutstream.com



-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED] On Behalf Of josh hughes
Sent: Friday, September 22, 2006 1:15 PM
To: JSP-INTEREST@JAVA.SUN.COM
Subject: looping through System.getProperties()?

Hello,
Could anyone help me complete my first jsp tutorial.
I must admit, I am very new to JSP, although I have a reasonable
understanding of Actionscript, PHP, HTML, CFML and a bit of Objective-
C (so jsp seemed like a natural progression).

I'm trying to follow a tutorial found at http://www.jsptut.com/
Mixing.jsp

So far I have worked through each tut without to many problems, until
I hit the exercise at the bottom of the above page.

The exercise asks me to "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 have no problems printing the values returned by  the
System.getProperties() call, but the exercise seems to ask me to loop
through the result, embedding a <br> after each item!?.

I take it I must somehow convert the result to an array that I can
then loop through, adding the <br> after each cycle!?.

I have tried converting the result using; String myArray[] = <%=
System.getProperties()%> but to  no avail.

can anyone tell me if I'm understanding the exercise correctly and if
so, maybe point my in the right
direction as I'm running out of hair to pull out!!?

many thanks in advance.

josh.

P.S sorry if my terminology isn't 100%. i plead ignorance!

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to