Skip to content

Add documentation to Spring MVC/JSP/JSTL integration regarding webapp versions [SPR-3695] #8376

@spring-projects-issues

Description

@spring-projects-issues

Peter Mularien opened SPR-3695 and commented

A very common issue with new adopters of Spring MVC is confusion over how to get JSTL working in their application server. Although the Spring docs can't possibly cover every application server, since I try to help out newbies on the forums, I've noticed a few common problems/pitfalls that might be worthwhile to document in section 14.2 of the documentation.

The basis for some of this is that for a lot of people, when using Spring MVC, they are also attempting to use JSTL for the first time. So although some of the blame for these common issues falls on Sun, I think it would be worthwhile to cover some of them in the Spring docs, because people ultimately come to the Spring Web forums to get them solved (thinking that they are Spring problems).

Here's a few suggestions, feel free to document some or all of them.

The most common problem is people trying to use JSTL without declaring their web application as a servlet 2.4 (or higher) web app. In compliant application servers (most commonly reported is Tomcat), this will disable JSTL 2.0 evaluation. The documentation should provide an example web.xml snippet illustrating where the webapp version is set, and indicate the minimum required version to get JSTL 2.0 evaluation (a list of app servers supporting this would be nice, too ;) ).

There are many, many threads in the Spring Web forum regarding this confusion. Do a search with the terms "+jstl +version". Examples:
http://forum.springframework.org/showthread.php?t=35085&highlight=jstl+version
http://forum.springframework.org/showthread.php?t=38850&highlight=jstl+version
http://forum.springframework.org/showthread.php?t=27858&highlight=jstl+version
... etc.

Another common problem is people being confused over which JSTL taglib declaration to use, and how to reference JSTL within the page.

More documentation on how to set up JSTL with MessageSourceAccessors, along with an example.

I can't think of anything else at the moment, but I'd suggest reviewing some of the recent forum postings for ideas on additional topics. I always found it kind of odd that the documentation for how to use Spring with FreeMarker is more dense than the docs for Spring + JSP/JSTL :)

Part of the problem (I think) is that the only MVC tutorial that's on the web site (step-by-step) is extremely outdated. It would be great if we could put together an example that is as simple, while being updated for Spring 2.x (but that's the topic of another JIRA).

Let me know if I can help at all with this effort.


Affects: 2.0.6

Referenced from: commits 89d997a

4 votes, 5 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions