blob: 2aedd35c4838096051eb46f2962daced77ad7af7 [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>
<head>
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 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
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<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="skipspace">
<p>Most types of JSP files can be
created using the New JSP File wizard.
</p>
To create a basic JSP file using the JSP file wizard, complete the
following steps: </div>
<ol>
<li class="skipspace"><span>Create a dynamic Web project if you have not already done so.</span></li>
<li class="skipspace"><span>In the Project Explorer, expand your project and right click on your <b>WebContent </b>folder or on a subfolder under WebContent.<br>
<br>
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><br>
<br>
</li>
<li><span>From the context menu, select<span class="menucascade"><b> <span class="uicontrol">New</span> &gt; <span class="uicontrol">JSP</span></b></span>.</span> The New JavaServer Page window appears with your folder selected.<br>
<br>
</li>
<li class="skipspace"><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.<br>
<br>
</span></li>
<li class="skipspace"><span> You have several options for proceeding: </span>
<ul>
<li>To accept the defaults associated with a new JSP file, select <span class="uicontrol"><b>Finish</b></span>. </li>
<li>To link to a file in the file system and specify path variables, select <b>Advanced</b> and then make your selections using the <b>Browse</b> and <b>Variables</b> buttons.</li>
<li> To use a template file for the initial content of your JSP page, select <b>Next</b>. The Select JSP Template window appears. Select the <b>Use JSP Template</b> check box, and then select one of the sample templates. You can also select the <b>JSP Templates</b> link to add or remove JSP templates to your list of templates.</li>
</ul>
</li>
</ol>
</div>
<div><p><b class="relconceptshd">Related concepts</b><br />
<a href="../../org.eclipse.wst.webtools.doc.user/topics/cpdjsps.html">JavaServer Pages (JSP) technology </a><br />
</p>
<p><b class="reltaskshd">Related tasks</b><br />
<a href="twcreprj.html" title="">Creating a dynamic Web project</a><br />
<a href="../../org.eclipse.wst.sse.doc.user/topics/tsrcedt028.html">Adding and removing JSP templates</a><br />
<a href="../../org.eclipse.platform.doc.user/tasks/tasks-45.htm">Creating linked resources</a><br />
</p>
</div>
</body>
</html>