jsp面试问题

JSP interview questions are very important if you are going for a Java interview. JSP is an integral part of any Java EE web application and recently I have written a lot about different features in JSP.

如果您要进行Java面试,那么JSP面试问题非常重要。 JSP是任何Java EE Web应用程序的组成部分,最近,我写了很多有关JSP中不同功能的文章。

We started from the basics of JSP, JSP scripting and ended with JSP custom tags to avoid java code in JSP pages. Some of the tutorials you might look into are:

我们从JSP,JSP脚本的基础开始,以JSP定制标记结束,以避免JSP页面中的Java代码。 您可能要研究的一些教程是:

  1. JSP Tutorial for BeginnersJSP初学者教程
  2. JSP Implicit ObjectsJSP隐式对象
  3. JSP DirectivesJSP指令
  4. JSP Exception HandlingJSP异常处理
  5. JSP Action TagsJSP动作标签
  6. JSP ELJSP EL
  7. JSTL Core TagsJSTL核心标签
  8. JSP Custom TagsJSP定制标签

JSP面试问题 (JSP Interview Questions)

Here I am providing some important JSP interview questions with answers to help you in interviews. These are good JSP interview questions and answers for experienced programmers as well as beginners.Before you go through the answers, I would recommend you to read above tutorials and try to answer them yourself and test your understanding of JSP.

在这里,我提供一些重要的JSP面试问题以及答案,以帮助您进行面试。 对于有经验的程序员和初学者来说,这些都是不错的JSP面试问题和答案。在回答这些问题之前,我建议您阅读上述教程并尝试自己回答它们,并测试您对JSP的理解。

  1. What is JSP and why do we need it?什么是JSP,为什么我们需要它?
  2. What are the JSP lifecycle phases?JSP生命周期阶段是什么?
  3. What are JSP lifecycle methods?什么是JSP生命周期方法?
  4. Which JSP lifecycle methods can be overridden?可以重写哪些JSP生命周期方法?
  5. How can we avoid direct access of JSP pages from client browser?我们如何避免从客户端浏览器直接访问JSP页面?
  6. What are different types of comments in JSP?JSP中有哪些不同类型的注释?
  7. What is Scriptlet, Expression and Declaration in JSP?什么是JSP中的Scriptlet,表达式和声明?
  8. What are JSP implicit objects?什么是JSP隐式对象?
  9. Can we use JSP implicit objects in a method defined in JSP Declaration?我们可以在JSP声明中定义的方法中使用JSP隐式对象吗?
  10. Which implicit object is not available in normal JSP pages?在普通的JSP页面中哪个隐式对象不可用?
  11. What are the benefits of PageContext implicit object?PageContext隐式对象的好处是什么?
  12. How do we configure init params for JSP?我们如何为JSP配置初始化参数?
  13. Why use of scripting elements in JSP is discouraged?为什么不鼓励在JSP中使用脚本元素?
  14. Can we define a class in a JSP Page?我们可以在JSP页面中定义一个类吗?
  15. How can we disable java code or scripting in JSP page?我们如何在JSP页面中禁用Java代码或脚本?
  16. Explain JSP Action Elements or Action Tags?解释JSP动作元素或动作标签?
  17. What is difference between include directive and jsp:include action?include指令和jsp:include操作之间有什么区别?
  18. What is JSP Expression Language and what are it’s benefits?什么是JSP表达式语言,它有什么好处?
  19. What are JSP EL implicit objects and how it’s different from JSP implicit Objects?什么是JSP EL隐式对象,它与JSP隐式对象有何不同?
  20. How to use JSP EL to get HTTP method name?如何使用JSP EL获取HTTP方法名称?
  21. What is JSP Standard Tag Library, provide some example usage?什么是JSP标准标记库,提供一些示例用法?
  22. What are the types of JSTL tags?JSTL标签的类型是什么?
  23. What is JSP Custom Tag and what are it’s components?什么是JSP自定义标签,它是什么组成部分?
  24. Give an example where you need JSP Custom Tag?举一个需要使用JSP自定义标签的示例吗?
  25. Why don’t we need to configure JSP standard tags in web.xml?为什么我们不需要在web.xml中配置JSP标准标记?
  26. How can we handle exceptions thrown by JSP service method?我们如何处理JSP服务方法引发的异常?
  27. How do we catch exception and process it using JSTL?我们如何捕获异常并使用JSTL处理它?
  28. How do we print “<br> creates a new line in HTML” in JSP?我们如何在JSP中打印“ <br>用HTML创建新行”?
  29. What is jsp-config in deployment descriptor?部署描述符中的jsp-config是什么?
  30. How to ignore the EL expression evaluation in a JSP?如何忽略JSP中的EL表达式评估?
  31. When will Container initialize multiple JSP/Servlet Objects?容器何时会初始化多个JSP / Servlet对象?
  32. Can we use JavaScript with JSP Pages?我们可以在JSP Pages中使用JavaScript吗?
  33. How can we prevent implicit session creation in JSP?我们如何防止在JSP中创建隐式会话?
  34. What is difference between JspWriter and Servlet PrintWriter?JspWriter和Servlet PrintWriter有什么区别?
  35. How can we extend JSP technology?我们如何扩展JSP技术?
  36. Provide some JSP Best Practices?提供一些JSP最佳实践?

