java java和jsp有什么区别?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4577445/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 07:01:53  来源:igfitidea点击:

What is the difference between java and jsp?

javajsp

提问by Famver Tags

  1. are java applets and jsp pages written in the same langue (java)?
  2. is java a language?
  3. Is java used for web or other things as well?
  1. java小程序和jsp页面是用同一种语言(java)编写的吗?
  2. java是一种语言吗?
  3. java是否也用于网络或其他东西?

and what can it be compared to? i.e (c c++ c# php asp)

它可以与什么相比?即 (c c++ c# php asp)

i really have no idea what it is

我真的不知道它是什么

采纳答案by Rafe Kettler

  1. Yes
  2. Yes
  3. It's a general purpose language, it's used for just about everything
  1. 是的
  2. 是的
  3. 它是一种通用语言,几乎用于所有事情

Java is most similar to C#, they're both syntactically similar and get compiled to an intermediate language rather than native code (for Java, it runs on the Java Virtual Machine, for C# it's the Common Language Runtime). JSP is most similar to ASP.

Java 与 C# 最相似,它们在语法上都相似并且被编译为中间语言而不是本机代码(对于 Java,它在 Java 虚拟机上运行,​​对于 C#,它是公共语言运行时)。JSP 与 ASP 最相似。

Java's another programming language, it's also the world's most popular language. Try the wikipedia page for it

Java 是另一种编程语言,也是世界上最流行的语言。尝试维基百科页面

回答by dave

Java applets are written using the Java programming language. JavaServer Pages (JSP) are programmed using a mixture of "scriptlet elements" (Java code) and "markup" (usually HTML or XML) to serve data-driven ("dynamic") web pages.

Java 小程序是使用 Java 编程语言编写的。JavaServer Pages (JSP) 使用“scriptlet 元素”(Java 代码)和“标记”(通常是 HTML 或 XML)的混合进行编程,以提供数据驱动(“动态”)网页。

Java is a high-level programming language.

Java 是一种高级编程语言。

Java is used to write applications for a variety of systems, including NASA vehicles for the exploration of Mars, business-oriented applications and data-driven web pages.

Java 用于为各种系统编写应用程序,包括用于探索火星的 NASA 车辆、面向业务的应用程序和数据驱动的网页。

Java can be compared to programming languages such as Microsoft's C# (modeled after Java) or Objective-C (an object-oriented extension to C) due to the fact that programs written in Java, C# and Objective-C generally depend on a Virtual Machine installed on top of the operating system to execute.

由于用 Java、C# 和 Objective-C 编写的程序通常依赖于虚拟机,因此可以将 Java 与 Microsoft 的 C#(以 Java 为模型)或 Objective-C(C 的面向对象扩展)等编程语言进行比较安装在操作系统之上才能执行。

JavaServer Pages are the Java community's answer to PHP and Microsoft's ASP.

JavaServer Pages 是 Java 社区对 PHP 和 Microsoft ASP 的回答。

回答by casablanca

  1. In a way, yes. Java applets are just a special case of Java classes, specifically they are subclasses of the Appletclass. JSP is a combination of XML tags and Java code that is dynamically compiled into Java classes by the server.

  2. Yes, Java is a language, but the name also refers to the entire Java platform including the class library and virtual machine.

  3. Java wasn't designed with any specific purpose in mind, and indeed you will find all kinds of programs written in Java. Of course, it does enjoy a good share of the web application market and probably more than any other general-purpose language.

  1. 在某种程度上,是的。Java 小程序只是 Java 类的一个特例,特别是它们是Applet该类的子类。JSP 是 XML 标记和 Java 代码的组合,由服务器动态编译为 Java 类。

  2. 是的,Java 是一种语言,但这个名字也指整个 Java 平台,包括类库和虚拟机。

  3. Java 的设计并没有考虑任何特定目的,实际上您会发现各种用 Java 编写的程序。当然,它确实在 Web 应用程序市场占有很大份额,而且可能比任何其他通用语言都要多。

回答by Sudantha

Simply Java is a Programming language and JSP is a scripting language (server side)

简单地说,Java 是一种编程语言,而 JSP 是一种脚本语言(服务器端)

Java can be used in web sites as AppletsJSP is designed to web applications

Java 可以在网站中使用,因为AppletsJSP 是为 Web 应用程序设计的

Java is inherited from C programming language so it has the same syntaxes and concepts like it

Java 继承自 C 编程语言,因此它具有与它相同的语法和概念