Monday, July 26, 2010

Oracle Web Tier Tools (OEPE)

or
Part of Oracle Enterprise Pack for Eclipse 11.1.1.5.0 (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}"
pageEncoding="${encoding}"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />
<title>Insert title here</title>
</head>
<body>
<f:view>
${cursor}
</f:view>
</body>
</html>


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.


Beware:
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