• Post Reply Bookmark Topic Watch Topic
  • New Topic

Apache Tomcat 5.0 woes.  RSS feed

Stephen Hathorne
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have put Tomcat 5.0.24 on Fedora Core 1. All the the examples work,
I even download the O'Reilly book jspbook3.zip 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="http://java.sun.com/xml/ns/h233 http://java.sun.com/xmlj2ee/web-app_2_4.xsd" 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.

so...to 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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" %>
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!