JSP EL参数列表/接口 [英] JSP EL parameter list / interface

查看:73
本文介绍了JSP EL参数列表/接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JSP中是否有一种机制(最好是编译时)为EL可以访问的JSP指定必需的参数,或者可用对象始终是未知的?

Is there at a mechanism (preferably compile-time) in JSP to specify required parameters for the JSP accessible by EL, or are the available objects always unknown?

在某些情况下,我想指定JSP期望至少具有某些 types 的某些 named 参数.

There are cases where I want to specify that the JSP expects at least certain named parameters with certain types.

推荐答案

您可以查看标记文件,其中attribute页面指令可能适合您的需求.该指令允许您指定名称,类型,是否需要属性等.

You can look into Tag Files, where the attribute page directive may suit your needs. This directive allows you to specify the name, type, whether the attribute is required, etc.

这篇关于JSP EL参数列表/接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