Programming Tutorials

JSP Tutorials

31. Using a DataSource from WebLogic in a JSP

By: Bruce W. Perry : 2008-11-24

Description: Example below imports the necessary classes at the top of the code using the page directive and its import attribute. Otherwise, this JSP accomplishes everything that the servlet of the prior recipe does, including the display of nearly identical output in the web browser.


32. Getting HTTP Request Headers in a JSP

By: Bruce W. Perry : 2008-11-24

Description: The JSTL v1.0 makes all existing request headers available via the header implicit object. The JSTL automatically makes this variable available to JSPs; the header object evaluates to a java.util.Map type.


33. Embedding a QuickTime movie in a JSP

By: Bruce W. Perry : 2008-11-24

Description: Similar to using the Java Plug-in, a JSP uses the embed tag inside of an HTML object tag to properly load one of Apple Computer's QuickTime movies. You must include the CLASSID attribute value exactly as the below sample jsp program specifies. You also must include the same CODEBASE attribute value. If the user has an Internet Explorer Windows browser, but has not yet installed the QuickTime ActiveX control, the CODEBASE attribute value specifies where the user can download it.


34. Deploying an Individual JSP on Tomcat

By: Bruce W. Perry : 2008-11-23

Description: The easiest way to test a new JSP file is to place it at the top level of Tomcat's default web application. This application is located in the /webapps/ROOT/ directory. Tomcat 4.1.x compiles (or recompiles, if you are pasting a new JSP file over an old one) the JSP and display its response in a web page. You do not have to stop and start Tomcat using the Tomcat manager application for the new JSP file to be available to your web application.


35. Writing your first JSP page

By: Bruce W. Perry : 2008-11-23

Description: A JavaServer Pages (JSP) component is a type of Java servlet that is designed to fulfill the role of a user interface for a Java web application. Web developers write JSPs as text files that combine HTML or XHTML code, XML elements, and embedded JSP actions and commands. JSPs were originally designed around the model of embedded server-side scripting tools such as Microsoft Corporation's ASP technology; however, JSPs have evolved to focus on XML elements, including custom-designed elements, or custom tags, as the principal method of generating dynamic web content.


36. Using UTF-8 in JSP / ASP / HTML pages.

By: Markus Kuhn : 2008-08-13

Description: There are two ways in which a HTTP server can indicate to a client that a document is encoded in UTF-8:


37. Calling JSP from a batch file

By: Emiley J. : 2008-03-24

Description: If you wondering why in the world should I call a JSP from a batch file then read on. In fact, my problem was to schedule a task that runs every day on a specific time and must generate a report for my management and email the same. Searching the net I was able to accomplish this by combining VB and batch files. But I was not happy with the results. Or to be more specific, my management was not happy with the type of report I was generating in terms of formatting etc.


38. JSP Example to connect to MS SQL database using Tomcat Connection Pool

By: Baski : 2007-10-12

Description: This is a simple JSP program to connect to MSSQL database using the connection pool in Tomcat by creating JNDI name for the DataSource.


39. JSP Example to connect to MS SQL database and retrieve records

By: Abinaya : 2007-10-12

Description: This is a simple JSP program to connect to MSSQL database. This example JSP program shows how to connect to a MSSQL database from your JSP program.


40. The Differences Between Simple and Classic Tags in JSP

By: Grenfel : 2007-10-06

Description: There are several key differences between simple and classic tags. Let's take a quick look at each in turn and evaluate what it means to you as a tag developer.