Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Lotus Domino and IBM WebSphere integration solutions: Domino JSP tag libraries

Form JSP code

Return to article

Here is the complete code for the form JSP:

<%@ taglib uri="domtags.tld" prefix="domino" %>
<%@page import="lotus.domino.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@ page 
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Vehicle information using Domino Tag Library</title>
</head>
<body>
<h1>Vehicle information using Domino Tag Library for <%= (String) request.getParameter("unid")%></h1>
<domino:document id="doc">
<%
	boolean isNew = false;
	if(doc.isNewNote()){
		isNew = true;
	}
%>
<% if(isNew){ %>
	Creating a new car document...
<% } else { %>
	Modifying an existing car document...
<% } %>
</domino:document>
<domino:form name="carform" schema="car" editmode="edit" validhref="carformthankyou.jsp" clientvalidate="true">
<domino:validatesummary caption="The following error(s) were detected. Please correct them and try again:<br/>" />
<table border="1" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<th align="left">VIN</th>
		<td>
			<domino:input name="vin"/>
			<domino:validaterequired name="vin" alert="true" 
			message="VIN is a required field.">
			<--- Error</domino:validaterequired>
		</td>
	</tr>
	<tr>
		<th align="left">Make</th>
		<td>
			<domino:input name="make"/>
			<domino:validaterequired name="make" alert="true" 
			message="Make is a required field.">
			<--- Error</domino:validaterequired>
		</td>
	</tr>
	<tr>
		<th align="left">Model</th>
		<td>
			<domino:input name="model"/>
			<domino:validaterequired name="model" alert="true" 
			message="Model is a required field.">
			<--- Error</domino:validaterequired>
		</td>
	</tr>
	<tr>
		<th align="left">Body Type</th>
		<td>
			<domino:input name="bodytype"/>
			<domino:validaterequired name="bodytype" alert="true" 
			message="Bodytype is a required field.">
			<--- Error</domino:validaterequired>
		</td>
	</tr>
	<tr>
		<th align="left">Engine</th>
		<td>
			<domino:input name="enginetype"/>
			<domino:validaterequired name="enginetype" alert="true" 
			message="Enginetype is a required field.">
			<--- Error</domino:validaterequired>
		</td>
	</tr>
	<tr>
		<th align="left">Year</th>
		<td>
			<domino:input name="year"/>
			<domino:validaterequired name="year" alert="true" 
			message="Year is a required field.">
			<--- Error</domino:validaterequired>
			<domino:validatepattern name="year" pattern="[0-9]{4}" 
			alert="true" message="Year must be a four-digit numeric value.">
			<--- Error</domino:validatepattern>
		</td>
	</tr>
	<tr>
		<th align="left">Specifications</th>
		<td>
			<domino:input name="specifications" multivalue="true" 
			mveditseparator="comma" mvdisplayseparator="semicolon" />
			<domino:validaterequired name="specifications" alert="true" 
			message="Specifications is a required field.">
			<--- Error</domino:validaterequired>
		</td>
	</tr>
</table>
<domino:saveclosedoc>Save</domino:saveclosedoc>
</domino:form>
</body>
</html>

Return to article