• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

I did a search, but apparently this has never happened before:

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did a search, but apparently this has never happened before:
I am doing the head first jsp and servlets book
chapter 3, the mini-mvc tutorial

i am at the point where i test my servlet, BeerSelect

My browser looks good at
http://localhost:8080/Beer-v1/form.html

I get the beer selection page,
i can even pick a color.
When i pick brown (or any color), then click 'submit query',
nothing happens!


it says there, on page 81, that i should get something like
'beer selection advice' 'got beer color brown'

but in fact, nothing happens.

I've double checked all my stuff, and everything seems to be in the
right places. i got this far, didnt i?

I stop and start tomcat.

this is what the logs tell me, is this a bad thing?

the log is c:\tomcat\logs\localhost.2006-03-27

here it is,

Mar 27, 2006 5:09:37 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class listeners.ContextListener
java.lang.ClassFormatError: Extra bytes at the end of class file listeners/ContextListener


any clues?
 
Victor Flores
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, the book keeps saying to start tomcat like this:
cd tomcat
bin/startup.sh


i do not have a file called startup.sh
i am on windows xp.
i downloaded and reinstalled tomcat a bunch of times, till i realized
that the sh files must be for another os.

i am in xp, all i have to do is start and stop from here:
C:\tomcat\bin\tomcat5w.exe

i know my stop/start works, because when i stop it, i dont get the
'beer selection' page in my browser, and when i start it, then
i do get my beer selection page.
My problem seems to be that i am just not invoking the servlet
at all!
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May bethis will help you.
 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This problem has, in fact, been reported and discussed on this very forum in the apache/tomcat section. Here is the link https://coderanch.com/t/84426/Tomcat/Error-configuring-application-listener-class

(I just googled the error and got that page as the first response)
 
Victor Flores
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Lalitha and Emanuel, i have tried everything in your links,
and still my problem is not fixed. I will keep trying and post back
when i figure it out (IF i figure it out).

I think my problem can now be summarized as follows:

i have installed Apache Tomcat/5.5.16
i point my browser to http://localhost:8080/, which works fine: it
brings me to the tomcat home page.

The page has a link on the left side to 'JSP Examples'
If i click on it, i get this:
===========================================================================
HTTP Status 404 - /jsp-examples/
description The requested resource (/jsp-examples/) is not available.
===========================================================================

I dont think i am missing anything in my install,
in fact i see a bunch of directories under:
c:\tomcat\webapps\jsp-examples

 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at the logs in the tomcat/logs directory.
If you've been trying for a while, they could be long.
You might want to: stop tomcat, delete all the logs from that directory, restart, and try hitting it again. Then look at the logs for a stack trace that might point you to the error.
 
Victor Flores
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i stopped the tomcat service
i deleted all the logs
i restarted the tomcat service
these are the first 5 lines of the 'localhost' log (it goes downhill from here)

Mar 29, 2006 10:02:10 AM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain:

[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com],

[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue /

Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:

http://jakarta.apache.org]]
Mar 29, 2006 10:02:10 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class listeners.ContextListener
java.lang.ClassFormatError: Extra bytes at the end of class file listeners/ContextListener

 
Emanuel Kadziela
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I googled the second line of your error and got this interesting tidbit:
http://www.nabble.com/tomcat-examples-t1307951.html

According to some people responding to the above, the 5.5.16 executable release is broken. Try the zip installation or an earlier version.
 
Victor Flores
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok. THAT WORKED!

I guess there is a problem with the tomcat 5.1.16 binary distribution Windows executable, which is in fact the install i had done numerous times!

I did the zip instead, and now i can see the examples, click on them.
they appear to be working.

Thank you emanuel for pointing that link. I swear it wasnt there just the other day. It is a pretty recent event.

 
Victor Flores
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
============================================================
ok, now i can do click the examples, and that's fine....
but that's not what i wanted to do. (i even played "guess what
number")

What i really want to do, is just the first example in the
book, and i cant do it!

example from hf servlets & jsp, page 31
i should type http://localhost:8080/Ch1/Serv1

and what i get is this:
=============================================================
HTTP Status 404 - /Ch1/Serv1
The requested resource (/Ch1/Serv1) is not available.
Apache Tomcat/5.5.16
=============================================================

i have web.xml in
c:\tomcat\webapps\ch1\WEB-INF

and i have Ch1Servlet.class in
c:\tomcat\webapps\ch1\WEB-INF\classes

i have stopped and started tomcat


When i look at the logs, i can see that as soon as i start tomcat,
i get this error logged in the catalina log:

Mar 29, 2006 4:38:24 PM org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 1 column 14: Element type "web-appxmlns" must be followed by either attribute specifications, ">" or "/>".
org.xml.sax.SAXParseException: Element type "web-appxmlns" must be followed by either attribute specifications, ">" or "/>".



What is that?


i did a google on "Element type web-appxmlns"
and i get nothing....(what do you call that???when you google something
and you get ABSOLUTELY NOTHING?)


 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MSN search quite better, it gives some results:
http://search.msn.com/results.aspx?q=Element+type+web-appxmlns&locale=en-us&FORM=I7AW
 
He's my best friend. Not yours. Mine. You can have this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic