blob: f037f4b8da6c5b184c7f04a3425dd9820cb80839 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="task" name="DC.Type" />
<meta name="DC.Title" content="Creating JavaServer Pages (JSP) files" />
<meta content="JSP files, creating" name="DC.subject" />
<meta content="JSP files, creating" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/twcreprj.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/cpdjsps.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="tjcrejsp" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>Creating JavaServer Pages (JSP) files</title>
</head>
<body id="tjcrejsp"><a name="tjcrejsp"><!-- --></a>
<h1 class="topictitle1">Creating JavaServer Pages (JSP) files</h1>
<div>
<div class="section"><p>Most types of JSP files can be created using the New JSP File
wizard. To create a basic JSP file using the wizard, complete the following
steps: </p>
</div>
<ol>
<li class="stepexpand"><span>Create a dynamic Web project if you have not already done so.</span>
</li>
<li class="stepexpand"><span>In the Project Explorer, expand your project and right click on
your WebContent folder or on a subfolder under WebContent. Note that if you
choose any other folder in which to create the JSP, then it will not be included
in the WAR file that is deployed to the server. In addition, link validation
will not encompass files that are not under the WebContent folder.</span></li>
<li class="stepexpand"><span>From the context menu, select <span class="menucascade"><span class="uicontrol">New</span>
&gt; <span class="uicontrol">JSP</span></span>.</span> The New Java Server
Page window appears with your folder selected</li>
<li class="stepexpand"><span>Type a file name into the File name field, making sure you include
the jsp extension (jsp, jsv, jtpl, or jspx) in the file name.</span></li>
<li class="stepexpand"><span> You have several options for proceeding:</span>
<ul>
<li>To accept the defaults associated with a new JSP file, select <span class="uicontrol">Finish.</span></li>
<li>To link to a file in the file system and specify path variables, select <span class="uicontrol">Advanced</span> and
then make your selections using the <span class="uicontrol">Browse</span> and <span class="uicontrol">Variables</span> buttons. </li>
<li> To use a template file for the initial content of your JSP page,
select <span class="uicontrol">Next</span>. The Select JSP Template window appears.
Select the <span class="uicontrol">Use JSP Template</span> check box, and then select
one of the sample templates. You can also select the <span class="uicontrol">JSP Templates</span> link
to add or remove JSP templates to your list of templates.</li>
</ul>
</li>
</ol>
</div>
<div><div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../topics/cpdjsps.html">JavaServer Pages (JSP) technology</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="../topics/twcreprj.html" title="You create and maintain the resources for your Web applications in Web projects.">Creating a dynamic Web project</a></div>
</div>
</div>
</body>
</html>