File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Comments: pg 41 of JSP specification Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Comments: pg 41 of JSP specification" Watch "Comments: pg 41 of JSP specification" New topic
Author

Comments: pg 41 of JSP specification

Goan Balchao
Ranch Hand

Joined: Mar 25, 2002
Posts: 93
This is in reference to chapter 2 of JSP specification.
The following in shown as legal
<% String joes_statement ="hi!"; %>
<X:tag value='<%="Joe said \\"" + joes_statement + "\\"."%> '/>
How is this legal? I tried only the scriptlet part
i.e
<%="Joe said \\"" + joes_statement + "\\"."%>
and Tomcat(4.1) spewed a few errors
Can anyone please explain?


Hemant Kamat<br />SCJP2<br />SCWCD<br />SCBCD<br />SCEA-I
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
"Akasmat"
Your name doesn't follow the javaranch guidelines. Please take a moment and change your "Publicly Displayed Name" by modifying your profile. You can review the guidelines at http://www.javaranch.com/name.jsp
thanks for your cooperation.
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Stefan Zoerner
Author
Ranch Hand

Joined: Nov 29, 2001
Posts: 121
Hello!
You made a mistake by cutting just the scriptlet. It is valid when place in an '...'-Context of an attribute. Review the following code:

The page compiles. The scriptlet does not need the espaced "\", the usage in the useBean-tag does.
Hope that helped,
Stefan


Stefan Zoerner
Author of German LDAP-Book
Committer at Apache Directory Project
 
 
subject: Comments: pg 41 of JSP specification
 
Threads others viewed
Different Output using setContentType
Final mock exam question 54
JSP expression
question from jsp spec
Quoting and Escape Conventions
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture