blob: 3f93df8554c64f593ea5edad0206932c0750a81e [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>Making content assist work for JSP files</title>
</head>
<body id="tsrcedt023"><a name="tsrcedt023"><!-- --></a>
<h1 class="topictitle1">Making content assist work for JSP files</h1>
<div><p>Having the proper files defined in the Java¬ô build class path is essential for
content assist to work properly in JSP files. It is also essential for the
links builder to be able to correctly resolve links to servlets or Java beans
in JSP and HTML files.</p><div class="skipspace">To make content assist work for JSP files:</div>
<ol><li class="skipspace"><span>To determine whether the build path is correct, select <span class="uicontrol">Properties</span> from
the project's pop-up menu. </span></li>
<li class="skipspace"><span>Select <span class="uicontrol">Java Build Path</span>, and then the <span class="uicontrol">Libraries</span> page. </span> You should see the following files:<ul><li>j2ee.jar</li>
<li>rt.jar </li>
<li>servlet.jar</li>
<li>webcontainer.jar</li>
</ul>
</li>
<li class="skipspace"><span>If they are not present, add them as External JAR files. You may
have your own versions of these files, depending on the level of JDK or Servlet
API for which you are developing.</span></li>
<li class="skipspace"><span>If your Web applications reference other JARs, you can place them
in the build path as follows:</span><ol type="a"><li><span>Use the <span class="uicontrol">Add JARs</span> button on the Library
page. You must ensure that the JAR file is available to the server by properly
configuring the server.</span></li>
<li><span>Add the JARs to the <span class="filepath">WEB-INF/lib</span> directory.
They will be automatically added to the build path and deployed to the server
in as part of the project WAR.</span></li>
</ol>
</li>
</ol>
</div>
<div><p><b class="relconceptshd">Related concepts</b><br />
<a href="csrcedt006.html" title="Content assist helps you insert or finish a tag or function or finish a line of code in a structured text editor. The placement of the cursor in the source file provides the context for the content assist to offer suggestions for completion.">Content assist</a><br />
<a href="csrcedt004.html" title="Structured text editor is any of several text editors that you can use to edit various markup languages such as HTML, JavaScript, or XML.">Structured text editors for markup
languages</a><br />
</p>
<p><b class="reltaskshd">Related tasks</b><br />
<a href="tsrcedt005.html" title="To get help in adding markup to a file, you can use content assist in a structured text editor. Content assist helps you insert or finish a tag or function or finish a line of code in a structured text editor.">Getting content assistance in structured
text editors</a><br />
<a href="tsrcedt028.html" title="JSP content assist provides several templates, or chunks of predefined code, that you can insert into a file. You can use the default templates as provided, customize the default templates, or create your own templates.">Adding and removing JSP templates</a><br />
<a href="tsrcedt000.html" title="You can edit text coded in markup languages with a structured text editor. This is a generic term for several editors that you can use to edit any of several markup languages such as HTML or XML.">Editing text coded in markup languages
- overview</a><br />
</p>
</div>
</body>
</html>