Twitter
Products / Projects
Non-Tech
  • The MIDI Manual: A Practical Guide to MIDI in the Project Studio
    The MIDI Manual: A Practical Guide to MIDI in the Project Studio
    by David Miles Huber
  • Principles of Digital Audio
    Principles of Digital Audio
    by Ken Pohlmann
  • Design Patterns: Elements of Reusable Object-Oriented Software
    Design Patterns: Elements of Reusable Object-Oriented Software
    by Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides
  • The Art of Computer Programming Boxed Set (Volumes 1-3)
    The Art of Computer Programming Boxed Set (Volumes 1-3)
    by Donald E. Knuth
  • Cocoa(R) Programming for Mac(R) OS X
    Cocoa(R) Programming for Mac(R) OS X
    by Aaron Hillegass
  • Core Animation for Mac OS X and the iPhone: Creating Compelling Dynamic User Interfaces
    Core Animation for Mac OS X and the iPhone: Creating Compelling Dynamic User Interfaces
    by Bill Dudney
Main | High Speed Internet in Canada Sucks »
Monday
14Dec2009

Maven Users: Update Your web.xml files to 2.4 to use JSTL Tags

I came across a tricky problem today.  I had used Maven to create a simple Java web application that I have been building upon.  I got to the point where I wanted to use some JSTL tags in my presentation layer.  Oddly enough the raw tags were being ignored and showing up in the HTML output.   The problem turned out to be the usage of an older version of the web.xml file that Maven had generated.  The 2.3 version uses a Doctype, and does not support the JSTL tags:

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

If you want your web app to process JSTL tags, you should update this file to use a 2.4 syntax instead. The 2.4 version uses an XML schema instead of DTD to validate, so remove the above mentioned section and replace with the following:

<web-app id="myApp" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (1)

Various spheres of our life consume lots of time, thence why have we to expend life time for term research paper accomplishing? It is greater to utilize really professional classification essay writing service to buy the literature term paper from, I guess.

February 16, 2010 | Unregistered CommenterSOPHIE35

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>