• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Include file doubt?

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HFSJ errata says,

{407} whole page;
As the .jspf convention is not supported by default in Tomcat, the following mapping
needs to be added to the application's web.xml for the example to work correctly:

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

What it really means?? Anyone please explain??

Thanks in advance!
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have HFSJ so can't say anything about that example. Whereas this code is for servlet mapping, it is mapping a servlet defined by the name of "jsp" with any url with ".jspf" extension, means that it will be acessible to any url that ends with .jspf for your web app.

Like if your Web App is "MyWebApp" then

http://localhost:8080/MyWebApp/abc.jspf
http://localhost:8080/MyWebApp/somefol/abc.jspf
http://localhost:8080/MyWebApp/app/admin/abc.jspf

All of these will map to servlet "jsp".
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the explanation!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic