You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jeffrey Schneller <je...@envisa.com> on 2011/10/03 21:17:35 UTC

Migration to 1.5.1 -- unable to render page because of tag

Been migrating an app to 1.5.1 and wanted to test a simple first page.
I continue to run into problems rendering the page.  I continue to get
the following exception:

 

Caused by: java.text.ParseException: No matching close bracket at (line
196, column 27)

                at
org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:21
6)

 

Below is the simplified html and the java code.  Any ideas on what is
going on?

 

BasePage.html

--------------

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">

<head>

<title wicket:id="title"">[page title]</title>

<meta wicket:id="keywords" name="keywords" content=""/>

<meta wicket:id="description" name="description" content=""/>

</head>

<body>

                <div id="main">

                                <wicket:child/>

                </div>

</body>

</html>

 

 

BasePage.java

--------------

public class BasePage extends WebPage {

                                

                // title of the current page

                private String pageTitle = "";

                

                // page meta-data

                private String pageDescription = "";

                private String pageKeyword = "";

 

                public BasePage() {

                                super();

                                init();

                }

                private init() {

                                // Page Title

                                add(new Label("title", new
PropertyModel<String>(this, "pageTitle")));

 

                // Meta Tags

                WebMarkupContainer metaKeywords = new
WebMarkupContainer("keywords");

                metaKeywords.add(AttributeModifier.replace("content",
new PropertyModel<String>(this, pageKeyword)));

                                add(metaKeywords);

                

                WebMarkupContainer metaDescription = new
WebMarkupContainer("description");

                metaDescription.add(AttributeModifier.replace("content",
new PropertyModel<String>(this, pageDescription)));

                add(metaDescription);

}

protected void setPageTitle(String title) {

                this.pageTitle = title;

}

protected void setMetaKeywords(String keywords) {

                this.pageKeyword = keywords;

}

protected void setMetaDescription(String description) {

                this.pageDescription = description;

}

public String getPageDescription() {

                return pageDescription;

}

public String getPageKeyword() {

return pageKeyword;

}

public String getPageTitle() {

                return pageTitle;

}

}

 

HomePage.html

---------------

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">

<wicket:head></wicket:head>

<body>

                <wicket:extend>

                                [bunch of html]

                </wicket:extend>

</body>

 

HomePage.java

-------------

public class HomePage extends BasePage {

                public HomePage() {                          

                   this.setPageTitle("My homepage");

                   this.setMetaKeywords("");

                   this.setMetaDescription("");

                }

}


RE: Migration to 1.5.1 -- unable to render page because of tag

Posted by Jeffrey Schneller <je...@envisa.com>.
I solved my problem.  I had a double quote in the title tag.  Removing
that resolved the problem.

-----Original Message-----
From: Jeffrey Schneller [mailto:jeffrey.schneller@envisa.com] 
Sent: Monday, October 03, 2011 3:18 PM
To: users@wicket.apache.org
Subject: Migration to 1.5.1 -- unable to render page because of <head>
tag

Been migrating an app to 1.5.1 and wanted to test a simple first page.
I continue to run into problems rendering the page.  I continue to get
the following exception:

 

Caused by: java.text.ParseException: No matching close bracket at (line
196, column 27)

                at
org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:21
6)

 

Below is the simplified html and the java code.  Any ideas on what is
going on?

 

BasePage.html

--------------

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">

<head>

<title wicket:id="title"">[page title]</title>

<meta wicket:id="keywords" name="keywords" content=""/>

<meta wicket:id="description" name="description" content=""/>

</head>

<body>

                <div id="main">

                                <wicket:child/>

                </div>

</body>

</html>

 

 

BasePage.java

--------------

public class BasePage extends WebPage {

                                

                // title of the current page

                private String pageTitle = "";

                

                // page meta-data

                private String pageDescription = "";

                private String pageKeyword = "";

 

                public BasePage() {

                                super();

                                init();

                }

                private init() {

                                // Page Title

                                add(new Label("title", new
PropertyModel<String>(this, "pageTitle")));

 

                // Meta Tags

                WebMarkupContainer metaKeywords = new
WebMarkupContainer("keywords");

                metaKeywords.add(AttributeModifier.replace("content",
new PropertyModel<String>(this, pageKeyword)));

                                add(metaKeywords);

                

                WebMarkupContainer metaDescription = new
WebMarkupContainer("description");

                metaDescription.add(AttributeModifier.replace("content",
new PropertyModel<String>(this, pageDescription)));

                add(metaDescription);

}

protected void setPageTitle(String title) {

                this.pageTitle = title;

}

protected void setMetaKeywords(String keywords) {

                this.pageKeyword = keywords;

}

protected void setMetaDescription(String description) {

                this.pageDescription = description;

}

public String getPageDescription() {

                return pageDescription;

}

public String getPageKeyword() {

return pageKeyword;

}

public String getPageTitle() {

                return pageTitle;

}

}

 

