?
Solved

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

Posted on 2005-03-30
5
Medium Priority
?
193 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
  • 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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

Use this step by step method when setting up QuickBooks Online. They will allow you to explore the various features of the advanced settings available to you.
In my humble opinion (IMHO), TouchDown from Symantec is the best in class for this type of application, but Symantec has end-of-lifed it and although one can keep using it, it will no longer be supported or upgraded.  Time to look for alternatives t…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

580 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