• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Learning Servlets  RSS feed

 
Ranch Hand
Posts: 66
Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have went through a basic Java course and algorithm course. I was wondering if I need to learn HTML, CSS and Javascript before learning servlets.

Thanks!

Bill
 
Author and ninkuma
Marshal
Posts: 66806
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, given that the whole points of servlets is to create a web app, if your apps are going to have user interfaces you'll need to learn at least the basics of HTML5 before you can do anything useful. Also, be aware that you'll need JSP to create the views to front your servlets (generating HTML in the servlet itself is not a good idea).

Here are some articles that might be helpful:
  • The Secret Life of JSPs


  • The Front Man

  • The second may be a bit advanced if you are just starting out to learn servlets, but it might be a good idea to read through it and gather what you can and get an overview of how to properly structure Java web applications. Then, at a later date, you can revisit it again to understand the details.
     
    Bill foster
    Ranch Hand
    Posts: 66
    Java
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks Bear, I love your analogy using the county clerks describing static and dynamic documents. I'm going to have to get Apache Tomcat server as well to run JSP and Servlets.

    Do you have any information on setting up Apache on a Win machine?

    I think the Heads First Servlets and JSP, would be a great book to have.

    Thanks again for all your knowledge.

    Have a great day!

    Bill
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Posts: 66806
    168
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Bill foster wrote:Do you have any information on setting up Apache on a Win machine?



    Sorry, I'm a Mac guy.

    But, don't confuse Tomcat and "Apache". The term "Apache" is usually used to mean the Apache Web Server, which will not serve servlets and JSP.
     
    Master Rancher
    Posts: 3631
    40
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Download the version of Tomcat you can just unzip, not the Windows installer version, which will set it up as a service which I find not too helpful as a dev thing.

    There's a startup.bat in the bin folder, which should start it up if the JAVA_HOME has been set for your JDK.
    I don't think there's any other environment variables needed to just start it up.
     
    Bill foster
    Ranch Hand
    Posts: 66
    Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks Dave for your input, I want to show how to do this to students who are in programming class.
    They were asking how to learn web app development with Java, and I showed them a you-tube video .
    Now the students are excited!

    I have experience on setting up MAMP on Win 10, but never had to install Tomcat.

    I just wanted to get the skinny on this topic.

    Thanks again!

    Bill
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!