// shall I write some keywords here to boost search engine ranking?

Showing posts with label JSP. Show all posts
Showing posts with label JSP. Show all posts

Tuesday, September 25, 2007

Simple JSP Internationalization with JSTL

Many MVC framework come with Internalization (i18n) support. But what I have is a pure JSP, Model 1 webapp, so those framework is not my choice.

I had Google on i18n for JSP. The examples found are more complicated than my expectation, and very likely will make the JSP code I have currently become more messy.

Then taglib come into my mind, I do some google on i18n by taglib, and found JSTL format (fmt) tags is i18n capable. After some copy and paste from a few webpages, I had compile a simple guide:

By the way, i18n simply means internalization. The 18 refer to number of characters between 'i' and 'n' in the word 'internasionalization'.

Friday, November 04, 2005

Include Page Dynamically in JSP

<jsp:include page="<%= url %>" flush="true" />
<%@ include file="<%= url %>" %>

Ever think of include a dynamic page with method above where 'url' is a String of page to include? This will sure end with dissapiontment cause it doesn't work in JSP (and ASP as well).

However, JSP have the 3rd way to include a page:
<% pageContext.include(url); %>

Maybe this is not good practice to have lots of Java code within JSP. So if you have any better ways, please share it with me. Thank you. :)