This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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!
 
jQuery in Action, 2nd edition
 
subject: Including .JSPX files in .JSP
 
Similar Threads
Unable to embed flash file in JSF
JSF Components does not appear on the browser
JSF SelectOneListBox issue
Problems with CSS and JSF
Including JSPX in other JSPX