• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Including .JSPX files in .JSP

 
Abhishek Asthana
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to include a .jspx in another .jsp file:


Following is the code of my jspx file (named JSPX.jspx):


On runtime I get following error:
main.jsp:20:28: Error in "url\JSPX.jspx" at line 1: The encoding "null" specified in the XML prolog is unsupported.
<%@ include file="/JSPX.jspx"%>

What can be wrong here? Please help.

Thanks

Abhishek
 
Bharath Gowda
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<@ is just a derivative as per JSP specifications. so try using <jsp:include> and change the name from JSPX.jspx to somexxx.jspx. please be informed that you need to use the file name and not the title to include the jspx in a jsp
 
Abhishek Asthana
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bharat.

I have tried <jsp:include> as well, and JSPX.jspx is the name of my file, a bit weird though!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic