The moose likes Tomcat and the fly likes Apache Tomcat 5.0 woes. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache Tomcat 5.0 woes." Watch "Apache Tomcat 5.0 woes." New topic

Apache Tomcat 5.0 woes.

Stephen Hathorne

Joined: May 20, 2004
Posts: 1

I have put Tomcat 5.0.24 on Fedora Core 1. All the the examples work,
I even download the O'Reilly book files from the JavaServer Pages book. These examples work well.

I created a sub directory, /usr/local/tomcat5.0/webapps/myApp
with /WEB-INF/web.xml

web.xml below
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
<web-app xmlns="http://java.sun.comxml/ns/j2ee"
xsi:schemaLocation="" version="2.4">

<display-name>TEST JSP!</display-name>
<description>First JSP Thang</description>

....My jsp file is nothing more then

<title>test jsp</title>
1 + 1 is: ${1 + 1}



I copied this file into the Tomcat $CATALINA_HOME/webapps/ROOT/test.jsp

and it works, but it renders: 1 + 1 is: ${1 + 1}

I thought perhaps I missed something so I copied the example from the
Tomcat Distribution jsp2.0 (basic-arithmetic.jsp) it does the same thing. my question

a) given any simple jsp (not jdbc etc yet &^) How do I configure a new
application (for example myApp directory)

I presume that I missing a few things here. Any help would be appreciated,
but I am looking for Knowledge Transfer.

Thanks in advance, I have spent the last week doing web searches, looking
through books and I still haven't got it...


Stephen L. Hathorne
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

two questions:

1) Why are you configuring anything in web.xml ? Your JSP page ought to be recognized 'as is', without a mapping.

2) What is ${1 + 1} ? Is it EL ? Can EL be like that in the newest JSP spec? (just all by itself, alone without any EL imports of any kind?)

Just for the heck of it, does a jsp page work like this:


<%= "Hello World" %>
I agree. Here's the link:
subject: Apache Tomcat 5.0 woes.
jQuery in Action, 3rd edition