Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Why tomcat act like it error?  RSS feed

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use tomcat 5.5.20 and I following the chapter8 of HFSJ book. In the "type attribute" topic (page 353-355)
This is my servlet code.


and "attribute code"


and the result.jsp code



The problem is: when I use the above result.jsp the container will produce the error page. But if I modify the .jsp file to



Then the .jsp page will work fine and show the result without error.

Even if I edit the servlet code from



TO



The page is also work fine, even though the "new Person();" is exactly wrong syntax for java (Person is abstract class) but it work.

I don't understand the tomcat behavior, that act not according to the book.

PS. I recompile the code every time I change it, so it is not the "version" relate problem.

Thank you
Tanakorn
 
pie sneak
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your Tomcat error logs. It should provide you with more information about when the error happens.
 
Anything worth doing well is worth doing poorly first. Just look at this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!