Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Well Formed

 
Syed Saifuddin
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using following header in my jsp
<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:directive.page language="java"
contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />

This will produce an exception (The content of elements must consist of well-formed character data or markup.) on the following line.


<%@ page language="java" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

what are the tag equal for the including taglibs

Thank You
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They should be declared in the jsp:root like:
<jsp:root xmlns:bean="/tags/struts-bean" xmlns:html="/tags/struts-html"... version="2.0">
I let you figure out the rest.

And you'll have to remove <%@ page language="java" %> too.
[ July 03, 2006: Message edited by: Satou kurinosuke ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using the XML JSP document syntax?
 
Syed Saifuddin
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Satou kurinosuke,

You solved my problem in single attemped. Please also give the difference of use between html style jsp and xml style jsp

Thank You
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The XML Document syntax for JSP is intended as an intermediate format for JSP containers to use, as well as for JSPs that are automatically generated by code. It is not intended for coding by humans.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic