JSP动态网页生成 [英] JSP dynamic web page generation

查看:43
本文介绍了JSP动态网页生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我们的用户构建应用程序,我们需要正确的设计和正确的技术.这是要求.根据用户模板的选择,我们需要生成动态网页,应动态构建它们,然后用户输入/编辑数据并添加一些注释,然后单击另存为TIFF".

I am trying to build an application for our users, we need a correct design and right technologies. Here is the requirement. Based on user template selection we need to generate dynamic web pages, they should be constructed on fly and user enters/edits data and add some comments and he clicks "Save as TIFF".

我的想法和问题.

  1. 由于我们大约有100个模板,因此大多数布局和内容都不同.动态生成100个模板的jsp页面并不像在纸上那样容易.我用XML定义了我们所有的模板属性,并使用JAXB生成了Java对象,最后,JSF呈现XML数据.我们做对了还是有更好的办法?

  1. Since we have around 100 templates with most of the layout and content is different. Generating jsp pages on fly for 100 templates is not an easy as in paper. I defined all our template attributes in XML and generated java objects using JAXB, finally JSF to render XML data. Are we doing it correct or is there any better way?

将生成的JSP数据转换为 tiff .用户输入/编辑数据后,我们将使用 JasperReports 将数据转换为PDF.最后,ICE Faces技术将其转换为 TIFF .我觉得我们正在做一些额外的工作,将用户输入的数据/表单数据转换为 pdf ,然后将 pdf 转换为 TIFF .有什么更好的方法吗?

Converting the generated JSP data to tiff. Once the user enter/edit data we convert the data to PDF using JasperReports. And Finally ICE Faces technology to convert it to TIFF. I feel we are doing some extra work converting the user entered data/ form data to pdf and then converting pdf to TIFF. Is there any better way to do this?

我也在查看Velocity模板引擎,看是否符合我们的要求.

I am also looking at Velocity templates engine to see if that fits our requirement.

再次感谢大家.

-SPD

推荐答案

  1. 使用Velocity Engine,您将走在正确的道路上,因为这为动态视图生成提供了最佳方法.如果您想使其更坚固,更清洁,则可以将Spring MVC与速度视图一起使用.这样,Spring MVC将重定向到速度视图.您还可以在Spring MVC中查看PDF视图.

  1. With Velocity Engine you are on the right track because that provides the best way for dynamic view generation. If you want to make it more robust and cleaner you can use Spring MVC along with velocity view. SO that the Spring MVC will redirect to velocity view. You can also take a look at PDF view in spring MVC.

您可以尝试使用Apache Sanselan库(http://commons.apache.org/sanselan/)生成图像.不确定是否满足您的要求,但看起来确实很有希望.

You can try using Apache Sanselan library(http://commons.apache.org/sanselan/) to generate images. Not sure if that satisfies your requirement but it does look promising.

这篇关于JSP动态网页生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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