When I remove include directive, code is running properly. After including directive, I am getting error as:
HTTP Status 500 - /IncludeJSP.jsp (line: 2, column: 1) Invalid byte 1 of 1-byte UTF-8 sequence.
type Exception report
Thanks for giving so much stress on my mistake. I will remember this mistake throughout my life :-).
Now I have created a separate jsp file which is as follows
I have saved the file in MyJSP folder. Now problem is image is not visible . I think its related to path.
Yes, the URL for the image is not valid. First of all "\" is not valid in a URL path. Secondly, the URL should be a server-relative path to the image file. See the JspFaq and ServletsFaq for more info.
It also not valid to include a full HTML file into another. Why is your inlude file a full HTML page if it's only a fragment to be included?
Joined: Jul 03, 2009
Problem has been resolved. I removed "/" from the path to image. Thanks!!