Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

c:import usage

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

Imagine I do a c:import to yahoo website like this,

<c:import url="http://www.yahoo.com" /> what extra do I have to do if I need to include the contents in yahoo into my jsp page? How does this actually work?
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any help guys?
 
D.R.Vinayak
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<c:import url="http://sample.com/Welcome.html"/>
thats enough to include the content of Welcome.html on your page
it has attribute var and varReader
which can be used to manipute the content .
<c:import url="http://sample.com/Welcome.html" var="hand"/>
The String Object hand is reusable and has its contents cached. The advantage of using a Reader is that the content can be accessed directly without any buffering.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But when I tried to include the contents of yahoo in my jsp, I'm not able to do. I'm seeing nothing from yahoo....Did you try this one at home?
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, did anyone try this at home?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic