【正文】
a ? I / O mands. Tomcat does not support JavaScript, when the user moves the mouse over the image, how can I make the image highlight it? ? ? Our customers do not understand the JSP to use the old browser. How should I do? When our client in the browser using the View ? Source (view source code), how to stop them see the JSP Tag? All of these issues are based on the browser to the serverside process in an informed assumption. But in fact the browser does not understand the serverside process. Therefore: ? If you want to use Swing ponents applet into the page, it is important that the Java version of the browser and the Java version of the server has nothing to do. If the browser supports Java 2 platform, you can use the normal APPLET (or the Java plugin) label, even if the server using a nonJava technologies should also be the case. You do not need Java ? I / O to read the image file, you only need to store images on Web directory of resources (ie, up 2 WEBINF/classes directory), and outputs a normal IMG tag. ? You should use the SCRIPT tag, use the clientside JavaScript to create under the mouse will change the image, this does not change because the server using JSP. ? browser does not support JSP they only see the JSP page output. Thus, as with static HTML pages, like, just ensure that the JSP output of HTML and browser patibility. ? Of course, you do not need to take measures to prevent customers see JSP label, the labels on the server for processing, sent to the customer39。s one product) are in JSP before the appearance to promote this approach. In fact, JSP not only adopted this general concept, it even use the same special number, and ASP tags. So the question bees: Why use JSP, instead of using other technologies? Our first reaction is that we are not arguing about all the people should be done. These other technologies, there are some very good, in some cases, is indeed a reasonable choice. However, in other cases, JSP is significantly better. Here are a number of reasons. With. NET and Active Server Pages (ASP) pared to . NET is Microsoft designed a technology. is a direct petition with the servlets and JSP technology. The advantages of JSP is reflected in two aspects. First of all, JSP can be ported to multiple operating systems and Web servers, you do not have to be limited to be deployed in Windows and IIS on the core though. NET platform can be several nonWindows platforms, but not this part of the ASP. You can expect to be important application deployment to multiple servers and operating systems. For certain applications, such differences have little impact. However, some applications, this difference is very important. Secondly, for some applications, the underlying choice of language is essential. For example, while. NET39。 表 1 各種情況下的 JSP 操作 將 JSP 頁(yè)面轉(zhuǎn)換成 servlet 編譯 Servlet 將 Servlet 載入到服務(wù)器內(nèi)存中 調(diào)用 jspInit 調(diào)用 _jspService 頁(yè)面初次創(chuàng)建 請(qǐng)求 1 有 有 有 有 有 請(qǐng)求 2 無(wú) 無(wú) 無(wú) 無(wú) 有 服務(wù)器重啟后 請(qǐng)求 3 無(wú) 無(wú) 有 有 有 請(qǐng)求 4 無(wú) 無(wú) 無(wú) 無(wú) 有 頁(yè)面修改后 請(qǐng)求 5 有 有 有 有 有 請(qǐng)求 6 無(wú) 無(wú) 無(wú) 無(wú) 有 JSP Technical Overview A, JSP benefits 2, JSP pages will eventually be converted into servler. Thus, fundamentally, JSP pages can perform any task can be used servler to plete. However, this does not mean that the underlying equivalence servler and JSP pages for all conditions are equally applicable. The problem is not technical ability, but both the convenience, productivity and maintainability different. After all, in a particular platform can be done with the Java programming language, things, the same can be done in assembly language, but it is still important to choose which language. And single use servler pared, JSP provides the following b