开始Java EE [英] Beginning Java EE

查看:85
本文介绍了开始Java EE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Java有所了解,但对Enterprise Java来说却是全新的。我正在尝试使用NetBeans 6.1和GlassFish Application Server。
请指导我一些资源,告诉我实际上java企业应用程序是什么,它们与普通java类不同等。

I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server. Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes etc.

还有哪些是最好的要使用的应用服务器(在Linux上)?

Also which is the best application server to use (on Linux)?

推荐答案

java企业应用程序是什么,它们与普通java类的区别等等

"what java enterprise applications are, how they are different from normal java classes etc"

他们是正常班级。它们由应用程序服务器运行。 应用程序服务器通常只是一个JVM ,但有时会被供应商增强或修改或扩展。但这不应该是你的任何问题。应用程序服务器(即:JVM)使用类加载器(可能由供应商定制)来加载您的servlet(任何实现HttpServlet接口的类)。任何其他类(不仅仅是J2EE类,而是所有类)都将由类加载器加载。从那以后它就是你的java代码。我希望这会给你你想要的那种答案。阅读J2EE文档(甚至针对开发人员)通常需要无意义的流行语。

Well they are normal classes. They are ran by an application server. The "application server" is often just a JVM, but sometimes enhanced or modified or extended by the vendor. But that shouldn't be any concern to you. The application server (ie: JVM) uses a class loader (probably customized by vendor) to load your servlet (any class that implements the HttpServlet interface). Any other classes (not just J2EE classes, but all classes) will be loaded by the class loader. From there on it is your same java code. I hope this gives you the kind of answer you want. Reading J2EE documents (even aimed towards developers) usually entails meaningless buzzwords.

我建议您查看Sun的J2EE Tutorial。它是免费的,并且在移动到框架之前(例如Struts)会介绍您应该知道的基础知识。当然,必须要知道你是否只是使用直接的J2EE。

I would recommend that you look over the J2EE Tutorial from Sun. It's free, and goes over the basics that you should know before moving onto a framework (Struts for example). And of course must need to know if you are just going to use just straight J2EE.

你可能希望熟悉一些:

  • http://java.sun.com/j2ee/1.4/docs/api/
  • You may also wish to go over HTTP specification (RFC or elsewhere) as well in case you don't understand how http requests and responses are processed by a standalone webserver.
  • http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Overview3.html (web containers in particular)

一些有用的事实:


  • 将JSP编译成一个servlet的。创建它们是为了不必使用输出编写器来开发Servlet来处理每个页面内容的写入(JSP将被编译为适合您的内容)。 ie:out.println(< html> etcetc ...)

  • 请求(HttpServletRequest)对象代表请求。

  • 响应(HttpServletRespone)对象将构建响应。 (http标头和内容)。

  • 会话和上下文对象也很重要。前者用于承载会话作用域对象(由应用服务器管理)并映射到客户端的jsessionid cookie(因此它知道哪个客户端(即:请求)在服务器端具有哪些对象)。上下文对象用于初始设置。

  • 您将需要遍历Web容器以使其全部适合。

  • A JSP is compiled into a servlet. These were created so that your Servlets wouldn't have to be developed using an Output Writer to handle every write to page content (the JSP will be compiled into that for you). ie: out.println("<html>etcetc...")
  • the request (HttpServletRequest) object represents the request.
  • the response (HttpServletRespone) object will build the response. (both the http headers and content).
  • Session and Context objects are also important. The former is for carrying session scoped objects (managed by the app server) and mapped to a jsessionid cookie on the client side (so it knows what client (ie: request) has what objects on the server side). The context object is used for initial settings.
  • You will want to go over web containers to fit it all together.

这篇关于开始Java EE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