• Post Reply Bookmark Topic Watch Topic
  • New Topic

Learning Servlets  RSS feed

 
Bill foster
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
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
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: 66307
    152
    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.
     
    Dave Tolls
    Ranch Foreman
    Posts: 3068
    37
    • 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
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!