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 Hi, question on c:import... 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 "Hi, question on c:import..." Watch "Hi, question on c:import..." New topic

Hi, question on c:import...

Carmen Brianick
Ranch Hand

Joined: Feb 23, 2006
Posts: 67
Hi, I was wondering why the .gifs aren't displaying correctly on this site when I do:
<%@ taglib prefix="c" uri="" %>
Is this a site?
<c:import url=""/>

Thanks so much,
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950

<c:import url=""/>

It will not redirect the URL to web site The <c:import> action treate it as reletive URL and not absolute URL. so it search /approot/ in your servlet Context assumming that Your JSP file is placed at approot.

try using absolute URL as

I think the <c:import> is not good for these tasks, as it try to import the full default page of the site. Instead it better to use <c:redirect> to display the full site.

[ March 07, 2006: Message edited by: Narendra Dhande ]

Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Carmen Brianick
Ranch Hand

Joined: Feb 23, 2006
Posts: 67
Hi Narendra, thanks for your response, I will try the absolute path to see what happens.

Thanks again,
I agree. Here's the link:
subject: Hi, question on c:import...
Similar Threads
How to store extracted xml values in a database?
Problem with JSTL c:import
need a help regarding "JSTL with xml tag"
How do I place Tiles tag to the following JSP page?