• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Help with Beer-v1 web application from Head First Servlets and JSP

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a question from the Head First Servlets and JSP book. I solved
the problem that I had as I was creating this post, but I decided to submit it anyway because other people might be having the same problem.

I successfully installed Apache Tomcat version 5.0.28 (along with J2EE and Java standard edition) on a computer with Norton AntiVirus and the Windows XP operating system (with all of the available bug fixes and security updates). When http://localhost:8080/ is entered into the address text field of the Internet Explorer 6 web browser, the default "you've setup Tomcat successfully" page is displayed. (Apparently, I also
correctly set the environment and class path variables for the two versions of Java and Tomcat.)

So then I created the form.html file and put it into the directory:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\Beer-v1.
Then I would enter http://localhost:8080/Beer-v1/form.html in IE6, but
the form would not display, (only the default error page). So I rebooted
my computer several times and cleared the cookies, temporary files, and
history information from IE6. I still could not get the form.html page to display, so I put a copy of form.html in the ...webapps\servlets-examples folder. Typing http://localhost:8080/servlets-examples/form.html in IE6 got the form.html page to display.

However, I tried one more time to get the form.html to display from the Beer-V1 directory and it finally worked. (I also passed the previous version of the SCWCD exam with a good score, so I'm not a total beginner to servlets and JSP).

Does any one know why the example in the book would not work and then finally work after several attempts? Also, the examples in the book appear
to be for a Unix or an Apple computer, and the instructions for getting Tomcat had a minor error, but I was able to easily solve those issues.
I thought the answer to the problem might require setting permissions for
the folders and/or users on my computer.

Paul Heckman
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul Heckman,
This is not regarding the problem you posted.I need a help for my problem.I have been trying you setup Tomcat 5.0.28.But i couldn't make it.On startup it is throwing hell lot of exception.
Can you share with me what kind of problems you faced and the remedies for the problems.

Thanks & Regards,
Sreedhar
 
Paul Heckman
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sreedhar,

I'm not an expert in Tomcat nor J2EE, but I was able
to intall and use Tomcat 5.0 and J2EE and work the examples
from chapter 1 of the Head First Servlets & JSP (I'm now half
way through the book). Probably the most common error is that
Tomcat may be automatically running on a computer. (I'm assuming
that you use Windows). So every time a computer is turned on or
rebooted, Tomcat is running. And if you attempt to restart it
by running the Startup.bat file, you will get numerous errors
listed from the DOS window. To find out if Tomcat is running,
right click the Task Bar, (the menu bar with the Start button
that is usually on the bottom of the screen) and then right or
left click the menu option named 'Task Manager'. Look for
tomcat5.exe to see if it is in the list under the Processes
tab in the column titled 'Image Name'.
There may be countless other errors why Tomcat will not run.
1) Class paths may not correctly indicate where where Tomcat,
J2EE and J2SE are intalled.
2) Missing files from the Windows Operating system caused by
malicious viruses that are designed to delete files requied
to run Tomcat and or Java on a Windows platform (anti-Microsoft
geeks believe that no one should be able to use Java or Tomcat
with Windows.)
3) Programs such as Norton Utilies (I'm not sure of this reason,
but I think it is a security issue).
4) You may be starting the Startup.bat or Startup.sh file when
the other is required (one is for Windows, the other for Unix).

To make a long story short I would have to take a look at the
errors you are getting, the environment variables, and the directories
where you intalled Tomcat, J2EE and J2SE. Let me know if you have
any more questions or if any of my gabbering makes sense.

Paul Heckman

P.S. I live in Sunnyvale, CA and you are close by I could take a
quick look at your computer.
 
What's that smell? I think this tiny ad may have stepped in something.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic