Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Which is parsed first in a JSP page - EL, taglib or scriplets  RSS feed

 
tuty sra
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know how a JSP page is parsed and converted into a servlet. I am interested in knowing the Order of parsing the various JSP elements like EL,TagLibs,Scriplets.Do any of the guys here know about it?
 
tuty sra
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
Is there anyone who could help me out?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66143
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Questions like this are best answered by the JSP Specification.
 
tuty sra
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have downloaded the JSP spec. Any Hints on where to find it in the JSP spec?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66143
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have never read the Spec before, it's a good idea to read the whole thing. You'll learn a lot of very good information. Otherwise, scan the Table of Contents.
 
tuty sra
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read an article "The Secret Life of JavaServer Pages" by bear. I is very useful and it gave me a lot of clarifications.

@Bear
I have one suggestion
I found the following code in the article which explains how a tag is converted into a servlet code.


out = pageContext.getOut();
_jspx_out = out;

out.write("\r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write(" <head>\r\n");
out.write(" <title>A simple JSP page</title>\r\n");
out.write(" </head>\r\n");
out.write("\r\n");
out.write(" <body>\r\n");
out.write(" Testing \r\n");
out.write(" ");
if (_jspx_meth_c_forEach_0(_jspx_page_context))
return;
out.write("\r\n");
out.write(" !\r\n");
out.write(" </body>\r\n");
out.write("</html>\r\n");
out.write("\r\n");

Here it would have been very useful if the code for "_jspx_meth_c_forEach_0" method was also given.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!