When I did the 4003 lab and run the index.jsp it ran fine. Then I thought 
I'd apply the XML syntax for practice. However this gives me a strange error. 
In Eclipse:
Syntax error on tokens, they can be merge to form &&;&&; 
This is refering to the && in this block:
<jsp:scriptlet>String username = request.getParameter(
When this is run on a JBoss 4.2.2 I get this error:
org.apache.jasper.JasperException: /index.jsp(26,36) The entity name must 
immediately follow the '&' in the entity reference. "username"); if(null&& 
username.length() > 0 ) { </jsp:scriptlet> username != 
If I remove the && username.length() > 0 it runs fine. 
Not sure why it does not like the &&. Any suggestions would be great!!!
Todd
Full File:<?
<xmlversion="1.0"encoding="ISO-8859-1"?>jsp:rootxmlns:jsp="http://java.sun.com/JSP/Page"version="2.0";><jsp:directive.pagelanguage="java"contentType="text/html;
 charset=ISO-8859-1"pageEncoding="ISO-8859-1"/><jsp:text><![CDATA[<?xml 
version="1.0" encoding="ISO-8859-1" ?> 
]]></jsp:text><jsp:text><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> 
]]><</jsp:text>html><head><title>Hello</title></head><bodybgcolor="white"><imgsrc="duke.waving.gif"/><h2>Hello,
 my name is Duke. My hobby is Golf. What are your name and 
hobby?</h2><formmethod="get"><inputtype="text"name="username"size="25"/><inputtype="text"name="hobby"size="25"/><p></p><inputtype="submit"value="Submit"/><inputtype="reset"value="Reset"/></form><jsp:scriptlet>String
 username = request.getParameter("username");if( username != null&& 
username.length() > 0 ) {
 
</jsp:scriptlet><jsp:includepage="response.jsp"/><jsp:scriptlet>}</jsp:scriptlet></
</</body>html>jsp:root>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to