Monday, July 26, 2010

Oracle Web Tier Tools (OEPE)

Part of Oracle Enterprise Pack for Eclipse (OEPE)

I have commented on encoding issues in JDeveloper and today I have reached the same point in the Eclipse-OEPE environment.

First the good news is that OEPE let's you choose form many templates combining language (html,xhtml) of source markup, doctypes and final output doctype in
File/New/JSP Page/(Use JSP Template) and configure the templates the easy way
Window/Preferences/Web/JSP Files/Templates.

My chosen one the "New JavaServer Faces (JSF) Page (xhtml)"
will produce this:

<?xml version="1.0" encoding="${encoding}" ?>
<%@ page language="java" contentType="text/html; charset=${encoding}"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xmlns:f="" xmlns:h="">
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />
<title>Insert title here</title>

What is the ${encoding} in this template ?

In per project scope it is
Project/Properties(ALT+Enter)/Resource/Text file encoding.
Select UTF-8 of course.

Next step is to customize the predefined templates to more resonable markup
but at least,
you have an easy chance to do so.
In jDeveloper I'm quite missing (or did not find) this EASY WAY.

not every template uses the ${encoding} param,
for example this one:
"JSP with xhtml markup, xml style syntax and default view setup"
has ISO-8859-1 (windows-1252 ?) hardcoded ;-(

No comments:

Post a Comment