HomePage.html

---------------

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">

<wicket:head></wicket:head>

<body>

                <wicket:extend>

                                [bunch of html]

                </wicket:extend>

</body>

 

HomePage.java

-------------

public class HomePage extends BasePage {

                public HomePage() {                          

                   this.setPageTitle("My homepage");

                   this.setMetaKeywords("");

                   this.setMetaDescription("");

                }

}


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Migration to 1.5.1 -- unable to render page because of tag

Posted by Sven Meier <sv...@meiers.net>.
Ah, just read that you solved it: <title wicket:id="title"">

Have fun
Sven

On 10/03/2011 09:22 PM, Sven Meier wrote:
> You're probably missing a close tag somewhere here: [bunch of html]
> 
> What's at line 196, column 27 ?
> 
> Sven
> 
> 
> On 10/03/2011 09:17 PM, Jeffrey Schneller wrote:
>> Been migrating an app to 1.5.1 and wanted to test a simple first page.
>> I continue to run into problems rendering the page.  I continue to get
>> the following exception:
>>
>>  
>>
>> Caused by: java.text.ParseException: No matching close bracket at (line
>> 196, column 27)
>>
>>                 at
>> org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:21
>> 6)
>>
>>  
>>
>> Below is the simplified html and the java code.  Any ideas on what is
>> going on?
>>
>>  
>>
>> BasePage.html
>>
>> --------------
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>> "http://www.w3.org/TR/html4/loose.dtd">
>>
>> <html xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:wicket="http://wicket.apache.org">
>>
>> <head>
>>
>> <title wicket:id="title"">[page title]</title>
>>
>> <meta wicket:id="keywords" name="keywords" content=""/>
>>
>> <meta wicket:id="description" name="description" content=""/>
>>
>> </head>
>>
>> <body>
>>
>>                 <div id="main">
>>
>>                                 <wicket:child/>
>>
>>                 </div>
>>
>> </body>
>>
>> </html>
>>
>>  
>>
>>  
>>
>> BasePage.java
>>
>> --------------
>>
>> public class BasePage extends WebPage {
>>
>>                                 
>>
>>                 // title of the current page
>>
>>                 private String pageTitle = "";
>>
>>                 
>>
>>                 // page meta-data
>>
>>                 private String pageDescription = "";
>>
>>                 private String pageKeyword = "";
>>
>>  
>>
>>                 public BasePage() {
>>
>>                                 super();
>>
>>                                 init();
>>
>>                 }
>>
>>                 private init() {
>>
>>                                 // Page Title
>>
>>                                 add(new Label("title", new
>> PropertyModel<String>(this, "pageTitle")));
>>
>>  
>>
>>                 // Meta Tags
>>
>>                 WebMarkupContainer metaKeywords = new
>> WebMarkupContainer("keywords");
>>
>>                 metaKeywords.add(AttributeModifier.replace("content",
>> new PropertyModel<String>(this, pageKeyword)));
>>
>>                                 add(metaKeywords);
>>
>>                 
>>
>>                 WebMarkupContainer metaDescription = new
>> WebMarkupContainer("description");
>>
>>                 metaDescription.add(AttributeModifier.replace("content",
>> new PropertyModel<String>(this, pageDescription)));
>>
>>                 add(metaDescription);
>>
>> }
>>
>> protected void setPageTitle(String title) {
>>
>>                 this.pageTitle = title;
>>
>> }
>>
>> protected void setMetaKeywords(String keywords) {
>>
>>                 this.pageKeyword = keywords;
>>
>> }
>>
>> protected void setMetaDescription(String description) {
>>
>>                 this.pageDescription = description;
>>
>> }
>>
>> public String getPageDescription() {
>>
>>                 return pageDescription;
>>
>> }
>>
>> public String getPageKeyword() {
>>
>> return pageKeyword;
>>
>> }
>>
>> public String getPageTitle() {
>>
>>                 return pageTitle;
>>
>> }
>>
>> }
>>
>>  
>>
>> HomePage.html
>>
>> ---------------
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>> "http://www.w3.org/TR/html4/loose.dtd">
>>
>> <html xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:wicket="http://wicket.apache.org">
>>
>> <wicket:head></wicket:head>
>>
>> <body>
>>
>>                 <wicket:extend>
>>
>>                                 [bunch of html]
>>
>>                 </wicket:extend>
>>
>> </body>
>>
>>  
>>
>> HomePage.java
>>
>> -------------
>>
>> public class HomePage extends BasePage {
>>
>>                 public HomePage() {                          
>>
>>                    this.setPageTitle("My homepage");
>>
>>                    this.setMetaKeywords("");
>>
>>                    this.setMetaDescription("");
>>
>>                 }
>>
>> }
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Migration to 1.5.1 -- unable to render page because of tag

