Tiago,我不知道如何解决您的 确切 问题,但是您可以从文件中解释JSP代码。只需创建一个RequestDispatcher并包含JSP:
public int doStartTag() throws JspException { ServletRequest request = pageContext.getRequest(); ServletResponse response = pageContext.getResponse(); RequestDispatcher disp = request.getRequestDispatcher("/test.jsp"); try { disp.include(request, response); } catch (ServletException e) { throw new JspException(e); } catch (IOException e) { throw new JspException(e); } return super.doStartTag();}我在Liferay Portlet中测试了此代码,但是我相信它无论如何也应该在其他上下文中工作。如果没有,我想知道:)
高温超导



