本文介绍了从.jsp到html页面的变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 .jsp
页面,它传递来自servlet的变量。
假设我有一个 .jsp
页面,比如
I have a .jsp
page that passes the variable from the servlet.Lets assume that I have a .jsp
page like
...
<body>
${Variable}
</body>
...
并假定 variable =哦,我的上帝
。还行吧。但是我怎样才能把这个变量放到 .html
页面,浏览器将显示变量的值?
and lets also assume that variable = "oh my god"
. This is OK. But how I can put this variable to the .html
page that the browser will show the value of the variable?
推荐答案
您需要这样做:
You need to do this:
<%= Variable %>
产生的HTML将会是:
The resulting HTML will be:
<body>
oh my god
</body>
这篇关于从.jsp到html页面的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!