2

I have the following jsp:

...
<jsp:include page="../imageMenu.jspf"/>
...

When I open following jsp when application run under the tomcat 8 I see that my include replaces with empty string.

When I run application under the jetty - it renders good.

As I undestand the problem related with format of included file because I don't see problem with jsp files included when I run application under the tomcat.

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

2 Answers2

1

Working after adding

<url-pattern>*.jspf</url-pattern>

to web.xml

result:

<servlet-mapping>
        <servlet-name>servletname</servlet-name>
        <url-pattern>*.jsp</url-pattern>
        <url-pattern>*.jspx</url-pattern>
        <url-pattern>*.jspf</url-pattern>
    </servlet-mapping>
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
  • It's not a solution, if your servlet use a main jsp file which include a jsp fragment this solution failed – bedomon Jun 15 '21 at 09:21
0

Can you try using full path.

<jsp:include page="/WEB-INF/JSPs/repo1/repo2/imageMenu.jspf"></jsp:include>