Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

'page' attribute in jsp:include  RSS feed

 
George Pavamani
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if anybody had gone through the Sun's JSP specifications. I have a doubt in it.
The Specification says
" The 'page' attribute of both jsp:include and jsp:forward are interpreted relative to the current JSP page, while 'file' attribute in an include directive is interpreted relative to the current JSP file"
Can anybody please tell me the difference between a JSP file and a JSP page. Any example in this context is greatly appreciated.
Thanks in advance
George
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bottomline, one JSP page can have more than one JSP file in it.
What version of the Spec are you referring here?
If its 1.2 then I have read it. Also, in the SCWCD forum, many similar topics (on Specs) are discussed. You could try a search in that forum.
regds.
- madhav
 
George Pavamani
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Satya.I am talking about the spec1.2 ( page:78). I am stiil not able to understand the concept of this url mapping . Hope you can explain this concept with an example ( or atleast explain the same example which is given in the Specs)
Looking forward for your reply.
Thanks
George
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, when I was reading thru, I had the same qstn. And I was told, try some examples and check for yourself. I asked in the SCWCD forum. I was disappointed and after about thre weeks, I said ok, let's try an example. It sure clarified (atleast I think) some things.
This is one thing which is difficult to explain but easy to implement and understand. I will try to get the example, need to find it first. Also, we have four cases of this which make is even more difficult......anyways give me a little more time I will post something here, in case no one else does.
regds.
- madhav
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by George Pavamani:
Can anybody please tell me the difference between a JSP file and a JSP page. Any example in this context is greatly appreciated.
Easy enough. You can think of a file as the physical file on the hard disk (in fact a web-app does not necessarily run from the filesystem, but let's forget about that for a moment). A page, on the other hand, is the virtual HTML document that is visible for a browser on the web server. The difference is significant.
Assume you have a web-app rooted at the site root (for simplicity). Assume also we have a jsp file /myjsp.jsp, and a servlet MyServlet mapped to /myservlet. Then, in myjsp.jsp, is valid, because the page "/myservlet" exists. It is mapped to MyServlet, which will be invoked and the output incorporated in myjsp. On the other hand,is invalid because there is no file "/myservlet".
Madhav, apologies that I failed to spot this question in SCWCD...
- Peter
[ April 17, 2002: Message edited by: Peter den Haan ]
 
George Pavamani
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Peter and satya.
George
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Madhav, apologies that I failed to spot this question in SCWCD...

ummm....never mind. I am over it now. Just that its so volative topic that I can't remember off the top of my head. Need to do a little (read lot) thinking before I say anything on this issue.... Here... I will cross links these topics so it can help others.
Thanks for the explanation.
- madhav
- madhav
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!