在运行时评估动态构建的 JSP

发布于 2024-08-11 11:56:03 字数 199 浏览 3 评论 0原文

我有一个要求,JSP 页面本身由用户创建并存储在数据库中。查看结果时,我们需要将此 JSP 呈现给客户端,评估此 JSP 内的所有标签。

我知道这是可行的,因为 OpenCMS 和 Blogger 都实现了此功能。但是,我就是找不到正确的方法。

有关如何执行此操作的任何指示?

[已添加] 注意:我无法为此目的在磁盘上写入临时文件:(

I have a requirement where in the JSP page itself is created by the user and stored in the database. When viewing results we need to render this JSP to the client, evaluating all tags inside this JSP.

I am aware that it is doable as OpenCMS and Blogger both implement this functionality. But, I just can't find the right way.

Any pointers on how to do this?

[Added] Note: I cannot write a temporary file on disk for the purpose :(

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

究竟谁懂我的在乎 2024-08-18 11:56:03

正如 ChssPly76 在评论中指出的那样,这个问题最近被讨论过。您可以将其作为文件存储在网络内容中并将请求转发给它。请参阅我发布的代码示例的链接。

As ChssPly76 pointed out in the comment this issue was recently discussed. You can just store it as file in the webcontent and forward the request to it. See the link for an code example which I posted.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文