[英]how to get the content of JSP page from the Servlet?
I need to get the content of a jsp page from a servlet without redirect or forward, like a file for security issues, I'll process the HTML and write the new generated HTML in the servlet response. 我需要从servlet获取jsp页面的内容而不进行重定向或转发,例如用于安全性问题的文件,我将处理HTML并将新生成的HTML写入servlet响应中。 How can I do that? 我怎样才能做到这一点?
An example of what I'm trying to do: 我正在尝试做的一个例子:
if (request.getParameter("pageName").equals("index")) {
//get index.jsp content and process it...
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.