tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david ziants <dzia...@013.net>
Subject RE: Cannot transform and load jsp file with Tomcat under Eclipse
Date Wed, 01 Feb 2006 09:35:01 GMT
Thank you for your responses Vinu and Chuck 

I got rid of the definition as Vinu suggested, and it seems that I do not have to have any
context.xml in the META-INF for the app.
The jsp file appears in my browser window, except it doesn't evaluate the jsp expression I
include. Maybe you can tell me that I have a simple jsp error... 
As jsp works by creating an intermediate HttpServlet class, how can I view the source of this
to work out what is going on?

This problem was my original problem, which prompted me to try and add the servlet definitions.
My simple jsp example is below.

-- 
David Ziants 
dziants@013.net 

PS Please could responses also be CCed to my email address: dziants@013.net 
This is because I receive this discussion group in digest mode, and I don't know how frequently
the archives are
updated.
==============================================================================================
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
The date is:
<%=new java.util.Date().toString() %>
More text
</body>
</html>
--
David Ziants
dziants@013.net

==============================================================================================
Hi David,
Just put your jsp files to 'D:\eclipse_ws_swing\MusarAvicha' directory 
and remove the
 <servlet>
      <servlet-name>showlogin_jsp</servlet-name>
      <servlet-class>showlogin_jsp</servlet-class>
      <load-on-startup>6</load-on-startup>
  </servlet>

from your web.xml. Then try to access the jsp files thru the browser.

- Regards
Vinu

David Ziants wrote:

> This is the first time I have had to do my own configuration of tomcat 
> (5.5) using eclipse (3.1) and Java 5, and I am having a few teething 
> problems.
>
> Everything is installed under Windows XP. I just took the latest 
> release of Tomcat as I see there ought to be proper support for Java 5 
> which I am using for my project.
>
> I wish to write a JSP and also a servlet, and I added markups to my 
> WEB-INF/web.xml :

==============================================================================================

----- Original Message -----
>From "Caldarale, Charles R" <Chuck.Caldarale@unisys.com>
Date Tue, 31 Jan 2006 15:40:32 -0600
To Tomcat Users List <users@tomcat.apache.org>
Subject RE: Cannot transform and load jsp file with Tomcat under Eclipse
> From: David Ziants [dziants@013.net] 
> Subject: Cannot transform and load jsp file with Tomcat under Eclipse
> 
> I also added META-INF\context.xml file:
> ==========================================================
> <?xml version="1.0" encoding="UTF-8"?>
> <Context path="D:\eclipse_ws_swing\MusarAvicha"/>
> ==========================================================

The path attribute is not used when the <Context> tag is in
META-INF/context.xml, nor when inside a
conf/Catalina/[host_name]/[app_name].xml file.  It may only be used when
your <Context> is configured in server.xml, and then it gives the
web-visible name of the app, not where the app is stored in your local
file system.  Perhaps you meant to use the docBase attribute.  Suggest a
close reading of the doc:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

 - Chuck






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message