users@glassfish.java.net

Re: JSP

From: <forums_at_java.net>
Date: Fri, 17 Jun 2011 12:55:43 -0500 (CDT)

All web containers contains a mapping for the JSP servlet.  This mapping
determines what resources are handled by the JSP servlet.  For glassfish,
this mapping is in domains/domain1/config/default-web.xml:

  <servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.jsp</url-pattern>
    <url-pattern>*.jspx</url-pattern>
  </servlet-mapping>

As you can see, it only handle *.jsp and *.jspx files by default.  If you
want the JSP container to handle other files, you'll need to add other url
patterns.

However, this not recommended and usually not necessary.  JSP fragments
(.jspf) are meant to be included (statically) in another JSP page, and may
not be a valid JSP page.  Also, if a jsp page is a JSF page, then it need to
be referenced with a JSF suffix (.jsf or .faces, depending on the mapping for
jsf servlet).


--
[Message sent by forum member 'kchung']
View Post: http://forums.java.net/node/667927