jQuery in Action, 3rd edition
The moose likes JSP and the fly likes c:import problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "c:import problem." Watch "c:import problem." New topic

c:import problem.

Micheline Dax

Joined: Mar 22, 2005
Posts: 10
Hi folks,

I have a problem using the <c:import /> tag.

Here is my code :
<c:import url="../fetch.do?id=25" var="titi" />
<c:import url="../fetch.do?id=245" var="toto" />

When I try to access titi and toto, they both contains the same content (the two included pages of course returns differents one).

So I tried this :

<c:import url="../fetch.do" var="titi">
<c:param name="id">25</c:param>

<c:import url="../fetch.do" var="titi">
<c:param name="id">255</c:param>

Same result !

Can anyone provide me a solution to this caching by url problem ?

Thanks in advance,

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63837

"Micheline Dax", two things:

Firstly, you signed your post "Sne." so you've revealed that "Micheline Dax" is not a real name. As fictituous names are not allowed under Ranch policy I'm going to have to ask you to change your display name to your real name that matches your signature.

Secondly, I'm not understanding what the problem you are seeing is. Please explain in more detail what you expceted to happen, what did happen, and why you feel the behavior is wrong.

OK, and a 3rd thing, relying on relative adressing using ".." when addressing resources is asking for trouble. It's probably not a cause of whatever issue you are currently having, but may cause you headaches in the future. I'd suggest you ditch the relative addressing to save yourself problems later on.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: c:import problem.
It's not a secret anymore!