This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes c:import usage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "c:import usage" Watch "c:import usage" New topic
Author

c:import usage

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

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?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Any help guys?
D.R.Vinayak
Greenhorn

Joined: Mar 27, 2007
Posts: 18
<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.


SCJP 95%<br />SCWCD(waiting for the big)
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

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

Joined: Sep 26, 2006
Posts: 9345
    
    2

Guys, did anyone try this at home?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: c:import usage
 
Similar Threads
Problems with jsp:include
jstl c + import
TLD uri and JSP uri
c:import tag, url value from variable
Problem in my JSTL comment