[thelist] JSP help please

Hassan Schroeder hassan at webtuitive.com
Tue Jan 13 14:31:13 CST 2004


Tom Dell'Aringa wrote:

>>Are you using taglibs/JSTL or scriptlets?
> 
> Don't know what that means, and I am using scriptlets.

JSTL == JSP Standard Tag Library
	<http://java.sun.com/products/jsp/jstl/>
There are also alternative Apache open source taglibs:
	<http://jakarta.apache.org/taglibs/index.html>

If you're not currently using taglibs, you really should check
'em out -- makes your development easier and more maintainable.
Simple example:

scriptlet:
<%
	if ( request.getServletPath().equals("/what/iwant.jsp"))
	{
%>
	yes, we're here
<%
	}
%>

JSTL:
<c:if test="${pageContext.request.servletPath eq '/what/iwant.jsp'}">
	that's what I'm talkin' about!
</c:if>

FWIW,
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.





More information about the thelist mailing list