This discussion is archived
0 Replies Latest reply: Aug 16, 2011 4:28 AM by 882579 RSS

Include JSP Code (From Database) Into Another JSP Page

882579 Newbie
Currently Being Moderated
Hi,

I am new in J2EE (not in Java) and I would like to know if there is any way to include a JSP code inside a JSP page. I am using tomcat and apache servers.

What my boss wants me to do is to store JSP code in a field in the database (MySql). And later, when running the application, the program should be able to get that JSP code (from the database) and include in a JSP to execute it.

I have tried with the taglib <jsp:include page="page.jsp"> but it needs that the page.jsp has been previously created and loaded to the "webapps" directory. Moreover, this taglib cannot access to any directory or file outside the "webapps" directory. Also the "webapps" is read-only, so I can't create a new JSP page with the code...

I have been looking around but I don't find any way to do this...

Do you know if it is possible??

Many thanks in advance.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points