The jsp-file directive

The jsp-file directive in web.xml allows mapping of JSPs to concrete URLs:

<servlet>
<servlet-name>My Hidden Page</servlet-name>
<jsp-file>/mydir/foo.jsp</jsp-file>
</servlet>

<servlet-mapping>
<servlet-name>My Hidden Page</servlet-name>
<url-pattern>/hidden</url-pattern>
</servlet-mapping>

Shame on me, I didn’t know about this.

As seen here:

http://mail-archives.apache.org/mod_mbox/tomcat-users/200107.mbox/%3CPine.BSF.4.21.0107271807540.7976-100000@localhost%3E

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s