| Author |
Apache Tomcat 5.0 woes.
|
Stephen Hathorne
Greenhorn
Joined: May 20, 2004
Posts: 1
|
|
Folks- 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 PUBLIC " <web-app xmlns="http://java.sun.comxml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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> <servlet> <servlet-name>test_jsp</servlet> <servlet-class>test_jsp</servlet> <servlet-mapping> <servlet-name>test</servlet> <url-pattern>/test.jsp</url-pattern> </servlet-mapping> </web-app> ....My jsp file is nothing more then <html> <head> <title>test jsp</title> </head> <body> 1 + 1 is: ${1 + 1} </body> </html> ----- 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... Sincerely, Stephen L. Hathorne slh@rdi.net
|
 |
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: $CATALINA_HOME/webapps/ROOT/foo.jsp <html> <body> <%= "Hello World" %> </body> </html>
|
 |
 |
|
|
subject: Apache Tomcat 5.0 woes.
|
|
|