One wisecrack goes that "Java is to JavaScript as car is to carpet".
JavaScript is a completely different language. It does its magic in the browser, so it makes a nice complement to the server side language of your choice.
Often the layers on the client side are described somewhat like this:
HTML: markup/content
CSS: design/layout
JavaScript: behavior
On the server side you would choose between either Java, PHP or another language entirely. There are many. PHP has some similarities with Java, in that it can be coded in an object oriented manner (at least as of PHP 5), and the syntax is somewhat similar. PHP is often considered easier for beginners, because it is pretty forgiving. This also means that it is far easier to mangle things and end up with a good mess of spaghetti code.
JSP and Servlets is Java for the web.
J2EE is the name of one of the Java Platforms (Enterprise Edition). There is also the Standard Edition. You choose one - and then you write your Java code using it.
If you choose to write a web application using Java you will need a web container, such as
Tomcat or Orion. Or if you are going to use PHP, then you will probably need Apache.
If there is already a server where you are expected to put your code, then I would ask what technologies they support.
I'm sure several others will chime in with even better explanations
Best of luck with your project!