Hi,
I'm adding a bit of functionality to an existing, large web application. The functionality doesn't generate any HTML. Essentially it just makes calls to a bunch of libraries to generate a pdf document. I'm new to
j2ee but this seems liike a job for a
servlet rather than a
jsp. The problem is that the web application is almost 100% jsp based. As such there are three or four jsps which set up and initialize a bunch of necessary hooks into the server environment. So, one of the jsps might look like this:
<%@ include file="../setup/setup2.jspf"%>
<%@ include file="../setup/setup2.jspf"%>
<%@ include file="../setup/setup2.jspf"%>
<%@ include file="../setup/setup2.jspf"%>
<%
Object myObject = ObjectManager.getObject("someString");
%>
where the ObjectManager instance is set up in one of the statically included jsps. I looked into trying to replicate the setup code in my servlet, but it's too complicated to be practical. So, the path of least resistence is just to create a jsp, include the setup files and then just do everything in one big scriptlet. If I really wanted to go with a servlet instead, is there some way to manage this? I know that I can't actually static include a jsp into a servlet, but what if I created a jsp for just the purpose of statically including the file and then forwarded the request to a Servlet? That wouldn't work right? Does anyone have any other suggestions?
Thanks.