Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsp 使用Scriptlet变量调用EL函数_Jsp_El_Scriptlet - Fatal编程技术网

Jsp 使用Scriptlet变量调用EL函数

Jsp 使用Scriptlet变量调用EL函数,jsp,el,scriptlet,Jsp,El,Scriptlet,我似乎遇到了一个奇怪的问题,无法将Scriptlet变量传递给EL函数调用。它将正常运行,但它发送一个空值,而不是我在jsp中设置的值。。。我觉得我错过了一些非常基本的东西 <!DOCTYPE html> <html> <head> <%@ Sudo / All other tag's required.... %> <%@ taglib prefix="fn_" uri="/WEB-INF/tags.tld

我似乎遇到了一个奇怪的问题,无法将Scriptlet变量传递给EL函数调用。它将正常运行,但它发送一个空值,而不是我在jsp中设置的值。。。我觉得我错过了一些非常基本的东西

<!DOCTYPE html>
<html>
<head>


<%@ Sudo / All other tag's required.... %>
<%@ taglib prefix="fn_" uri="/WEB-INF/tags.tld" %>

    <script>
    
<%  LinkedList<MyBean> mb = (LinkedList<MyBean>)request.getAttribute("mBean"); %>
<%  String f="first"; %>
    </script>

</head>

        <td>${fn_:getMyBean(mb,f)}</td>


设置
f
的值,如下所示:

<c:set var="f" scope="request" value="first"/> 
${fn_:getMyBean(mb,f)}

设置
f
的值,如下所示:

<c:set var="f" scope="request" value="first"/> 
${fn_:getMyBean(mb,f)}

您是否尝试过
然后
${fn\uu:getMyBean(mb,f)}
?感谢您的快速响应。是的,那样做确实让我通过了,谢谢。我曾经尝试过类似的方法,但这样做是不正确的:您是否尝试过
,然后
${fn\ux:getMyBean(mb,f)}
?感谢您的快速响应。是的,那样做确实让我通过了,谢谢。我曾尝试过类似的方法,但这样做是不正确的: