The next lines are all legal quotations. • <%= "Joe said %/>" %> but the above looks illegal..I think it should be....<%= "Joe said %\>" %> please coorect me...
tony lee
Ranch Hand
Joined: Jan 21, 2002
Posts: 52
posted
0
I have problems with nested stuff , like nested scripting, nested actions, ... Could anyone tell me about the principle there?
SCJP2, SCWCD
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
posted
0
For all such doubts, the best approach, IMO, is implementation. - madhav
Originally posted by shan java: The next lines are all legal quotations. • <%= "Joe said %/>" %>
Implementing for yourself is a good idea. It took me now 3 minutes to paste your code in a jsp of my test app in Tomcat -- start tomcat -- and search for generated code in the work-directory. So it might be time-saving for you too. Here's the result. The <%= "Joe said %/>" %> is perfectly legal. The result in the generated java-file in the work-directory is: out.print( "Joe said %/>" ); Why? Because <%= "Joe said %/>" %> is like: JspWriter out; // lots of other code //.. out.println ("Joe said %/>".toString()); This nested stuff is a very common feature in all flavours of web-development. (With lotus-domino I have a technique where one has to write a lotus-formula-language which creates JavaScript and that generated JavaScript generates Html. Nice feature . But its no rocket science, if one time grasped the principles)
Peter den Haan
author
Ranch Hand
Joined: Apr 20, 2000
Posts: 3252
posted
0
Beware though -- trying something out is no replacement for careful exegesis of the spec. In my experience many application servers have their idiosyncrasies. They either refuse a perfectly legal JSP, or they manage to digest the most horribly invalid markup. - Peter