• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp:include with wrong URL

 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to everybody,
I've tried to use the standard action <jsp:include> with an intentionally wrong 'page'.
When accessing to my jsp, I receive no error, at leas with my Tomcat: it simply ignores the standard action. I can find anything in the specs about this behaviour.

Can anybody have an idea about this behaviour?

Thanks in advance
[ May 23, 2007: Message edited by: Mirko Bonasorte ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No idea what are you trying to say. Anyways, can you please tell us what do you really mean by saying, "intentionally wrong 'page'"?
Thanks.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that he means "a page which does not exist". If you set the page attribute to a page which does not exist, what will happen ?
 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
thank your for your responses. Yes, I mean page='/a_page_that_does_not_exists'. I tried with both context-relative and page-relative urls, but nothing seems to happen...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I raise my hands on that one And I couldn't find anything in the spec either. I hope another rancher will help you.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As we know we can't really determine if a resource is static or dynamic. So, if it can not find the resource it will take it as static html page. And in that case it will behave as a blank HTML page. Hence, you will get nothing as a result of that include.

[Edited]
I know it is not good to show 404 in between somewhere in the page, but one would definitely expect some message on console.
[ May 24, 2007: Message edited by: Adeel Ansari ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, I have nothing to support my argument. No spec refs, nothing. Its just logical argument.

Try few other servlet containers. They might result in a message or something. As you folks told, there is nothing in the specs. So, then implementation can have differences, I believe.

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!