wood burning stoves 2.0*
The moose likes JSP and the fly likes Well Formed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Well Formed" Watch "Well Formed" New topic
Author

Well Formed

Syed Saifuddin
Ranch Hand

Joined: Sep 01, 2003
Posts: 130
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


Thank You & Best Regards,

Syed Saifuddin,
Senior Software Engineer

SAP Oracle AIX & Java Training
http://www.socialinet.com
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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 ]

[My Blog]
All roads lead to JavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60741
    
  65

Why are you using the XML JSP document syntax?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Syed Saifuddin
Ranch Hand

Joined: Sep 01, 2003
Posts: 130
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

Joined: Jan 10, 2002
Posts: 60741
    
  65

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Well Formed
 
Similar Threads
where can I download struts tld files from
tld files for struts 1.3.5
Tag libraries
Struts Error
error in eclipse IDE for struts application