JSP面试问答 (JSP Interview Questions and Answers)

  1. 什么是JSP,为什么我们需要它? (What is JSP and why do we need it?)

    JSP stands for JavaServer Pages. JSP is java server side technology to create dynamic web pages. JSP is extension of Servlet technology to help developers create dynamic pages with HTML like syntax.

    We can create user views in servlet also but the code will become very ugly and error-prone. Also, most of the elements on a web page are static, so the JSP page is more suitable for web pages. We should avoid business logic in JSP pages and try to use it only for view purpose. JSP scripting elements can be used for writing Java code in JSP pages but it’s best to avoid them and use JSP action elements, JSTL tags or custom tags to achieve the same functionalities.

    One more benefit of JSP is that most of the containers support hot deployment of JSP pages. Just make the required changes in the JSP page and replace the old page with the updated jsp page in the deployment directory and the container will load the new JSP page. We don’t need to compile our project code or restart server whereas if we make a change in servlet code, we need to build the complete project again and deploy it. Although most of the containers now provide hot deployment support for applications still it’s more work that JSP pages.

    JSP代表JavaServer Pages。 JSP是用于创建动态网页的Java服务器端技术。 JSP是Servlet技术的扩展,可帮助开发人员使用类似HTML的语法创建动态页面。

    我们也可以在servlet中创建用户视图,但是代码将变得非常难看且容易出错。 而且,网页上的大多数元素都是静态的,因此JSP页面更适合于网页。 我们应该避免在JSP页面中使用业务逻辑,并尝试仅将其用于查看目的。 JSP脚本元素可用于在JSP页面中编写Java代码,但最好避免使用它们,而应使用JSP操作元素,JSTL标记或自定义标记来实现相同的功能。

    JSP的另一个好处是,大多数容器都支持JSP页面的热部署。 只需在JSP页面中进行所需的更改,然后用部署目录中更新的jsp页面替换旧页面,容器将加载新的JSP页面。 我们不需要编译我们的项目代码或重新启动服务器,而如果我们更改servlet代码,则需要再次构建完整的项目并进行部署。 尽管现在大多数容器都为应用程序提供了热部署支持,但是与JSP页面相比,它的工作量更大。

  2. JSP生命周期阶段是什么? (What are the JSP lifecycle phases?)

    If you will look into JSP page code, it looks like HTML and doesn’t look anything like java classes. Actually JSP container takes care of translating the JSP pages and create the servlet class that is used in web application. JSP lifecycle phases are:

    1. Translation – JSP container checks the JSP page code and parse it to generate the servlet source code. For example in Tomcat you will find generated servlet class files at TOMCAT/work/Catalina/localhost/WEBAPP/org/apache/jsp directory. If the JSP page name is home.jsp, usually the generated servlet class name is home_jsp and file name is home_jsp.java
    2. Compilation – JSP container compiles the jsp class source code and produce class file in this phase.
    3. Class Loading – Container loads the class into memory in this phase.
    4. Instantiation – Container invokes the no-args constructor of generated class to load it into memory and instantiate it.
    5. Initialization – Container invokes the init method of JSP class object and initializes the servlet config with init params configured in deployment descriptor. After this phase, JSP is ready to handle client requests. Usually from translation to initialization of JSP happens when first request for JSP comes but we can configure it to be loaded and initialized at the time of deployment like servlets using load-on-startup element.
    6. Request Processing – This is the longest lifecycle of JSP page and JSP page processes the client requests. The processing is multi-threaded and similar to servlets and for every request a new thread is spawned and ServletRequest and ServletResponse object is created and JSP service method is invoked.
    7. Destroy – This is the last phase of JSP lifecycle where JSP class is unloaded from memory. Usually it happens when application is undeployed or the server is shut down.

    如果您研究JSP页面代码,它看起来像HTML,而看起来却不像Java类。 实际上,JSP容器负责翻译JSP页面并创建Web应用程序中使用的servlet类。 JSP生命周期阶段为:

    1. 转换 – JSP容器检查JSP页面代码并解析它以生成servlet源代码。 例如,在Tomcat中,您将在TOMCAT / work / Catalina / localhost / WEBAPP / org / apache / jsp目录中找到生成的servlet类文件。 如果JSP页面名称是home.jsp,则通常生成的servlet类名称是home_jsp,文件名是home_jsp.java。
    2. 编译 – JSP容器在此阶段编译jsp类源代码并生成类文件。
    3. 类加载 –在此阶段,容器将类加载到内存中。
    4. 实例化 –容器调用生成类的no-args构造函数以将其加载到内存中并实例化它。
    5. 初始化 –容器调用JSP类对象的init方法,并使用部署描述符中配置的init参数初始化servlet配置。 在此阶段之后,JSP准备处理客户机请求。 通常,从JSP的转换到JSP的初始化会在首次请求JSP时发生,但我们可以将其配置为在部署时像servlet一样使用load-on-startup元素加载和初始化。
    6. 请求处理 –这是JSP页面的最长生命周期,而JSP页面处理客户端请求。 该处理是多线程的,并且与servlet相似,并且对于每个请求都产生一个新线程,并创建ServletRequest和ServletResponse对象并调用JSP服务方法。
    7. 销毁 –这是JSP生命周期的最后一个阶段,其中JSP类从内存中卸载。 通常,它是在取消部署应用程序或关闭服务器时发生的。
  3. 什么是JSP生命周期方法? (What are JSP lifecycle methods?)

    JSP lifecycle methods are:

    1. jspInit(): This method is declared in JspPage and it’s implemented by JSP container implementations. This method is called once in the JSP lifecycle to initialize it with config params configured in deployment descriptor. We can override this method using JSP declaration scripting element to initialize any resources that we want to use in JSP page.
    2. _jspService(): This is the JSP method that gets invoked by JSP container for each client request by passing request and response object. Notice that method name starts with underscore to distinguish it from other lifecycle methods because we can’t override this method. All the JSP code goes inside this method and it’s overridden by default. We should not try to override it using JSP declaration scripting element. This method is defined in HttpJspPage interface.
    3. jspDestroy(): This method is called by container when JSP is unloaded from memory such as shutting down application or container. This method is called only once in JSP lifecycle and we should override this method to release any resources created in JSP init method.

    JSP生命周期方法是:

    1. jspInit() :此方法在JspPage声明,并且由JSP容器实现实现。 在JSP生命周期中一次调用此方法,以使用部署描述符中配置的config参数对其进行初始化。 我们可以使用JSP声明脚本元素覆盖此方法,以初始化我们要在JSP页面中使用的任何资源。
    2. _jspService() :这是JSP方法,通过传递请求和响应对象,JSP容器为每个客户端请求调用此方法。 请注意,方法名以下划线开头,以将其与其他生命周期方法区分开来,因为我们无法覆盖此方法。 所有JSP代码都在此方法内,并且默认情况下会覆盖它。 我们不应该尝试使用JSP声明脚本元素来覆盖它。 此方法在HttpJspPage接口中定义。
    3. jspDestroy() :当从内存中卸载JSP时,例如关闭应用程序或容器,容器将调用此方法。 在JSP生命周期中仅调用一次此方法,并且我们应该重写此方法以释放在JSP init方法中创建的所有资源。
  4. 可以重写哪些JSP生命周期方法? (Which JSP lifecycle methods can be overridden?)

    We can override jspInit() and jspDestroy() methods using JSP declaration scripting element. We should override jspInit() methods to create common resources that we would like to use in JSP service method and override jspDestroy() method to release the common resources.

    我们可以使用JSP声明脚本元素重写jspInit()和jspDestroy()方法。 我们应该重写jspInit()方法以创建要在JSP服务方法中使用的公共资源,并重写jspDestroy()方法以释放公共资源。

  5. 我们如何避免从客户端浏览器直接访问JSP页面? (How can we avoid direct access of JSP pages from client browser?)

    We know that anything inside the WEB-INF directory can’t be accessed directly in a web application, so we can place our JSP pages in WEB-INF directory to avoid direct access to JSP page from the client browser. But in this case, we will have to configure it in deployment descriptor just like Servlets. The sample configuration is given below code snippet of web.xml file.

    <servlet><servlet-name>Test</servlet-name><jsp-file>/WEB-INF/test.jsp</jsp-file><init-param><param-name>test</param-name><param-value>Test Value</param-value></init-param>
    </servlet><servlet-mapping><servlet-name>Test</servlet-name><url-pattern>/Test.do</url-pattern>
    </servlet-mapping>

    我们知道WEB-INF目录中的任何内容都无法在Web应用程序中直接访问,因此我们可以将JSP页面放在WEB-INF目录中,以避免从客户端浏览器直接访问JSP页面。 但是在这种情况下,我们将必须像Servlets一样在部署描述符中对其进行配置。 下面的web.xml文件的代码段中给出了示例配置。

  6. JSP中有哪些不同类型的注释? (What are different types of comments in JSP?)

    JSP pages provide two types of comments that we can use:

    • HTML Comments: Since JSP pages are like HTML, we can use HTML comments like <!-- HTML Comment -->. These comments are sent to client also and we can see it in HTML source. So we should avoid any code level comments or debugging comments using HTML comments.
    • JSP Comments: JSP Comments are written using scriptlets like <%-- JSP Comment --%>. These comments are present in the generated servlet source code and doesn’t sent to client. For any code level or debugging information comments we should use JSP comments.

    JSP页面提供了两种可以使用的注释:

    • HTML注释 :由于JSP页面就像HTML,因此我们可以使用<!-- HTML Comment -->这样的<!-- HTML Comment --> 。 这些评论也会发送到客户端,我们可以在HTML源代码中看到它。 因此,我们应该避免任何代码级注释或使用HTML注释调试注释。
    • JSP注释 :JSP注释是使用<%-- JSP Comment --%>类的脚本编写的。 这些注释存在于生成的servlet源代码中,并且不会发送给客户端。 对于任何代码级别或调试信息注释,我们应使用JSP注释。
  7. 什么是JSP中的Scriptlet,表达式和声明? (What is Scriptlet, Expression and Declaration in JSP?)

    Scriptlets, Expression and Declaration are scripting elements in JSP page using which we can add java code in the JSP pages.

    A scriptlet tag starts with <% and ends with %>. Any code written inside the scriptlet tags go into the _jspService() method. For example;

    <%
    Date d = new Date();
    System.out.println("Current Date="+d);
    %>

    Since most of the times we print dynamic data in JSP page using out.print() method, there is a shortcut to do this through JSP Expressions. JSP Expression starts with <%= and ends with %>.

    <% out.print("Pankaj"); %> can be written using JSP Expression as <%= "Pankaj" %>

    Notice that anything between <%= %> is sent as parameter to out.print() method. Also notice that scriptlets can contain multiple java statements and always ends with semicolon (;) but expression doesn’t end with semicolon.

    JSP Declarations are used to declare member methods and variables of servlet class. JSP Declarations starts with <%! and ends with %>.

    For example we can create an int variable in JSP at class level as <%! public static int count=0; %>.

    脚本,表达式和声明是JSP页面中的脚本元素,通过这些元素,我们可以在JSP页面中添加Java代码。

    scriptlet标记以<%开头,以%>结束。 在scriptlet标记内编写的任何代码都将放入_jspService()方法。 例如;

    由于大多数情况下,我们使用out.print()方法在JSP页面中打印动态数据,因此存在通过JSP表达式执行此操作的捷径。 JSP表达式以<%=开头,以%>结束。

    <% out.print("Pankaj"); %> 可以使用JSP表达式将<% out.print("Pankaj"); %>编写为<%= "Pankaj" %>

    注意, <%= %>之间的任何内容都作为参数发送到out.print()方法。 还要注意,scriptlet可以包含多个java语句,并且始终以分号(;)结尾,但表达式不以分号结尾。

    JSP声明用于声明servlet类的成员方法和变量。 JSP声明以<%!开头<%! 并以%>结尾。

    例如,我们可以在JSP中以<%! public static int count=0; %>级别创建int变量<%! public static int count=0; %> <%! public static int count=0; %> <%! public static int count=0; %>

  8. 什么是JSP隐式对象? (What are JSP implicit objects?)

    JSP implicit objects are created by container while translating JSP page to Servlet source to help developers. We can use these objects directly in scriptlets that goes in service method, however we can’t use them in JSP Declaration because that code will go at class level.

    We have 9 implicit objects that we can directly use in JSP page. Seven of them are declared as local variable at the start of _jspService() method whereas two of them are part of _jspService() method argument that we can use.

    1. out Object
    2. request Object
    3. response Object
    4. config Object
    5. application Object
    6. session Object
    7. pageContext Object
    8. page Object
    9. exception Object
    10. JSP Implicit Objects Example

    JSP隐式对象由容器创建,同时将JSP页面转换为Servlet源以帮助开发人员。 我们可以在使用service方法的scriptlet中直接使用这些对象,但是我们不能在JSP声明中使用它们,因为该代码将在类级别进行。

    我们有9个隐式对象,可以直接在JSP页面中使用。 其中有七个在_jspService()方法的开头声明为局部变量,而其中两个是我们可以使用的_jspService()方法参数的一部分。

    1. 出对象
    2. 请求对象
    3. 响应对象
    4. 配置对象
    5. 应用对象
    6. 会话对象
    7. pageContext对象
    8. 页面对象
    9. 异常对象
    10. JSP隐式对象示例
  9. Read in detail about each one of them at JSP Implicit Objects.

    JSP隐式对象上详细阅读其中的每一个。

  10. 我们可以在JSP声明中定义的方法中使用JSP隐式对象吗? (Can we use JSP implicit objects in a method defined in JSP Declaration?)

    No we can’t because JSP implicit objects are local to service method and added by JSP Container while translating JSP page to servlet source code. JSP Declarations code goes outside the service method and used to create class level variables and methods and hence can’t use JSP implicit objects.

    不,我们不能,因为JSP隐式对象是服务方法的本地对象,并且在将JSP页面转换为Servlet源代码时由JSP容器添加。 JSP声明代码不在服务方法之外,用于创建类级别的变量和方法,因此不能使用JSP隐式对象。

  11. 在普通的JSP页面中哪个隐式对象不可用? (Which implicit object is not available in normal JSP pages?)

    JSP exception implicit object is not available in normal JSP pages and it’s used in JSP error pages only to catch the exception thrown by the JSP pages and provide useful message to the client.

    JSP异常隐式对象在正常的JSP页面中不可用,并且在JSP错误页面中仅用于捕获JSP页面引发的异常并向客户端提供有用的消息。

  12. PageContext隐式对象的好处是什么? (What are the benefits of PageContext implicit object?)

    JSP pageContext implicit object is instance of javax.servlet.jsp.PageContext abstract class implementation. We can use pageContext to get and set attributes with different scopes and to forward request to other resources. pageContext object also hold reference to other implicit object.

    This is the only object that is common in both JSP implicit objects and in JSP EL implicit objects.

    JSP pageContext隐式对象是javax.servlet.jsp.PageContext抽象类实现的实例。 我们可以使用pageContext获取和设置具有不同作用域的属性,并将请求转发给其他资源。 pageContext对象还保存对其他隐式对象的引用。

    这是在JSP隐式对象和JSP EL隐式对象中唯一通用的对象。

  13. 我们如何为JSP配置初始化参数? (How do we configure init params for JSP?)

    We can configure init params for JSP similar to servlet in web.xml file, we need to configure JSP init params with servlet and servlet-mapping element. The only thing differs from servlet is jsp-file element where we need to provide the JSP page location.

    我们可以像在web.xml文件中为servlet配置JSP的初始化参数一样,我们需要使用servlet和servlet-mapping元素配置JSP初始化参数。 与servlet唯一不同的是jsp-file元素,我们需要在其中提供JSP页面位置。

  14. 为什么不鼓励在JSP中使用脚本元素? (Why use of scripting elements in JSP is discouraged?)

    JSP pages are mostly used for view purposes and all the business logic should be in the servlet or model classes. We should pass parameters to JSP page through attributes and then use them to create the HTML response in JSP page.

    Most part of the JSP page contains HTML code and to help web designers to easily understand JSP page and develop them, JSP technology provides action elements, JSP EL, JSP Standard Tag Library and custom tags that we should use rather than scripting elements to bridge the gap between JSP HTML part and JSP java part.

    JSP页面主要用于查看目的,所有业务逻辑都应在servlet或模型类中。 我们应该通过属性将参数传递给JSP页面,然后使用它们在JSP页面中创建HTML响应。

    JSP页面的大部分包含HTML代码,并且为了帮助Web设计人员轻松理解JSP页面并进行开发,JSP技术提供了我们应该使用的操作元素,JSP EL,JSP标准标记库和自定义标记,而不是脚本元素来桥接JSP HTML部分和JSP Java部分之间的差距。

  15. 我们可以在JSP页面中定义一个类吗? (Can we define a class in a JSP Page?)

    It’s not a good practice though, but we can define a class inside a JSP Page. Below is the sample code for this:

    <%!
    private static class NestedClass { //static is better because Servlet is multi-threadedprivate final int num = 0;public int getNum() {return num;}
    }
    %>

    Or

    虽然这不是一个好习惯,但是我们可以在JSP Page中定义一个类。 下面是此示例代码:

    <%!
    private static class NestedClass { //static is better because Servlet is multi-threadedprivate final int num = 0;public int getNum() {return num;}
    }
    %>

    要么

  16. 我们如何在JSP页面中禁用Java代码或脚本? (How can we disable java code or scripting in JSP page?)

    We can disable scripting elements in JSP pages through deployment descriptor configuration like below.

    <jsp-config><jsp-property-group><url-pattern>*.jsp</url-pattern><scripting-invalid>true</scripting-invalid></jsp-property-group>
    </jsp-config>

    Above URL-pattern will disable scripting for all the JSP pages but if you want to disable it only for a specific page, you can give the JSP file name itself.

    我们可以通过如下所示的部署描述符配置来禁用JSP页面中的脚本元素。

    上面的URL模式将禁用所有JSP页面的脚本,但是,如果您只想针对特定页面禁用脚本,则可以指定JSP文件名。

  17. 解释JSP动作元素或动作标签? (Explain JSP Action Elements or Action Tags?)

    JSP action elements or action tags are HTML like tags that provide useful functionalities such as working with Java Bean, including a resource, forwarding the request and to generate dynamic XML elements. JSP action elements always starts with jsp: and we can use them in JSP page directly without the need to import any tag libraries or any other configuration changes. Some of the important action elements are jsp:useBean, jsp:getProperty, jsp:setProperty, jsp:include and jsp:forward.

    Read more in details about these at JSP Action Elements.

    JSP操作元素或操作标签是类似于HTML的标签,提供有用的功能,例如使用Java Bean(包括资源),转发请求并生成动态XML元素。 JSP操作元素始终以jsp:开头,我们可以直接在JSP页面中使用它们,而无需导入任何标记库或任何其他配置更改。 一些重要的操作元素是jsp:useBean,jsp:getProperty,jsp:setProperty,jsp:include和jsp:forward。

    JSP Action Elements中阅读有关这些内容的更多详细信息。

  18. include指令和jsp:include操作之间有什么区别? (What is difference between include directive and jsp:include action?)

    The difference between JSP include directive and include action is that in include directive the content to other resource is added to the generated servlet code at the time of translation whereas with include action it happens at runtime.

    Another difference is that in JSP include action, we can pass params to be used in the included resource with jsp:param action element but in JSP include directive we can’t pass any params.

    When the included resource is static such as header, footer, image files then we should use include directive for faster performance but if the included resource is dynamic and requires some parameters for processing then we should use include action tag.

    JSP include指令和include动作之间的区别在于,include指令中的其他资源的内容在转换时会添加到生成的servlet代码中,而include动作会在运行时发生。

    另一个区别是,在JSP include动作中,我们可以使用jsp:param action元素传递要在包含的资源中使用的jsp:param但是在JSP include指令中,我们不能传递任何参数。

    当包含的资源是静态的(例如页眉,页脚,图像文件)时,我们应该使用include指令以提高性能,但是如果包含的资源是动态的并且需要一些参数进行处理,则应该使用include动作标签。

  19. 什么是JSP表达式语言,它有什么好处? (What is JSP Expression Language and what are it’s benefits?)

    Most of the times we use JSP for view purposes and all the business logic is present in servlet code or model classes. When we receive client request in the servlet, we process it and then add attributes in request/session/context scope to be retrieved in JSP code. We also use request params, headers, cookies and init params in JSP to create response views.

    We can use scriptlets and JSP expressions to retrieve attributes and parameters in JSP with java code and use it for view purpose. But for web designers, java code is hard to understand and that’s why JSP Specs 2.0 introduced Expression Language (EL) through which we can get attributes and parameters easily using HTML like tags.

    Expression language syntax is ${name} and we can use EL implicit objects and EL operators to retrieve the attributes from different scopes and use them in JSP page.

    Read more about JSP EL with example program at JSP EL Tutorial.

    大多数时候,我们使用JSP进行查看,并且所有业务逻辑都存在于servlet代码或模型类中。 当我们在servlet中接收到客户端请求时,我们将对其进行处理,然后在request / session / context范围内添加要在JSP代码中检索的属性。 我们还在JSP中使用请求参数,标头,cookie和init参数来创建响应视图。

    我们可以使用scriptlet和JSP表达式通过Java代码在JSP中检索属性和参数,并将其用于查看目的。 但是对于Web设计人员来说,Java代码很难理解,这就是JSP Specs 2.0引入表达式语言(EL)的原因,通过它我们可以使用类似HTML的标记轻松获得属性和参数。

    表达式语言的语法为${name} ,我们可以使用EL隐式对象和EL运算符从不同的范围检索属性,并在JSP页面中使用它们。

    JSP EL Tutorial中阅读有关示例程序的有关JSP EL的更多信息。

  20. 什么是JSP EL隐式对象,它与JSP隐式对象有何不同? (What are JSP EL implicit objects and how it’s different from JSP implicit Objects?)

    JSP Expression Language provides many implicit objects that we can use to get attributes from different scopes and parameter values. Note that these are different from JSP implicit objects and contains only the attributes in given scope. The only common implicit object in JSP EL and JSP page is pageContext object.

    Below table provides a list of implicit object in JSP EL.

    JSP EL Implicit Objects Type Description
    pageScope Map A map that contains the attributes set with page scope.
    requestScope Map Used to get the attribute value with request scope.
    sessionScope Map Used to get the attribute value with session scope.
    applicationScope Map Used to get the attributes value from application scope.
    param Map Used to get the request parameter value, returns a single value
    paramValues Map Used to get the request param values in an array, useful when request parameter contain multiple values.
    header Map Used to get request header information.
    headerValues Map Used to get header values in an array.
    cookie Map Used to get the cookie value in the JSP
    initParam Map Used to get the context init params, we can’t use it for servlet init params
    pageContext pageContext Same as JSP implicit pageContext object, used to get the request, session references etc. example usage is getting request HTTP Method name.

    JSP表达式语言提供了许多隐式对象,我们可以使用它们来获取来自不同作用域和参数值的属性。 注意,这些不同于JSP隐式对象,并且仅包含给定范围内的属性。 JSP EL和JSP页面中唯一的常见隐式对象是pageContext对象。

    下表提供了JSP EL中的隐式对象的列表。

    JSP EL隐式对象 类型 描述
    pageScope 地图 包含使用页面范围设置的属性的映射。
    requestScope 地图 用于获取具有请求范围的属性值。
    sessionScope 地图 用于获取具有会话范围的属性值。
    应用范围 地图 用于从应用程序范围获取属性值。
    参数 地图 用于获取请求参数值,返回单个值
    参数值 地图 用于获取数组中的请求参数值,当请求参数包含多个值时很有用。
    标头 地图 用于获取请求标头信息。
    headerValues 地图 用于获取数组中的标头值。
    曲奇饼 地图 用于获取JSP中的cookie值
    初始化参数 地图 用于获取上下文初始化参数,我们不能将其用于servlet初始化参数
    pageContext pageContext 与JSP隐式pageContext对象相同,用于获取请求,会话引用等。示例用法是获取请求HTTP方法名称。
  21. 如何使用JSP EL获取HTTP方法名称? (How to use JSP EL to get HTTP method name?)

    We can use pageContext JSP EL implicit object to get the request object reference and use dot operator to get the HTTP method name in JSP page. The JSP EL code for this will be ${pageContext.request.method}.

    我们可以使用pageContext JSP EL隐式对象获取请求对象引用,并使用点运算符获取JSP页面中的HTTP方法名称。 为此的JSP EL代码将是${pageContext.request.method}

  22. 什么是JSP标准标记库,提供一些示例用法? (What is JSP Standard Tag Library, provide some example usage?)

    JSP Standard Tag Library or JSTL is more versatile than JSP EL or Action elements because we can loop through a collection or escape HTML tags to show them like text in response.

    JSTL is part of the Java EE API and included in most servlet containers. But to use JSTL in our JSP pages, we need to download the JSTL jars for your servlet container. Most of the times, you can find them in the example projects and you can use them. You need to include these libraries in the project WEB-INF/lib directory. These jars are container specific, for example in Tomcat, we need to include jstl.jar and standard.jar jar files in the project build path.

    Read more about JSTL tags with example program at JSTL Tutorial.

    JSP标准标记库或JSTL比JSP EL或Action元素更具通用性,因为我们可以循环遍历一个集合或转义HTML标记以将它们显示为文本,以作为响应。

    JSTL是Java EE API的一部分,并包含在大多数Servlet容器中。 但是要在我们的JSP页面中使用JSTL,我们需要为您的servlet容器下载JSTL jar。 大多数时候,您可以在示例项目中找到它们并使用它们。 您需要在项目WEB-INF / lib目录中包含这些库。 这些jar是特定于容器的,例如在Tomcat中,我们需要在项目构建路径中包括jstl.jar和standard.jar jar文件。

    JSTL教程中通过示例程序阅读有关JSTL标签的更多信息。

  23. JSTL标签的类型是什么? (What are the types of JSTL tags?)

    Based on the JSTL functions, they are categorized into five types.

    1. Core Tags – Core tags provide support for iteration, conditional logic, catch exception, url, forward or redirect response etc.
    2. Formatting and Localization Tags – These tags are provided for formatting of Numbers, Dates and i18n support through locales and resource bundles.
    3. SQL Tags – JSTL SQL Tags provide support for interaction with relational databases such as Oracle, MySql etc.
    4. XML Tags – XML tags are used to work with XML documents such as parsing XML, transforming XML data and XPath expressions evaluation.
    5. JSTL Functions Tags – JSTL tags provide a number of functions that we can use to perform common operation, most of them are for String manipulation such as String Concatenation, Split String etc.

    基于JSTL函数,它们分为五种类型。

    1. 核心标签–核心标签提供对迭代,条件逻辑,捕获异常,URL,转发或重定向响应等的支持。
    2. 格式和本地化标签-这些标签用于通过区域设置和资源包格式化数字,日期和i18n支持。
    3. SQL标记– JSTL SQL标记提供与关系数据库(例如Oracle,MySql等)交互的支持。
    4. XML标记– XML标记用于处理XML文档,例如解析XML,转换XML数据和XPath表达式求值。
    5. JSTL函数标签– JSTL标签提供了许多我们可以用来执行常见操作的函数,其中大多数用于字符串操作,例如字符串连接,拆分字符串等。
  24. 什么是JSP自定义标签,它是什么组成部分? (What is JSP Custom Tag and what are it’s components?)

    Sometimes JSP EL, Action Tags and JSTL tags are not enough and we might get tempted to write java code to perform some operations in JSP page. Fortunately JSP is extendable and we can create our own custom tags to perform certain operations.

    We can create JSP Custom Tags with following components:

    • JSP Custom Tag Handler
    • Creating Tag Library Descriptor (TLD) File
    • Deployment Descriptor Configuration for TLD

    We can add custom tag library in JSP page using taglib directive and then use it.

    有时,JSP EL,Action标签和JSTL标签还不够,我们可能会倾向于编写Java代码来在JSP页面中执行一些操作。 幸运的是,JSP是可扩展的,我们可以创建自己的自定义标签来执行某些操作。

    我们可以使用以下组件创建JSP自定义标签:

    • JSP自定义标记处理程序
    • 创建标签库描述符(TLD)文件
    • TLD的部署描述符配置

    我们可以使用taglib指令在JSP页面中添加自定义标签库,然后使用它。

  25. 举一个需要使用JSP自定义标签的示例吗? (Give an example where you need JSP Custom Tag?)

    Let’s say we want to show a number with formatting with commas and spaces. This can be very useful for user when the number is really long. So we want some custom tags like below:

    <mytags:formatNumber number="123456.789" format="#,###.00"/>

    Based on the number and format passed, it should write the formatted number in JSP page, for the above example it should print 123,456.79

    We know that JSTL doesn’t provide any inbuilt tags to achieve this, so we will create our own custom tag implementation and use it in the JSP page.

    Read above example implementation at JSP Custom Tag.

    假设我们要显示带有逗号和空格格式的数字。 当数字非常长时,这对用户非常有用。 所以我们想要一些自定义标签,如下所示:

    <mytags:formatNumber number="123456.789" format="#,###.00"/>

    根据传递的数字和格式,它应该在JSP页面中写入格式化的数字,对于上面的示例,它应该打印123,456.79

    我们知道JSTL不提供任何内置标签来实现此目的,因此我们将创建自己的自定义标签实现并在JSP页面中使用它。

    阅读JSP Custom Tag上的上述示例实现。

  26. 为什么我们不需要在web.xml中配置JSP标准标记? (Why don’t we need to configure JSP standard tags in web.xml?)

    We don’t need to configure JSP standard tags in web.xml because the TLD files are inside the META-INF directory of the JSTL jar files. When container loads the web application and finds TLD files inside the META-INF directory of the JAR file, it automatically configures them to be used directly in the application JSP pages. All we need to do it to include it in the JSP page using taglib directive.

    我们不需要在web.xml中配置JSP标准标记,因为TLD文件位于JSTL jar文件的META-INF目录内。 当容器加载Web应用程序并在JAR文件的META-INF目录中找到TLD文件时,它将自动配置它们以直接在应用程序JSP页面中使用。 使用taglib指令将其包括在JSP页面中,我们需要做的所有事情。

  27. 我们如何处理JSP服务方法引发的异常? (How can we handle exceptions thrown by JSP service method?)

    To handle exceptions thrown by the JSP page, all we need is an error page and define the error page in JSP using page directive.

    To create a JSP error page, we need to set the page directive attribute isErrorPage value to true, then we can access exception implicit object in the JSP and use it to send a customized error message to the client.

    We need to define exception and error handler JSP pages in the deployment descriptor like below.

    <error-page><error-code>404</error-code><location>/error.jsp</location>
    </error-page><error-page><exception-type>java.lang.Throwable</exception-type><location>/error.jsp</location>
    </error-page>

    Read more with example program at JSP Exception Handling.

    要处理JSP页面引发的异常,我们需要的是一个错误页面,并使用page指令在JSP中定义错误页面。

    要创建JSP错误页面,我们需要将页面指令属性isErrorPage值设置为true,然后才能访问JSP中的异常隐式对象,并使用它将定制的错误消息发送给客户端。

    我们需要在部署描述符中定义异常和错误处理程序JSP页面,如下所示。

    JSP异常处理中有关示例程序的信息。

  28. 我们如何捕获异常并使用JSTL处理它? (How do we catch exception and process it using JSTL?)

    We can use JSTL Core tags c:catch and c:if to catch exception inside the JSP service method and process it. c:catch tag catches the exception and wraps it into the exception variable and we can use c:if condition tag to process it. Below code snippet provide sample usage.

    <c:catch var ="exception"><% int x = 5/0;%>
    </c:catch><c:if test = "${exception ne null}"><p>Exception is : ${exception} <br />Exception Message: ${exception.message}</p>
    </c:if>

    Notice the use of JSP EL in the c:if condition.

    我们可以使用JSTL Core标记c:catch和c:if来捕获JSP服务方法中的异常并对其进行处理。 c:catch标记捕获异常并将其包装到异常变量中,我们可以使用c:if条件标记对其进行处理。 下面的代码段提供了示例用法。

    注意在c:if条件下使用JSP EL。

  29. 我们如何在JSP中打印“ <br>用HTML创建新行”? (How do we print “<br> creates a new line in HTML” in JSP?)

    We can use c:out escapeXml attribute to escape the HTML elements so that it get’s shown as text in the browser, for this scenario we will write code like below.

    <c:out value="<br> creates a new line in HTML" escapeXml="true"></c:out>

    我们可以使用c:out escapeXml属性来转义HTML元素,以便在浏览器中将其显示为文本,对于这种情况,我们将编写以下代码。

  30. 部署描述符中的jsp-config是什么? (What is jsp-config in deployment descriptor?)

    jsp-config element is used to configure different parameters for JSP pages. Some of it’s usage are:

    • Configuring tag libraries for the web application like below.

      <jsp-config><taglib><taglib-uri>https://journaldev.com/jsp/tlds/mytags</taglib-uri><taglib-location>/WEB-INF/numberformatter.tld</taglib-location></taglib>
      </jsp-config>
    • We can control scripting elements in JSP pages.
    • We can control JSP Expression Language (EL) evaluation in JSP pages.
    • We can define the page encoding for URL pattern.
    • To define the buffer size to be used in JSP page out object.
    • To denote that the group of resources that match the URL pattern are JSP documents, and thus must be interpreted as XML documents.

    jsp-config元素用于为JSP页面配置不同的参数。 它的一些用法是:

    • 为Web应用程序配置标签库,如下所示。
    • 我们可以控制JSP页面中的脚本元素。
    • 我们可以在JSP页面中控制JSP表达式语言(EL)评估。
    • 我们可以为URL模式定义页面编码。
    • 定义要在JSP页面输出对象中使用的缓冲区大小。
    • 为了表示与URL模式匹配的资源组是JSP文档,因此必须解释为XML文档。
  31. 如何忽略JSP中的EL表达式评估? (How to ignore the EL expression evaluation in a JSP?)

    We can ignore EL evaluation in JSP page by two ways.

    1. Using page directive as <%@ page isELIgnored="true" %>
    2. Configuring in web.xml – better approach when you want to disable EL evaluation for many JSP pages.
      <jsp-config><jsp-property-group><url-pattern>*.jsp</url-pattern><el-ignored>true</el-ignored></jsp-property-group>
      </jsp-config>

    我们可以通过两种方式忽略JSP页面中的EL评估。

    1. 将页面指令用作<%@ page isELIgnored="true" %>
    2. 在web.xml中配置–当您要对许多JSP页面禁用EL评估时,这是一种更好的方法。
  32. 容器何时会初始化多个JSP / Servlet对象? (When will Container initialize multiple JSP/Servlet Objects?)

    If we have multiple servlet and servlet-mapping elements in deployment descriptor for a single servlet or JSP page, then container will initialize an object for each of the element and all of these instances will have their own ServletConfig object and init params.

    For example, if we configure a single JSP page in web.xml like below.

    <servlet><servlet-name>Test</servlet-name><jsp-file>/WEB-INF/test.jsp</jsp-file><init-param><param-name>test</param-name><param-value>Test Value</param-value></init-param>
    </servlet><servlet-mapping><servlet-name>Test</servlet-name><url-pattern>/Test.do</url-pattern>
    </servlet-mapping><servlet><servlet-name>Test1</servlet-name><jsp-file>/WEB-INF/test.jsp</jsp-file>
    </servlet><servlet-mapping><servlet-name>Test1</servlet-name><url-pattern>/Test1.do</url-pattern>
    </servlet-mapping>

    如果在单个servlet或JSP页面的部署描述符中有多个servlet和servlet映射元素,则容器将为每个元素初始化一个对象,并且所有这些实例将具有自己的ServletConfig对象和init参数。

    例如,如果我们在web.xml中配置单个JSP页面,如下所示。

  33. Then if we can access the same JSP page with both the URI pattern and both will have their own init params values.

    然后,如果我们可以使用URI模式访问相同的JSP页面,那么两者都将具有自己的初始化参数值。

  34. 我们可以在JSP Pages中使用JavaScript吗? (Can we use JavaScript with JSP Pages?)

    Yes why not, I have seen some developers getting confused with this. Even though JSP is a server-side technology, it’s used to generate a client-side response and we can add javascript or CSS code like any other HTML page.

    是的,为什么不呢,我已经看到一些开发人员对此感到困惑。 即使JSP是一种服务器端技术,它也用于生成客户端响应,并且我们可以像其他任何HTML页面一样添加javascript或CSS代码。

  35. 我们如何防止在JSP中创建隐式会话? (How can we prevent implicit session creation in JSP?)

    By default JSP page creates a session but sometimes we don’t need session in JSP page. We can use JSP page directive session attribute to indicate compiler to not create session by default. It’s default value is true and session is created. To disable the session creation, we can use it like below.

    <%@ page session="false" %>

    默认情况下,JSP页面创建一个会话,但有时我们不需要JSP页面中的会话。 我们可以使用JSP页面指令session属性来指示编译器默认情况下不创建会话。 默认值为true,并创建会话。 要禁用会话创建,我们可以像下面这样使用它。

  36. JspWriter和Servlet PrintWriter有什么区别? (What is difference between JspWriter and Servlet PrintWriter?)

    PrintWriter is the actual object responsible for writing the content in response. JspWriter uses the PrintWriter object behind the scene and provide buffer support. When the buffer is full or flushed, JspWriter uses the PrintWriter object to write the content into response.

    PrintWriter是负责编写响应内容的实际对象。 JspWriter在后台使用PrintWriter对象并提供缓冲区支持。 当缓冲区已满或刷新时,JspWriter使用PrintWriter对象将内容写入响应。

  37. 我们如何扩展JSP技术? (How can we extend JSP technology?)

    We can extend JSP technology with custom tags to avoid scripting elements and java code in JSP pages.

    我们可以使用自定义标签扩展JSP技术,以避免在JSP页面中编写脚本元素和Java代码。

  38. 提供一些JSP最佳实践? (Provide some JSP Best Practices?)

    Some of the JSP best practices are:

    1. Avoid scripting elements in JSP pages. If JSP EL, action elements and JSTL not serve your needs then create custom tags.
    2. Use comment properly, use JSP comments for code level or debugging purpose so that it’s not sent to client.
    3. Avoid any business logic in JSP page, JSP pages should be used only for response generation for client.
    4. Disable session creation in JSP page where you don’t need it for better performance.
    5. Use page, taglib directives at the start of JSP page for better readability.
    6. Proper use of jsp include directive or include action based on your requirements, include directive is good for static content whereas include action is good for dynamic content and including resource at runtime.
    7. Proper exception handling using JSP error pages to avoid sending container generated response incase JSP pages throw exception in service method.
    8. If you are having CSS and JavaScript code in JSP pages, it’s best to place them in separate files and include them in JSP page.
    9. Most of the times JSTL is enough for our needs, if you find a scenario where it’s not then check your application design and try to put the logic in a servlet that will do the processing and then set attributes to be used in JSP pages.

    JSP的一些最佳实践是:

    1. 避免在JSP页面中编写脚本元素。 如果JSP EL,操作元素和JSTL无法满足您的需求,则创建自定义标签。
    2. 正确使用注释,将JSP注释用于代码级别或调试目的,以免将其发送给客户端。
    3. 避免在JSP页面中使用任何业务逻辑,JSP页面应仅用于为客户端生成响应。
    4. 在不需要它的JSP页面中禁用会话创建,以提高性能。
    5. 在JSP页面的开头使用page,taglib伪指令可以提高可读性。
    6. 根据您的需求正确使用jsp include指令或include操作,include指令适合静态内容,而include操作则适合动态内容并在运行时包含资源。
    7. 如果JSP页面在服务方法中引发异常,则使用JSP错误页面正确处理异常,以避免发送容器生成的响应。
    8. 如果您在JSP页面中包含CSS和JavaScript代码,则最好将它们放在单独的文件中,并将其包含在JSP页面中。
    9. 在大多数情况下,JSTL足以满足我们的需求,如果您发现没有这种情况,则请检查您的应用程序设计,然后尝试将逻辑放入将进行处理的Servlet中,然后设置要在JSP页面中使用的属性。

