菜单
  
    Misconceptions About JSP Here are some typical questions Marty has received (most of them repeatedly).
    • Our server is running JDK 1.4. So, how do I put a Swing component in a JSP page?
    • How do I put an image into a JSP page? I do not know the proper Java I/O commands to read image files.
    • Since Tomcat does not support JavaScript, how do I make images that are highlighted when the user moves the mouse over them?
    • Our clients use older browsers that do not understand JSP. What should we do?32407
    • When our clients use "View Source" in a browser, how can I prevent them from seeing the JSP tags?
       All of these questions are based upon the assumption that browsers know something about the server-side process. But they do not. Thus:
    • For putting applets with Swing components into Web pages, what matters is the browser's Java version—the server's version is irrelevant. If the browser supports the Java 2 platform, you use the normal APPLET (or Java plug-in) tag and would do so even if you were using non-Java technology on the server.
    • You do not need Java I/O to read image files; you just put the image in the directory for Web resources (i.e., two levels up from WEB-INF/classes) and output a normal IMG tag.
    • You create images that change under the mouse by using client-side JavaScript, referenced with the SCRIPT tag; this does not change just because the server is using JSP.
    • Browsers do not "support" JSP at all—they merely see the output of the JSP page. So, make sure your JSP outputs HTML compatible with the browser, just as you would do with static HTML pages.
    • And, of course you need not do anything to prevent clients from seeing JSP tags; those tags are processed on the server and are not part of the output that is sent to the client.
    Confusing Translation Time with Request Time
        A JSP page is converted into a servlet. The servlet is compiled, loaded into the server's memory, initialized, and executed. But which step happens when? To answer that question, remember two points:
    • The JSP page is translated into a servlet and compiled only the first time it is accessed after having been modified.
    • Loading into memory, initialization, and execution follow the normal rules for servlets.
    The most frequently misunderstood entries are highlighted. When referring to the table, note that servlets resulting from JSP pages use the _jspService method (called for both GET and POST requests), not doGet or doPost. Also, for initialization, they use the jspInit method, not the init method. JSP page translated into servlet Servlet compiled Servlet loaded into server's memory jspInit called _jspService called.
    2. What are application frameworks:
    A framework is a reusable, semi-complete application that can be specialized to produce custom applications. Like people, software applications are more alike than they are different. They run on the same computers, expect input from the same devices, output to the same displays, and save data to the same hard disks. Developers working on conventional desktop applications are accustomed to toolkits and development environments that leverage the sameness between applications. Application frameworks build on this common ground to provide developers with a reusable structure that can serve as the foundation for their own products.
    A framework provides developers with a set of backbone components that have the following characteristics:
    1.They are known to work well in other applications.
    2. They are ready to use with the next project.
    3. They can also be used by other teams in the organization.
    Frameworks are the classic build-versus-buy proposition. If you build it, you will understand it when you are done—but how long will it be before you can roll your own? If you buy it, you will have to climb the learning curve—and how long is that going to take? There is no right answer here, but most observers would agree that frameworks such as Struts provide a significant return on investment compared to starting from scratch, especially for larger projects.
  1. 上一篇:Android开发环境英文文献和中文翻译
  2. 下一篇:服务器端的程序英文文献和中文翻译
  1. 汽车内燃机连杆载荷和应...

  2. 机械手系统英文文献和中文翻译

  3. 固体氧化物燃料电池英文文献和中文翻译

  4. 船舶运动仿真系统英文文献和中文翻译

  5. 新能源空调系统设计英文文献和中文翻译

  6. 正交试验回归法和响应曲...

  7. 机械设计制造及其自动化英文文献和中文翻译

  8. 现代简约美式风格在室内家装中的运用

  9. 高警觉工作人群的元情绪...

  10. g-C3N4光催化剂的制备和光催化性能研究

  11. NFC协议物理层的软件实现+文献综述

  12. 上市公司股权结构对经营绩效的影响研究

  13. C++最短路径算法研究和程序设计

  14. 浅析中国古代宗法制度

  15. 巴金《激流三部曲》高觉新的悲剧命运

  16. 江苏省某高中学生体质现状的调查研究

  17. 中国传统元素在游戏角色...

  

About

优尔论文网手机版...

主页:http://www.youerw.com

关闭返回