?
Solved

Error: when trying to include a jsp within another jsp page

Posted on 2005-03-30
5
Medium Priority
?
192 Views
Last Modified: 2010-04-01

</form>
      <% if(request.getAttribute("subCats")!=null)
           {
          %><%@ include file="/subcategory.jsp"%>
         <%
           }
        %>

Error:"category.jsp": /subcategory.jsp(0,0) Page directive: can't have multiple occurrences of language at line 79, column 13
0
Comment
Question by:climbingjaffa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 13669478
remove the language definition from your include
or use jsp:include (depending on your requirements)
0
 
LVL 2

Author Comment

by:climbingjaffa
ID: 13669482
Both have java code in them though! So what should i do?
0
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 13669496
It can have java code it, you just can't have thge language declaration (at the top).
The contents of the file are included in the page so it results in the declaration appearing twice.
0
 
LVL 2

Author Comment

by:climbingjaffa
ID: 13669497
How do you write a jsp include? Would that sort it out?
0
 
LVL 2

Author Comment

by:climbingjaffa
ID: 13669510
Thanks removed language declaration (at the top) an problem sorted :-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Hey fellow admins! This time, I have a little fairy tale for you. As many tales do, it starts boring and then gets pretty gory. I hope you like it. TL;DR: It is about an important security matter, you should read it if you run or administer Windows …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question