Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

jsp:include and <%@ include, UTF-8

jsp:include will dynamically detect any changes made to the included file. So in general, it is better to use jsp:include than the include directive.

There is another advantage. If the included file contains UTF-8 characters that are other than ASCII, then using jsp:include will ensure these characters displaying correctly. However, if the included file is a JSP file, you'll need to put this at the beginning:
<%@ page language="java" %>
<%@ page contentType="text/html;charset=UTF-8" %>
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed