aspose file tools*
The moose likes JSF and the fly likes why my web pages are downloadable? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "why my web pages are downloadable?" Watch "why my web pages are downloadable?" New topic
Author

why my web pages are downloadable?

Kamila Rutkowski
Ranch Hand

Joined: Sep 22, 2009
Posts: 37
I have a JSF project. when I run it on tomcat and type the real name of my web pages (for example index.xhtml) in browser, the file download dialog appears so I can view the source code of my JSF page! how I can prevent this?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10265
    
168

Make sure you have a servlet-mapping for the *.xhtml url-pattern to point to the FacesServlet.


[My Blog] [JavaRanch Journal]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Not Tomcat-related. Moved to the JSF forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kamila Rutkowski
Ranch Hand

Joined: Sep 22, 2009
Posts: 37
Bear Bibeault wrote:Not Tomcat-related. Moved to the JSF forum.


Thanks so very much
Kamila Rutkowski
Ranch Hand

Joined: Sep 22, 2009
Posts: 37
Jaikiran Pai wrote:Make sure you have a servlet-mapping for the *.xhtml url-pattern to point to the FacesServlet.


Thanks so very much
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: why my web pages are downloadable?