毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 英语论文 >> 正文

java论文外文文献及译文 第5页

更新时间:2010-10-27:  来源:毕业论文
java论文外文文献及译文 第5页
covered by init () method of the Servlet should call super.init () to ensure that still perform these tasks. In the call to service () method before, make sure you have completed the init () method.
service () method: service () method is the core of Servlet. Whenever a client requests a HttpServlet object, the object of the service () method must be called, and passed to this method a "request" (ServletRequest) objects and a "response" (ServletResponse) object as a parameter. Already exists in the HttpServlet service () method. The default service function is invoked with the HTTP request method to do the corresponding functions. For example, if the HTTP request method is GET, the default on the call to doGet (). Servlet Servlet support should do HTTP method override function. Because HttpServlet.service () method checks whether the request method calls the appropriate treatment, unnecessary coverage service () method. Just do cover the corresponding method on it.
Servlet response to the following types: an output stream, the browser based on its content type (such as text / HTML) to explain; an HTTP error response, redirect to another URL, servlet, JSP.
doGet () method: When a client through the HTML form to send a HTTP GET request or when a direct request for a URL, doGet () method is called. Parameters associated with the GET request to the URL of the back, and send together with this request. When the server does not modify the data, you should use doGet () method.
doPost () method: When a client through the HTML form to send a HTTP POST request, doPost () method is called. Parameters associated with the POST request as a separate HTTP request from the browser to the server. When the need to modify the server-side data, you should use the doPost () method.
destroy () method: destroy () method is only executed once, that is, stop and uninstall the server to execute the method of Servlet. Typically, the Servlet as part of the process server to shut down. The default destroy () method is usually to meet the requirements, but can also cover it, and typically manage server-side resources. For example, if the Servlet will be accumulated in the run-time statistics, you can write a destroy () method is used in Servlet will not load the statistics saved in the file. Another example is to close the database connection.
When the server uninstall Servlet, it will in all service () method call is completed, or at a specified time interval after the call to destroy () method. Running a Servlet service () method may have other threads, so make sure the call destroy () method, the thread has terminated or completed.
GetServletConfig () method: GetServletConfig () method returns a ServletConfig object, which used to return the initialization parameters and ServletContext. ServletContext interface provides information about servlet environment.
GetServletInfo () method: GetServletInfo () method is an alternative method, which provides information on the servlet, such as author, version, copyright.
When the server calls sevlet of Service (), doGet () and doPost () of these three methods are needed "request" and "response" object as a parameter. "Request" object to provide the requested information, and the "response" object to provide a response message will be returned to the browser as a communications channel.
javax.servlet packages in the relevant classes for the ServletResponse and ServletRequest, while the javax.servlet.http package of related classes for the HttpServletRequest and HttpServletResponse. Servlet communication with the server through these objects and ultimately communicate with the client. Servlet through call "request" object approach informed the client environment, server environment, information and all information provided by the client. Servlet can call the "response" object methods to send response, the response is ready to send back to client

JSP
JavaServerPages (JSP) technology provides a simple and fast way to create a display content dynamically generated Web pages. Leading from the industry, Sun has developed technology related to JSP specification that defines how the server and the interaction between the JSP page, the page also describes the format and syntax.
JSP pages use XML tags and scriptlets (a way to use script code written in Java), encapsulates the logic of generating page content. It labels in various formats (HTML or XML) to respond directly passed back to the page. In this way, JSP pages to achieve a logical page design and display their separation.
JSP technology is part of the Java family of technologies. JSP pages are compiled into a servlet, and may call JavaBeans components (beans) or EnterpriseJavaBeans components (enterprise beans), so that server-side processing. Therefore, JSP technology in building scalable web-based applications play an important role.
JSP page is not confined to any particular platform or web server. JSP specification in the industry with a wide range of adaptability.
JSP technology is the result of collaboration with industry, its design is an open,

上一页  [1] [2] [3] [4] [5] [6] [7] 下一页

java论文外文文献及译文 第5页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。