JSP Taglibs
Status of this Document
Date Comments
5.14.07 Updated
6.21.06 Test moved to new location
WTP 1.0 M8 Test created
Prerequisites
 

- must have an Apache Tomcat server installed
- must have Struts SDK downloaded (which includes example WARs)

Create a server
 

- Window > Preferences > Server > Installed Runtimes
- Add...
- choose the appropriate version of Apache Tomcat
- Point to your appropriate Tomcat directory

Import the struts-examples WAR
 

- unzip your struts SDK
- ensure there's a "webapps" which is where the sample WARs are located
- bring up the "File > Import > WAR file" dialog
- browse to "<struts-sdk-folder>/webapps/struts-examples.war"
- set your target runtime to be your Apache Tomcat server

 
Test that taglibs are being resolved
  To test that custom tags available, use content assist and source validation.
Test taglib resolution from these locations:
  • in a .jar file in the WebContent/WEB-INF/lib folder
  • a standalone .tld file somewhere in the webcontent folder
  • in a .jar file on the classpath for the project
  • referenced in a project that's outside the workspace
  • specified in a web.xml file
  • from tag files (for JSP 2.0)
Test taglib directive resolution in these ways:
  • Using the taglib URI value in the Web deployment descriptor
  • Using the context-relative path that refers directly to the TLD or JAR file
  • Using a page-relative path that refers directly to the TLD or JAR file
  • For a J2EE 1.3 Web project only, using the URI element value defined in the TLD
Test classpath changes
 

Ensure that taglibs are resolved after changing the classpath of a project.

Test content assist and validation support for taglibs
  Test content assist support for taglibs:
  • Verify that uri values are proposed in taglib directives
  • Verify that custom tags are proposed in the jsp
  • Verify that scripting variables created by custom tags (such as logic:iterate) are proposed in jsp scripting regions
  • Verify that scripting variables created by custom tags in jsp fragments are proposed in jsp scripting regions
  • Verify custom tags with tag-dependent body content (like SQL statements) are left alone
Test validation support for taglibs:
  • Verify that duplicate prefix values are warnings for jsp directive tags
  • Verify that reserved prefix values such as "java" are errors for jsp directive tags
  • Verify that unresolved uri values are errors for jsp directive tags
  • Verify that missing required attributes are errors for jsp action tags
  • Verify that unknown attributes are warnings for jsp action tags
  • Verify custom tags with tag-dependent body content (like SQL statements) are left alone
Test editing tag files
 

Ensure ability to edit tag files and proper content assist proposals appear.

Source Editing Test Plans
 

org.eclipse.wst.sse
org.eclipse.wst.xml
org.eclipse.wst.html
org.eclipse.wst.css
org.eclipse.wst.dtd
org.eclipse.wst.javascript
org.eclipse.jst.jsp