gpt4 book ai didi

java - jsp:useBean属性官方文档

转载 作者:行者123 更新时间:2023-12-02 12:17:04 25 4
gpt4 key购买 nike

我是 Java ee 的初学者,我正在尝试了解 jsp 的工作原理。

<jsp:useBean> ,我想更多地了解一些可用的不同属性。

通过基本的谷歌搜索,我可以轻松找到有关类的 Oracle 文档,例如 HttpServlet, HttpServletResponse等等,但是搜索术语jsp useBean documentation没有显示类似的 Oracle 官方文档页面。

我只是想知道,当我想查看有关 JSP 技术的 Oracle 官方文档时,什么是好的搜索策略?

最佳答案

您可以查看这个documentation来自甲骨文。

所提供链接的内容:

The <jsp:useBean> tag locates or instantiates a JavaBeans component. The <jsp:useBean> tag first attempts to locate an instance of the bean. If the bean does not exist, <jsp:useBean> instantiates it from a class or serialized template. To locate or instantiate the bean, <jsp:useBean> takes the following steps, in this order:

  1. Attempts to locate a bean with the scope and name you specify.
  2. Defines an object reference variable with the name you specify. If it finds the bean, stores a reference to it in the variable. If you specified type, gives the bean that type.
  3. If it does not find the bean, instantiates it from the class you specify, storing a reference to it in the new variable. If the class name represents a serialized template, the bean is instantiated by java.beans.Beans.instantiate.
  4. If <jsp:useBean> has instantiated (rather than located) the bean, and if it has body tags or JSP tags (between <jsp:useBean> and </jsp:useBean>), executes the body tags.

Syntax

<jsp:useBean id="beanInstanceName" scope="page|request|session|application"
{
class="package.class" [ type="package.class" ]|
beanName="{package.class |
<%= expression %>}" type="package.class" |
type="package.class"
}
{ /> | > other tags </jsp:useBean> }

关于java - jsp:useBean属性官方文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46097204/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com