Hi All

I've been developing with ASP for sometime and have finally got around to
checking out JSP.

I've come across something curious. In the source code at the bottom of this
email, the highlighted code would be permissible (semantically) in ASP but
is not permissible in JSP. I'm using Tomcat 3.2.

I understand where the translator is "breaking down" and why - in short, the
translator has been built not to process scriptlet tags within a declaration
tag. And I understand that there are ways of achieving the same result, and
that not all people would see this feature as necessary. But... I have found
the technique useful in ASP development - which is the same as saying, for
me at least, the technique is useful in server page development. Is there a
good reason why JSP translators are not built to handle this kind of syntax?

Thanks
Rob

==================================

<%@ page language="Java" %>

<%!

private void testMethod(){
 /* Start: Here's the violating code. */
 %>
 <p align="center">How are you today?</p>
 <%
 /* End: The violating code. */
}

%>

<html>
<head>
 <title>Hello</title>
</head>

<body bgcolor="#FFFFFF">
 <h1 align="center"><font face="Arial" color="#0000FF">Hello</font></h1>

 <%
 testMethod();
 %>

</body>
</html>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to