Please let me know if I have missed any important JSP interview question, I will be adding more to the list in the future.

如果我错过了任何重要的JSP面试问题,请让我知道,将来我将在列表中添加更多内容。

翻译自: https://www.journaldev.com/2110/jsp-interview-questions-and-answers

jsp面试问题

jsp面试问题_JSP面试问答相关推荐

  1. 美团面试,360面试 ,滴滴面试,阿里面试,百度面试,京东面试,搜狗面试:

    一.基础知识:   1.CurrentHashMap的数据结构,Java1.8 与 java 1.7的区别,增加了那些特性 这个其实是考了一下编程思路,hashMap(链表+数组)==>1.8之 ...

  2. 记录阿里内推面试经历---第一次面试经历,找工作的第一步

    长达四十天的阿里内推面试终于结束了,虽然最终失败,但还是想总结一下,也算是记录一下经验教训,和大家一起共勉.先说一下前提,由于导师有要求研 究生得待够两年才能出去,所以这学期还没打算出去,之前也不知道 ...

  3. 刷题百道却跪在白板面试?白板面试FAQ为你答疑解惑

    专栏 | 九章算法 网址 | www.jiuzhang.com 你花了大量的时间学习如何编程.学习如何创建项目.终于你通过自己的努力收到了梦寐以求的公司发来的面试邀请函.但是这时候,你却发现你的面前又 ...

  4. 工作那些事(十六)面试时,面试官喜欢的非技术问题汇总

    在找工作的过程中,进行技术和人事面试时不可避免的.有的人笔试答的挺好,挂在了面试的时候,确实很可惜的.一般来说,技术性的岗位是笔试(有的还有性格测试题).技术面试.人事面试.这里汇总一下面试时,面试官 ...

  5. 美国面试之旅——面试经验分享

    鉴于前几篇日志仅仅是分享了面试的经历,并没有太多实质性的"有用信息"(当然面试流程,公司概况等等信息其实也是有点用的,不过远远不够),如果不写一篇有用一点的日志,估计要遭大家扔鸡蛋 ...

  6. 疫情之下的求职姿势:视频面试,电话面试这样做,你就已经赢一半了!

    谨以这篇攻略文,送给诸位疫情之下的求职者,希望添点助力,帮你逆风飞扬,闪亮职场! 泰然处之,从容淡定 欲善其事,先利其器 树立良好的第一印象 1泰然处之,从容淡定 第一条基本原则:不要慌! 不同于现场 ...

  7. 上海集成电路材料研究院-面试经历-取消面试

    网上关于这个单位的信息啥都没有, 负责面试的人力,跟她沟通是什么都问不出来. 哎... 根据面试通知,是这么几位,查了下他们的背景. 面试官们 面试官背景 专业方向 朱雷 <lei.zhu@si ...

  8. 面试官是怎样高效面试的(面试官的“套路”

    大家好,我是若川.持续组织了6个月源码共读活动,感兴趣的可以点此加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步.同时极力推荐订阅我写的<学习源码整体架构系列& ...

  9. 程序员美团面试挂了,7天后去腾讯面试,见到面试官:好巧啊!!

    说起来,职场上很多事情,只能用一个"缘分"来解释.近日在职场论坛上看到有员工发帖,他说自己在面试时遇到了一件最悲哀的事情?在上个月去美团面试的时候,由于发挥不太好,面试挂了.当时那 ...

最新文章

  1. POJ 1002题 解题报告
  2. 石头剪刀布 -2013编程之美全国测试赛 每日一练
  3. python创建实例会调用哪些魔术方法_Python最会变魔术的魔术方法,我觉得是它!...
  4. Opencv-python官方学习入门资料,vs+python+opencv初识读图片打开相机
  5. NOJ1060接苹果——DP
  6. Bochs、虚拟软盘与BootLoader
  7. spring cloud 复杂类型 FeignClient 避免linkedHashMap
  8. 本体、语义网络和知识图谱的概念与区别
  9. Verilog 实现占空比为3/5 2/5 1/5 50% 的五分频信号 断言SVA查看波形
  10. 30.PCIe扫盲——TLP Header详解(一)
  11. 小说更新太慢怎么办_小说:圣墟(挺好看的一部小说,现在更新非常慢)
  12. 【图像转换】基于matlab灰度图像转换彩色图像【含Matlab 1233期】
  13. Material Design的基础知识
  14. 在图像中使用LaTex公式及标注箭头的使用
  15. VMware P2V 转换实验
  16. C#中System.Timers.Timer定时器的使用和定时自动清理内存的应用
  17. java接受JSON字符串
  18. sql-索引的作用(超详细)
  19. 深度学习100例 | 第41天:语音识别 - PyTorch实现
  20. 关于QQ2009聊天消息获取原理说明 .

热门文章

  1. 给员工授予svn相关权限
  2. perl中的文件句柄
  3. [转载] python中的numpy模块和pandas模块的区别_numpy 模块和 pandas 模块
  4. [转载] Python全栈(1)—— Python如何快速下载库与jupyter notebook 的基本使用
  5. Entity Framework 与 面向对象
  6. HTML头标签使用-又一次定向,refresh
  7. Touch事件分发源码解析
  8. 使用C语言和Java分别实现冒泡排序和选择排序
  9. 操作可能会破坏运行时稳定性的解决办法
  10. 2011下半年信息系统项目管理师考后感