Exception when trying to load resource from a properties file.

2014-03-14 Thread vdaras
Hello,

I'm playing around with Wicket and I got a serious problem with .properties
files.

I got this HomePage.html

!DOCTYPE html
html
head
meta charset=UTF-8
titleWelcome Page/title
/head
body
form wicket:id=userForm
wicket:message key=name/:nbspinput wicket:id=name
type=text/
wicket:message key=surname/:nbspinput wicket:id=surname
type=text /
/form
/body
/html

and HomePage.propeties

?xml version=1.0 encoding=UTF-8?
properties
entry key=nameName/entry
entry key=surnameSurname/entry
/properties

These two files are located in the same directory in my project. 

I get an org.apache.wicket.WicketRuntimeException: Property 'name' not
found in property files exception when trying to render HomePage.html. 

I've checked the .war file in the server's directory and the two files are
in the same directory. I've also noticed that a HomePage.properties.xml file
is also deployed for some reason.The .war is packaged by Maven, using the
pom file from the wicket quickstart archetype.

Any ideas?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-when-trying-to-load-resource-from-a-properties-file-tp4664967.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Exception when trying to load resource from a properties file.

2014-03-14 Thread Martin Grigorov
Hi,

On Fri, Mar 14, 2014 at 1:53 PM, vdaras vda...@gmail.com wrote:

 Hello,

 I'm playing around with Wicket and I got a serious problem with .properties
 files.

 I got this HomePage.html

 !DOCTYPE html
 html
 head
 meta charset=UTF-8
 titleWelcome Page/title
 /head
 body
 form wicket:id=userForm
 wicket:message key=name/:nbspinput wicket:id=name
 type=text/
 wicket:message key=surname/:nbspinput wicket:id=surname
 type=text /
 /form
 /body
 /html

 and HomePage.propeties


You use the XML format but you miss the .xml extension in the file name.
Also you miss 'r' in propeRties.



 ?xml version=1.0 encoding=UTF-8?
 properties
 entry key=nameName/entry
 entry key=surnameSurname/entry
 /properties

 These two files are located in the same directory in my project.

 I get an org.apache.wicket.WicketRuntimeException: Property 'name' not
 found in property files exception when trying to render HomePage.html.

 I've checked the .war file in the server's directory and the two files are
 in the same directory. I've also noticed that a HomePage.properties.xml
 file
 is also deployed for some reason.The .war is packaged by Maven, using the


It is interesting to find out how  HomePage.properties.xml appeared if you
didn't added it.


 pom file from the wicket quickstart archetype.

 Any ideas?


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Exception-when-trying-to-load-resource-from-a-properties-file-tp4664967.html
 Sent from the Users forum mailing list archive at Nabble.com.

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