html中用自定义嵌套写,在动态内容(嵌套标签)中嵌入自定义标签而不是呈现...

在动态内容(嵌套标签)中嵌入自定义标签而不呈现。在动态内容(嵌套标签)中嵌入自定义标签而不是呈现

我有一个页面,从javabean中提取动态内容,并将对象列表传递给自定义标签以处理为html。在每个对象中都有一堆要输出的html文件,其中包含我想要呈现的另一个自定义标签。问题是标记调用呈现为明文。

一个例子可能会让我更好。

1从数据库中获取信息并通过javabean将其返回给页面。将此信息发送到自定义标签以进行输出。

这个标签应输出框格,像这样

*SNIP* class for custom tag def and method setup etc

out.println("

");

out.println(" " + importantNotice.getMessage());

out.println("

Posted: " + importantNotice.getDateFrom() + " End: " + importantNotice.getDateTo()
");

out.println("

- " + importantNotice.getAuthor() + "
");

out.println("

");

*SNIP*

这使得罚款和预期

This is a very important message. Everyone should pay attenton to it.

Posted: 2008-09-08 End: 2008-09-08
- The author

2如果在上面的例子,比如,我是来在importantNotice.getMessage()中有一个自定义标签字符串:

*SNIP* "This is a very important message. Everyone should pay attenton to it. Quote this" *SNIP*

重要通知呈现良好,但引号标记不会被处理,只是插入到字符串中并放置为纯文本/ html标记。

This is a very important message. Everyone should pay attenton to it. Quote this

Posted: 2008-09-08 End: 2008-09-08
- The author

不是

This is a very important message. Everyone should pay attenton to it.

Quote this Some Guy
// or wahtever I choose as the output
Posted: 2008-09-08 End: 2008-09-08
- The author

我知道这与处理器和预处理器做,但我不肯定有关如何使这项工作。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值