Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Basic question

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just configured Tomcat 4.0.3 and was able to get the tomcat up and running. I tried to compile a simple servlet and I ran into compilation problem.
I have put my servlet in
c:\servletdevel\HelloServlet.java
I have set the class path and put in autoexec.bat as
set CLASSPATH=.;c:\servletdevel;c:\tomcat\common\lib\
servlet.jar.
when I tried to compile it is not recognizing the package import javax.servlet.http.*;.
Can anybody let me know is there something i missed out in classpath setting.
Thanks in advance
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
i also got the same problem when i first tried to run my servlet and here is my way of getting out of that
set classpath=c:\tomcat\common\lib\servlet.jar and dont write anything else in that line
i.e. only define single class path
for your servlets to be eligible to run .. you need to put them in tomcat/webapps/examples/web-inf/classes and your html files in tomcat/webapps/ROOT
there are ways to store that files in your own directory by playing with server.xml ... but first to keep things simple you should not try that out
hope this helps
 
Rajeev Nair
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Faraz. I did the same and was able to get the stuff compiled. Let me know how to play around with server.xml.
Thanks
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When your servlets get more complicated and need additional libraries, look into the ANT utility to control the compilation. ANT makes it easy to set up classpaths for the compiler without changing your environment variables. Find ANT at:
http://jakarta.apache.org/
Bill
 
Rajeev Nair
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the info Bill
 
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic