http://www.visualbuilder.com/jsp/tutorial/pageorder/13/

I got the code from this place, however, when I try to run it, it doesn't work.

I am new to JSP, just trying to learn the basics , but I can't even get correct info from the website.

A friend altered the code for me like this, although what I noticed is that he added in int x, whereas the original code didn't. Was the output support to be any different?

My friend's code:

<HTML>

<HEAD> 
<!-- Example2 -->

<TITLE> JSP loop</TITLE> 
</HEAD> 
<BODY> 

<font face=verdana color=darkblue>

JSP loop

<BR> <BR> 

This is a loop example from the 

<br>

<%
 int x=8;
 for (int i=1; i<x; i++){
    %>
     <font size="<%= String.valueOf(i)%>" color=darkred face=verdana>VisualBuilder JSP Tutorial</font><br>
<%}
%>
</font>
</BODY> 
</HTML>

So, I decided to try to original code from the website again. And it gives me an error the first time. But if you keep clicking refresh, it eventually gives you the right page. This makes no sense to me.

Anyways, the original code is wrong, and something needs to be changed about it. I don't know what it was trying to go for though.

Also, that tutorial is bad in more ways than one (and not only because it's causing an exception).

Are there any online tutorials for JSP? I am in china currently, so I can't purchase any books here, at stores nor online.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.