如何用struts2创建动态图像? [英] How to create dynamic images with struts2?

查看:26
本文介绍了如何用struts2创建动态图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 strut2 中, 标签消失了.如何创建动态图像?

In strut2, the <s:img> tag is gone. How can I create dynamic images?

更新

我想根据值堆栈中的参数(如 ${userName_})设置图像 'src'.

I want to set the image 'src' according to a parameter in the value stack (like ${userName_}).

推荐答案

我在 struts2 的官方网站上搜索,发现他们没有提供动态图像标签.有一个提供此功能的 struts2 图像插件,但它处于 alpha 阶段.http://code.google.com/p/s2-image/.最后,我不得不在纯 JSP 代码中做到这一点.

I did a search on the struts2's offical website and found they doesn't provide a dynamic image tag. There is a struts2 image plug which provide this, however it is in alpha stage. http://code.google.com/p/s2-image/. At last, I had to do this in pure JSP codes.

更新Gashhh...还有另一种简单的方法是使用 <img src=<s:text name="genTP"/>/>.不过我觉得挺奇怪的.

Update Gashhh...There is another simple way by using <img src=<s:text name="genTP" /> />. But I think is quite strange.

这篇关于如何用struts2创建动态图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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