java - How to include JSP from jar lib -


I have a lot of obe project, which is normal for other applications. I want to put one of the few JSP files and then include and or & lt;% ... but I do this Not able to.

Is there any way to get this?

If there is one, which is better, include instructions ( @include file ..) or verb ( & lt; jsp: included page ...)?

thanks

I only know one way

  1. Put JSP in the /ETA-INF / Resources folder.
  2. Create a 'Lib' folder inside the web-ins folder War.
  3. Keep jars in the lib folder of the war (containing JSP in the / META-INF / resources folder).
  4. The main JSP where you want to keep this external JSP in jar, use the following statement: & lt; Jsp: include page = "/ myJSP.jsp" & gt; & Lt; / Jsp: include & gt; Note that JSP requires a 'JSP file name' in front of a pure path for JSP (and hence in the jar in the liberation folder), rather than in the current path where the main JSP is lying .

This will definitely work.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -