从.jsp到html页面的变量 [英] variable from .jsp to the html page

查看:253
本文介绍了从.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页面的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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