File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 9317
    
109

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: 60046
    
  65

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why my web pages are downloadable?
 
Similar Threads
Seam and WAI?
help needed in jsf
My first step. - Please help!
c:import with Facelets
hiding pages behind WEB-INF?