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

Where to put Servlets, JSPs and HTML documents...

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where should I place my servlets and JSPs with tomcat to run??? Also, what should be the location of HTML files... and depending on that location what would be right call to invoke that servlet or jsp(http://localhost???)
Hoping for early and comprehensive reply.
Tanveer
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tanveer,
*place your jsp pages and their html files on the following path:
tomcat_home\webapps\examples\jsp
note that you may create folders under the same path also.
**place your *.class files of your servlets under the path:
tomcat_home\webapps\examples\web-inf\classes
and place the html pages that call them under the path:
tomcat_home\webapps\examples\servlets
***call your servlet from the browser by typing the following
address in the title bar:
http://localhost:8080/examples/servlet/YourServletClassName
note that if you want to call the html file of your servlet,
you need the following address:
http://localhost:8080/examples/servlets/YourHtmlPage
and if your class files are in the expected directory, they
are going to be called automatically when the html page
requests one of them
Waiting for your commints...
Regards,
Jimi.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic