• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Comments: pg 41 of JSP specification  RSS feed

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Author
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!