Skip to main content

JSP Comments

Comments in JSP:-
-->Compiler /Interpreter doesn't take commented code for compilation /Interpretation, so the commented code doesn't participate in execution
JSP supports 3 types of comments:-
a.)HTML comments /Template text comments/ Output comments
  1. Syn:- <!---text--->
-->Recognized by html interpreter of browser
b.)JSP comments /Hidden comments
  1. Syn:- <%--text--%>
-->JSP page compiler recognize these comments
c.)Java comments /Scripting comments
  1. Syn:-
  2. //-->For single line
  3. /*--
  4. -----*/-->For multiple line
-->Java compiler(java) recognize these comments
-->In Eclipse IDE JES class for first.jsp comes in our(workspace)folder/.metadata/.plugins/.org eclipse
Comments
(1)JSP comment<%--%>
(2)Java comment(// or /*--*/)
(3)HTML comments(<!--->
JES Source Code
(1)No
(2)Yes
(3)Yes
In JES compiled code
(1)No
(2)No
(3)Yes
In the code going to browser
(1)No
(2)No
(3)Yes
Output
(1)No
(2)No
(3)No
-->Jsp comments are not visible in any phase at jsp execution so there are called hidden component
-->Html comments will not be recognised in the server they go to browser along with the response, so there are called output comments
-->We can use page directive tag to import the packages in our jsp component
  1. <%@page import="java.util.*, java.net.*"%>
-->In Eclipse IDE we can use Ctrl+Shift+c to put appropriate comments in appropriate lines

Comments

Post a Comment

Popular posts from this blog

Project Architecture's

1.) Functional flow/ Architecture a.) Only for 6+/7+years b.) Explain the flow of process/business 2.) Technical Flow/Architecture a.) Upto 5+ years b.) Explain technologies /components that are involved in the project Servlet & JSP Project Architecture:- 1.)What is need of Business Deligate to convert VO class object to DTO class object ? a.) If Business Deligate is not there servlet component directly prepares DTO class object by receiving and translating form data and passes to service class, if service class excepts certain input in other format like numeric employee number as string employee number then we need to modify servlet component code i.e For the changes that happened in business tier service component we have to modify servlet component of presentation tier b.) If Business Deligate is taken then it gets original form data as VO class object having string inputs and converts VO class object to DTO class object to pass to service class c.) If service class excepts ...

AdvertisementRotator

Add Rotator App(AdvertisementRotator): 1.)Add should come as graphical hyper link 2.)Add should come randomly 3.)Add should be changed at regular intervals 4.)Follow mvc1 architecture (jsp with java class /java bean) AddRotatorApp |-->java resources      |-->src          |-->xyz.bean               |-->Rotator.java |-->webcontent      |-->addrotator.jsp      |-->1.png, 2.png, 3.png, 4.png, 5.png      |-->WEB-INF          |-->web.xml Rotator.java package xyz.bean; import java.util.Random; public class Rotator { int addNo;   private String images[] = { "1.png", "2.png", "3.png", "4.png", "5.png" };   private String links[] = { "http://www.raymond.in", "http://onlyvimal.co.in",      "https://www.peterengland.com", "http://www.siyaram.com", "https://www.ramrajcotton.in" };    public void...