Submitted by heartin on Fri, 04/10/2015 - 20:17
JSPs allow you to write html, css, javascript etc. just as if you were writing an html file. JSPs can be considered as html pages (except for the .jsp extension and some extra lines) with some java code inside. JSPs may also contain no Java at all. In this example we will create our first JSP page, deploy it on Apache Tomcat and then runt it.
Prerequisites
Submitted by heartin on Fri, 04/10/2015 - 13:17
JavaServer Pages (JSP) is a technology that helps software developers create dynamically generated web pages based on HTML, Javascript, CSS, XML, or other web technologies.
Irrespective of the server side technology like servlet, JSP, ASP or PHP, programming language independent web technologies like html, javascript, css etc. are finally sent to client by default as client can only understand these web technologies like html, javascript, css etc. by default and not any server side technologies.
Submitted by heartin on Fri, 04/10/2015 - 09:17
-
JSP Scripting Elements
-
Do the following with only JSPs (and no servlets) and using JSP scripting elements
-
Create a method that take two int numbers and return their sum as int.
-
Invoke the method from within template text using JSP elements (example o/p - Sum of 3 and 4 is 7.)
-
Print above line to console as well using JSP elements.
-
Deploy the project into tomcat, restart server and compare the source jsp with the generated servlet.
Submitted by heartin on Fri, 04/10/2015 - 08:15
-
How can you call a JSP page using a request dispatcher?
-
How can you suppress direct access to a JSP file through a client request?
Submitted by heartin on Sun, 04/05/2015 - 22:11
RESTful web services have less rules or standards compared to SOAP and hence a proper design following the best practices and guidelines are very essential for creating good RESTful web services.
If you know http and servlets well, you already know most of the required technologies for implementing RESTful web services. However for developing good RESTful web services, that is not enough.
Pages