my dog learned polymorphism*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes When is the Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "When is the "%= ... %" syntax used?" Watch "When is the "%= ... %" syntax used?" New topic
Author

When is the "%= ... %" syntax used?

Henry Cray
Greenhorn

Joined: Feb 14, 2003
Posts: 2
Can someone please explain when the "%= ...%" syntax is used instead of "<%= ... %>" for JSP attribute values? In the Manning book, I see that both cases are used, but I don't understand when one is used over the other.
Thanks,
-Henry
Bhushan Jawle
Ranch Hand

Joined: Nov 22, 2001
Posts: 249
The former syntax us valid when you are using XML syntax only to represent a JSP file. Later can be used in both XML and non-XML reprn. of JSP.
Henry Cray
Greenhorn

Joined: Feb 14, 2003
Posts: 2
Thanks for the information. I now understand that the "%=...%" syntax is only valid when the JSP page is using XML syntax, and the "<%=...%>" is used when the JSP page is using standard JSP syntax.
Thanks,
-Henry
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: When is the "%= ... %" syntax used?
 
Similar Threads
BBCode Link in my signature doesn't work
Need help in regular expression
Validwhen validtor (expression syntax)
Can not find driver?
Java code analysis tool PMD used with eclipse.