Posted by Sven Meier <sv...@meiers.net>.
You're probably missing a close tag somewhere here: [bunch of html]

What's at line 196, column 27 ?

Sven


On 10/03/2011 09:17 PM, Jeffrey Schneller wrote:
> Been migrating an app to 1.5.1 and wanted to test a simple first page.
> I continue to run into problems rendering the page.  I continue to get
> the following exception:
> 
>  
> 
> Caused by: java.text.ParseException: No matching close bracket at (line
> 196, column 27)
> 
>                 at
> org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:21
> 6)
> 
>  
> 
> Below is the simplified html and the java code.  Any ideas on what is
> going on?
> 
>  
> 
> BasePage.html
> 
> --------------
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> 
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:wicket="http://wicket.apache.org">
> 
> <head>
> 
> <title wicket:id="title"">[page title]</title>
> 
> <meta wicket:id="keywords" name="keywords" content=""/>
> 
> <meta wicket:id="description" name="description" content=""/>
> 
> </head>
> 
> <body>
> 
>                 <div id="main">
> 
>                                 <wicket:child/>
> 
>                 </div>
> 
> </body>
> 
> </html>
> 
>  
> 
>  
> 
> BasePage.java
> 
> --------------
> 
> public class BasePage extends WebPage {
> 
>                                 
> 
>                 // title of the current page
> 
>                 private String pageTitle = "";
> 
>                 
> 
>                 // page meta-data
> 
>                 private String pageDescription = "";
> 
>                 private String pageKeyword = "";
> 
>  
> 
>                 public BasePage() {
> 
>                                 super();
> 
>                                 init();
> 
>                 }
> 
>                 private init() {
> 
>                                 // Page Title
> 
>                                 add(new Label("title", new
> PropertyModel<String>(this, "pageTitle")));
> 
>  
> 
>                 // Meta Tags
> 
>                 WebMarkupContainer metaKeywords = new
> WebMarkupContainer("keywords");
> 
>                 metaKeywords.add(AttributeModifier.replace("content",
> new PropertyModel<String>(this, pageKeyword)));
> 
>                                 add(metaKeywords);
> 
>                 
> 
>                 WebMarkupContainer metaDescription = new
> WebMarkupContainer("description");
> 
>                 metaDescription.add(AttributeModifier.replace("content",
> new PropertyModel<String>(this, pageDescription)));
> 
>                 add(metaDescription);
> 
> }
> 
> protected void setPageTitle(String title) {
> 
>                 this.pageTitle = title;
> 
> }
> 
> protected void setMetaKeywords(String keywords) {
> 
>                 this.pageKeyword = keywords;
> 
> }
> 
> protected void setMetaDescription(String description) {
> 
>                 this.pageDescription = description;
> 
> }
> 
> public String getPageDescription() {
> 
>                 return pageDescription;
> 
> }
> 
> public String getPageKeyword() {
> 
> return pageKeyword;
> 
> }
> 
> public String getPageTitle() {
> 
>                 return pageTitle;
> 
> }
> 
> }
> 
>  
> 
> HomePage.html
> 
> ---------------
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> 
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:wicket="http://wicket.apache.org">
> 
> <wicket:head></wicket:head>
> 
> <body>
> 
>                 <wicket:extend>
> 
>                                 [bunch of html]
> 
>                 </wicket:extend>
> 
> </body>
> 
>  
> 
> HomePage.java
> 
> -------------
> 
> public class HomePage extends BasePage {
> 
>                 public HomePage() {                          
> 
>                    this.setPageTitle("My homepage");
> 
>                    this.setMetaKeywords("");
> 
>                    this.setMetaDescription("");
> 
>                 }
> 
> }
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org