Fixed diacritics input/display issue. The useUnicode and characterEncoding parameters had to be added to the query string of the URL for the JDBC Connection instead of inside parameter elements in the JNDI Resource.

This commit is contained in:
travismccauley 2003-10-30 00:05:39 +00:00
parent 1315e8d7ba
commit fb45cb42c3
31 changed files with 57 additions and 44 deletions

View file

@ -11,7 +11,7 @@
<!-- DBCP database connection settings -->
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/Lex</value>
<value>jdbc:mysql://localhost/Lex?useUnicode=true&amp;characterEncoding=UTF-8</value>
</parameter>
<parameter>
<name>driverClassName</name>
@ -25,14 +25,6 @@
<name>password</name>
<value>password</value>
</parameter>
<parameter>
<name>useUnicode</name>
<value>true</value>
</parameter>
<parameter>
<name>characterEncoding</name>
<value>utf-8</value>
</parameter>
<!-- DBCP connection pooling options -->
<parameter>

View file

@ -21,11 +21,21 @@
<filter-class>org.thdl.lex.GuestFilter</filter-class>
</filter>
<filter>
<filter-name>charEnc</filter-name>
<filter-class>org.thdl.lex.CharEncFilter</filter-class>
</filter>
<filter>
<filter-name>component</filter-name>
<filter-class>org.thdl.lex.LexComponentFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>charEnc</filter-name>
<url-pattern>/action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>authentication</filter-name>
<url-pattern>/action</url-pattern>

View file

@ -90,9 +90,6 @@ public class LexActionServlet extends HttpServlet
*/
public void service( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException
{
res.setContentType( "text/html; charset=UTF-8;" );
req.setCharacterEncoding( "UTF-8" );
/*
LexLogger.debug( "Checking Request state at start of LexActionServlet.service()" );
LexLogger.logRequestState( req );

View file

@ -138,7 +138,11 @@ public class LexComponentFilter implements Filter
long start = System.currentTimeMillis();
if ( request instanceof HttpServletRequest && response instanceof HttpServletResponse )
{
HttpServletResponse res = (HttpServletResponse) response;
HttpServletRequest req = (HttpServletRequest) request;
res.setContentType( "text/html; charset=UTF-8;" );
req.setCharacterEncoding( "UTF-8" );
if ( null != req.getParameter( LexConstants.LABEL_REQ_PARAM ) )
{
String labelValue = req.getParameter( LexConstants.LABEL_REQ_PARAM );

View file

@ -76,11 +76,15 @@ public class InsertCommand extends LexCommand implements Command
if ( CommandToken.isValid( req ) && validate( user, component ) )
{
LexComponentRepository.update( term );
if ( !isTermMode() )
{
LexComponentRepository.update( term );
}
if ( isTermMode() )
{
term.populate( req.getParameterMap() );
component = term;
term = (ITerm) component;
//term.populate( req.getParameterMap() );
}
else if ( component instanceof AnalyticalNote )
{

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:set var="encyclopediaArticle" value="${ sessionScope.visit.helper.component }"/>

View file

@ -1,6 +1,7 @@
<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" pageEncoding="UTF-8" contentType="text/html"%>
<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<% request.setCharacterEncoding("UTF-8"); %>
<% request.setCharacterEncoding("UTF-8"); %>
<!--Begin Render-->
<jsp:include page="header.jsf" flush="false"/>
@ -118,6 +119,8 @@
</p>
</form>
<p><span class="warning">The requires the <a href="http://iris.lib.virginia.edu/tibet/tools/tmw.html">TibetanMachineWeb font</a> to display Tibetan script.</span></p>
<div id="entry">
<c:choose>
<c:when test="${ param.comp == 'encyclopediaArticle' && param.cmd == 'display' }">

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,5 +1,6 @@
<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:include page="header.jsf" flush="false" />

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:set var="function" value="${ sessionScope.visit.helper.component }"/>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,4 +1,4 @@
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:set var="isNote" value='${ sessionScope.visit.helper.component.label == "analyticalNote" }'/>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:if test="${ sessionScope.visit.helper.showNotes }">

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:set var="spelling" value="${ sessionScope.visit.helper.component }"/>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!--displayTerm.jsf-->
@ -39,7 +39,7 @@
<jsp:include page="displayNotes.jsf" />
</p>
</p>
<!--END TERM-->

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!--displayTransitionalData.jsf-->

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8"%>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!--displayTree.jsf-->

View file

@ -1,4 +1,4 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" contentType="text/html; charset=UTF-8" %>
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!--displayTreeToc.jsf-->

View file

@ -1,6 +1,5 @@
<%@ page import="org.thdl.lex.LexLogger" contentType="text/html; charset=UTF-8" %>
<%@ page import="org.thdl.lex.LexLogger" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix = "req" uri = "http://jakarta.apache.org/taglibs/request-1.0" %>
<%-- <c:if test="${ ! empty sessionScope.visit.user }">
<c:if test="${ sessionScope.visit.user.developer }">

View file

@ -4,7 +4,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8;" />
<script type='text/javascript' src='/lex/js/lex.js'></script>

View file

@ -1,6 +1,7 @@
<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:include page="header.jsf" flush="false" />
<!--menu.jsp-->
<c:set var="editMode" value="${ false }" />
@ -80,7 +81,7 @@
</p>
<c:if test="${ ! empty message }">
<p id="message">
<c:out value="${ message }" />
<c:out value="${ message }" />
</p>
</c:if>
@ -88,6 +89,7 @@
<div id="recentTerms">
<c:forEach var="term" items="${applicationScope.global.recentTerms }">
<p class="tmw-block">
<span class="warning">The requires the <a href="http://iris.lib.virginia.edu/tibet/tools/tmw.html">TibetanMachineWeb font</a> to display Tibetan script.</span><br/>
<c:set target="${ sessionScope.visit.helper}" property="wylie" value="${ term.term }"/>
<c:set var="tib" value="${ sessionScope.visit.helper.tibetan } " />
<c:out value="<a class='tmw-link' href='/lex/action?cmd=displayFull&comp=term&metaId=${term.metaId}'>${ tib } </a>" escapeXml='false' />

View file

@ -1,4 +1,4 @@
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<ul class="navLinks">
<li>

View file

@ -1,5 +1,6 @@
<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %>
<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!--termForm.jsf-->
<c:out value='<a name="${ component }" ></a>' escapeXml="false" />
<c:choose>