aspose file tools*
The moose likes JSP and the fly likes Including .JSPX files in .JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Including .JSPX files in .JSP" Watch "Including .JSPX files in .JSP" New topic
Author

Including .JSPX files in .JSP

Abhishek Asthana
Ranch Hand

Joined: Sep 08, 2004
Posts: 146
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

Joined: Apr 15, 2008
Posts: 17
<@ 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


Bharath PU<br />SCJP - 1.4 <br />IBM Certified Database Associate<br />IBM Certified Advanced Application Developer -- Rational Application Developer for WebSphere Software V6.0
Abhishek Asthana
Ranch Hand

Joined: Sep 08, 2004
Posts: 146
Thanks Bharat.

I have tried <jsp:include> as well, and JSPX.jspx is the name of my file, a bit weird though!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Including .JSPX files in .JSP