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 including HTML file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "including HTML file" Watch "including HTML file" New topic
Author

including HTML file

Venkat Kanneganti
Ranch Hand

Joined: Nov 30, 2007
Posts: 43
Hi,
My JSF screen has to include content of HTML file availabe at specified URL.how it is possible,any suggestions?
Thanks in Advance.
Regards
Venkat.
Darryl Nortje
Ranch Hand

Joined: Jun 11, 2002
Posts: 140
Hi Venkat

Could use a normal

<jsp:include page="htmlPage.html" flush="true" />

Let me know if it works.
cheers
Darryl
Venkat Kanneganti
Ranch Hand

Joined: Nov 30, 2007
Posts: 43
Hi,
This will not work.<jsp:include> used only for localmachine.we can not use for external URLs.
Regards
Venkat.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41487
    
  51
JSTL's <c:import> tag can do this. See http://www.ibm.com/developerworks/java/library/j-jsp06173.html for details.


Ping & DNS - my free Android networking tools app
Venkat Kanneganti
Ranch Hand

Joined: Nov 30, 2007
Posts: 43
Hi,
<c:import> tag is also not working.can you give me any other suggestions.
Thanks
Regards
Venkat.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41487
    
  51
<c:import> works fine in general. How is it not working for you - how are you using it, and what is the result?
Venkat Kanneganti
Ranch Hand

Joined: Nov 30, 2007
Posts: 43
Hi,
I have used in my jsf page like
<c:import url="someurl"/>
but its not displaying any content in my page.
its not giving any Exception also.
can you please check this?
Regards
Venkat.
J Haley
Ranch Hand

Joined: Jul 22, 2004
Posts: 66
If you are using facelets, c:import is not supported.
Venkat Kanneganti
Ranch Hand

Joined: Nov 30, 2007
Posts: 43
Hi Haley,
you are exactly correct,I am using Facelets,Ajax4JSF.is there any option to include content of HTML file.
Thank You.
Regards
Venkat.
J Haley
Ranch Hand

Joined: Jul 22, 2004
Posts: 66
I think you will have to write your own custom tag that mimics c:import. I like using facelets with jsf, but am very disappointed with the lack of jstl support. If you find a better solution, please post it.
Venkat Kanneganti
Ranch Hand

Joined: Nov 30, 2007
Posts: 43
Hi,
Thank You for all,if i get any new solution i should discuss with you.
Regards,
Venkat.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: including HTML file