Click to See Complete Forum and Search --> : Mixing Scriptlets and HTML


ladymuse
10-10-2007, 11:37 AM
I have to create a JSP using both Scriptlets and HTML. This is what I have so far, but I keep getting a compile error. I'm using Netbeans 5.5 :confused:

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Tutorial5-2</title>
</head>

<body>

<br<h1>Hello</h1>
</br>
<%
System.out.printIn( "Hello" );
%>
<%
if ( hello ) {
%>
<P>Hello, world
<%
} else {
%>
<P>Goodbye, world
<%
}

%>

</body>
</html>

Khalid Ali
10-10-2007, 01:00 PM
always try to post your error as well that usually is helpfull