简体   繁体   中英

Do I need to have Java installed on my local machine to run a website that uses JSP pages?

This is probably a stupid question but I know nothing about Java. Did a quick google and found nothing...

If "running a website" means serving it, then yes. If it means viewing the website, then no (unless it contains Java applets, but that's orthogonal to your question).

It's not necessary, JSP is a server side technology that generally speaking responds to http requests with html (or images/css/javascript).

As long as you have a client in your machine that can send http requests and read the responses ( a web browser for example), you can perfectly use a JSP application.

The only case when you will need to have java runtime in your local machine, is if you are connecting to a page that includes an applet, java web start o javafx app.

Maybe you should comment if you are intending to SERVE the website from your local machine, or just connect from your local machine to a website in another server

  • To just visit the site on your machine does not require a JVM installed on your machine
  • If you are running a server on your machine (which is serving the webpages) then you need JVM installed on your machine, and JDK to actually develop a JSP website project for compilation purpose.

If the website only uses JSP (no webstart, no applets) then you do not need java since no java code is run on your machine.

Yes, if you want to run locally a website that uses JSP pages, you'll need at least Java plus a servlet container: typically Tomcat or Jetty.

Every jsp page is "compiled" into a.java file which then is compiled using the javac compiler into.class and then finally executed by the application server. So yes, you do not Java installed to run JSP -- and more specifically you will need JDK not just the JRE!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM