You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "van Hilten, Clive" <cl...@misys.com> on 2001/11/21 12:41:11 UTC

cHTML through Tomcat

Good day all

environment: Windows 2000 Server with SP1, Tomcat 3.2, Apache 1.3.19,
JDK 1.3.0_02

background: I am doing some development work getting JSP to create
simple, dynamic cHTML code for display on iMode devices. 

Full error message:
=======================================
2001-11-21 10:57:39 - Ctx( /examples ): 404 R( /examples +
/jsp/imode/i.jsp + null) JSP file not found
=======================================

problem: Tomcat reports that it cannot find 'imode/i.jsp'. However, if I
copy another JSP ('good' JSP, see below) I have written and place it on
the same path and give it the same filename, it is found and is compiled
okay (note that this working JSP creates WML code rather than cHTML).
Therefore Tomcat is loading the context properly from the server.xml
file. 

I therefore conclude that my Tomcat installation is correctly configured
(it has been working fine for about 6 months), and the problem must be
with this particular JSP file. I have searched through the FAQ and
various usenet groups without success. I feel it must be a simple
problem, because this particular JSP was being compiled by Tomcat with
no problems before I decided to make a few changes related to the DTD.
I've checked my current DTD against the DTD for cHTML at w3.org and it
is correct. I have tried the backup copy I made before I made the
changes, but without success. 

Here is the faulty JSP:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD Compact HTML 1.0 Draft//EN">
<%response.setContentType("text/html");%>
<%@ page contentType="text/html;charset=SHIFT-JIS" %>
<% response.setHeader("Cache-Control", "must-revalidate, no-store"); %>
<html>
<body>
		<p align="left">
				<form action="asignon/signon.jsp"
method="get">
				username:
				<input type="text" name="user">
				<br>
				password:
				<input type="password" name="pass" >
				<br>
				<input type="submit" value="sign on">
				<input type="reset" value="clear">
			</form>
		</p>
</body>
</html>


Here is the 'good' JSP:

<%response.setContentType("text/vnd.wap.wml");%>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<%@ page contentType="text/vnd.wap.wml;charset=ISO-8859-1" %>
<% response.setHeader("Cache-Control", "must-revalidate, no-store"); %>
<wml>
<card id="user" title="login">
		<jsp:include page="ainclude/prev.jsp" flush="true" />
		<p align="left">user name:<input name ="un"
maxlength="10" format="*m"/>
		<br/>password:<input type="password" name ="pw"
maxlength="4" format="4N" />
		<br/>
			<anchor>
			<go href ="asignon/signon.jsp" method="get">
					<postfield name="user"
value="$(un)"/>
					<postfield name="pass"
value="$(pw)"/>
				</go>
				sign on
			</anchor>
		</p>
</card>
</wml>


Any comments would be welcome!

Thanks.

Clive



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>