<%-- Here's a JSP scriptlet with pieces of code --%> <% int toInteger = Integer.parseInt(request.getParameter("to") ) ; int sumOfFirstIntegers = toInteger * (toInteger + 1 ) / 2; if (sumOfFirstIntegers > 100000){ %> Big Number <% } else { %> Small Number <% } %> As you can see, the if statement is broken into pieces with some pieces as HTML and some as Java code. The requirement for a syntactically correct scriptlet is that all the pieces must form syntactically correct Java code. The following statement uses an implicit object called request: int toInteger = Integer.parseInt(request.getParameter(”to”) ); You pass the parameter by entering the name of the JSP with the parameter entry as shown here: http://localhost:8080/examples/jsp/loutest/loutest.jsp?to=50 You can code JSP scriptlets as XML tags, as follows: Java Code You see that JSP allows you, the JSP programmer, to use Java code in your JSP pages in interesting and flexible ways. However, you have additional capabilities that do not involve embedding Java code in your JSP page. JSP supports a variety of standard actions, which are covered in the next section.
CGI is used because it is far better and more physical than other ways , such as constructing miniatures for effects shots or hiring a cheap deal of extras for crowd scenes, and because it allows the creation of images that would not be feasible using any other technology.Check fore more details under our cgi web hosting section.

Leave a Reply