You can create Web applications and deploy them into the portal as an application. Alternatively, you can use JSP files for small reusable pieces of functionality. The JSP approach requires you to create a .jsp file with embedded Java and HTML code. Servlets or other JSPs can invoke the JSP code by referring to the file.
JSP-based templates provide a way to manage JSP code across applications. You can create templates without managing individual files in the file system.A JSP template has a name and a definition, which are saved and managed by Mobile Web Studio. Once you create a template, you can populate the template with applications. You can include those applications in other applications. When you change a template definition, those changes are applied universally to all the associated applications of that template.
The JSP code shown next represents a JSP template that displays the current server-side time and date.
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page import="java.util.*"%> <H1>Server Side Time rendered by JSP Template</H1> The current time is <% java.util.Date date = new java.util.Date(); out.println(date); %>
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |