Re: parse directive in velocity template failing

2008-01-22 Thread fattymelt

Thanks for the help, James. I tried adding the following to my web.xml (and
putting the velocity.properties file in that location). Does this look right
to you?

servlet
servlet-nameClientApplication/servlet-name
servlet-classwicket.protocol.http.WicketServlet/servlet-class
init-param
  param-nameapplicationClassName/param-name
  param-valuecom.foo.bar.client.ClientApplication/param-value
/init-param
init-param
param-nameconfiguration/param-name
param-valuedevelopment/param-value
/init-param
init-param
param-namevelocityPropertiesFolder/param-name
param-valueWEB-INF/classes/param-value
/init-param
init-param
param-namevelocity.properties/param-name
param-valuevelocity.properties/param-value
/init-param
load-on-startup2/load-on-startup
/servlet


James McLaughlin-3 wrote:
 
 On Jan 21, 2008 11:45 PM, fattymelt [EMAIL PROTECTED] wrote:

 Just to be sure...

 In the Wicket section of web.xml I am going to add the two init-params.
 One
 of which defines the folder in which to find my properties file, and the
 other is the actual filename. Then I can use that properties file to
 specify
 what my TEMPLATE_ROOT is.
 
 Yes, that should do it.
 

 The only I don't get, is that I have working templates now that are in
 WEB-IN/templates. So, it isn't like velocity-contrib isn't finding them.
 So
 I'm not sure why the parse directive isn't looking there, too?
 
 For some reason, the velocity.properties that comes with
 wicket-velocity specifies the root as . . It probably would have
 been better left as the default, which behaves as you would expect.
 Maybe if you provide the full path to the template you are parsing,
 the classpath loader will pick it up. Hope this helps, fattymelt.
 


 James McLaughlin-3 wrote:
 
  fattymelt,
  It used to work that you could jar up your templates and put them
  under WEB-INF/lib. If that doesn't work, create your own
  velocity.properties file and define the init-params
  velocityPropertiesFolder and velocity.properties in your web.xml. You
  can define there which loaders to use and what root the
  FileResourceLoader should use. Best of luck, fattymelt!
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p15019014.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



parsevelocity template

2008-01-21 Thread fattymelt


-- 
View this message in context: 
http://www.nabble.com/%22parsevelocity-template-tp14999729p14999729.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



parse directive in velocity template failing

2008-01-21 Thread fattymelt

I am using a velocity template, and within it would like to use velocity's
parse directive (to include another template within the current template)
but it complains that it can not find the template in velocity's
TEMPLATE_ROOT.  I have triple-checked that the template is in the same
directory as all of my other working templates. Anyone know why velocity
can't find a template when using parse ?

Does Wicket specify its own template location? If so, does anyone know where
the default Velocity TEMPLATE_ROOT would be?

http://velocity.apache.org/engine/devel/user-guide.html#parse Velocity's
Parse Directive 

TIA
-- 
View this message in context: 
http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p14999823.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: parse directive in velocity template failing

2008-01-21 Thread fattymelt

Just to be sure...

In the Wicket section of web.xml I am going to add the two init-params. One
of which defines the folder in which to find my properties file, and the
other is the actual filename. Then I can use that properties file to specify
what my TEMPLATE_ROOT is.

The only I don't get, is that I have working templates now that are in
WEB-IN/templates. So, it isn't like velocity-contrib isn't finding them. So
I'm not sure why the parse directive isn't looking there, too?


James McLaughlin-3 wrote:
 
 fattymelt,
 It used to work that you could jar up your templates and put them
 under WEB-INF/lib. If that doesn't work, create your own
 velocity.properties file and define the init-params
 velocityPropertiesFolder and velocity.properties in your web.xml. You
 can define there which loaders to use and what root the
 FileResourceLoader should use. Best of luck, fattymelt!
 

-- 
View this message in context: 
http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p15013060.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wicket.WicketRuntimeException: Unable to decrypt the text ... ???

2007-12-21 Thread fattymelt

running wicket 1.2.6 and getting the following error. This is somehow
triggered (I wish I had a more specific test case) by my login form. But
what is really strange is that it isn't just appearing on form submission.
Once I see the error in the logs, it occurs even on a page refresh. I am
wondering if this has something to do with reading/writing cookies or
something then?

[2007-12-21 12:07:35,729][ERROR]  Problem applying encryption; go on without
for now
wicket.WicketRuntimeException: Unable to decrypt the text '[EMAIL PROTECTED]'
at
wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:187)
at wicket.util.crypt.AbstractCrypt.decrypt(AbstractCrypt.java:68)
at
wicket.markup.html.form.PasswordTextField.setModelValue(PasswordTextField.java:136)
at
wicket.markup.html.form.persistence.CookieValuePersister.load(CookieValuePersister.java:72)
at wicket.markup.html.form.Form$1.formComponent(Form.java:267)
at wicket.markup.html.form.Form$4.component(Form.java:465)
at wicket.MarkupContainer.visitChildren(MarkupContainer.java:744)
at wicket.markup.html.form.Form.visitFormComponents(Form.java:461)
at
wicket.markup.html.form.Form.loadPersistentFormComponentValues(Form.java:251)
at wicket.Page$7.component(Page.java:985)
at wicket.MarkupContainer.visitChildren(MarkupContainer.java:744)
at wicket.MarkupContainer.visitChildren(MarkupContainer.java:759)
at wicket.Page.setFormComponentValuesFromCookies(Page.java:980)
at wicket.Page.renderPage(Page.java:357)
at
wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:67)
at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
at
wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:902)
at
wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929)
at wicket.RequestCycle.step(RequestCycle.java:1010)
at wicket.RequestCycle.steps(RequestCycle.java:1084)
at wicket.RequestCycle.request(RequestCycle.java:454)
at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: javax.crypto.IllegalBlockSizeException: Input length must be
multiple of 8 when decrypting with padded cipher
at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
at com.sun.crypto.provider.SunJCE_af.b(DashoA12275)
at
com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(DashoA12275)
at javax.crypto.Cipher.doFinal(DashoA12275)
at wicket.util.crypt.SunJceCrypt.crypt(SunJceCrypt.java:102)
at
wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:183)
... 41 more
-- 
View this message in context: 
http://www.nabble.com/wicket.WicketRuntimeException%3A-Unable-to-decrypt-the-text-...-tp14459194p14459194.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket really dumb? Converting to amp; in password fields?

2007-12-21 Thread fattymelt



-- 
View this message in context: 
http://www.nabble.com/Wicket-really-dumb--Converting---to--amp--in-password-fields--tp14460118p14460165.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket really dumb? Converting to amp; in password fields?

2007-12-21 Thread fattymelt

I've been debugging a (hopefully) unrelated problem when I came across
this...

Someone submits passwrd as a password in my login form and the back-end
gets it as passwamp;amp;rd

Are you kidding me? Why would that be happening?
-- 
View this message in context: 
http://www.nabble.com/Wicket-really-dumb--Converting---to--amp--in-password-fields--tp14460118p14460118.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket really dumb? Converting to amp; in password fields?

2007-12-21 Thread fattymelt

Wow. Sorry to have angered the masses. I didn't mean it was a dumb framework
overall, I meant that it seemed to be acting dumb in this particular
instance. At my place of business we call code dumb all the time when it
doesn't do what is typically expected. So, I certainly wasn't trying to
insult wicket as a project.

Anyway, I was surprised to see that wicket was automatically HTML escaping
my post parameters. This seemed very strange. I don't typically right bug
tickets until I get some sort of verification that it is a bug, and not
something I am missing (sometime I am dumb, too).

I'm using wicket 1.2.6, but this problem may be specific to the
wicket-auth-roles package which is also 1.2.6.

I changed the sign-in code that came with that package from

password.getModelObjectAsString()

to

password.getInput()

and all seems well now.



Matej Knopp-2 wrote:
 
 Wicket replaces  with amp; on any place in markup it produces.
 That's how markup document works.  is a beginning of entity and must
 be escaped. In your case the escaping seems to be done twice. That
 might mean a bug in wicket. In that case the proper thing would be
 creating a jira issue instead of calling the framework dumb. And I
 doubt anyone would bother to be kidding you.
 
 -Matej
 
 On Dec 21, 2007 7:23 PM, fattymelt [EMAIL PROTECTED] wrote:

 I've been debugging a (hopefully) unrelated problem when I came across
 this...

 Someone submits passwrd as a password in my login form and the
 back-end
 gets it as passwamp;amp;rd

 Are you kidding me? Why would that be happening?
 --
 View this message in context:
 http://www.nabble.com/Wicket-really-dumb--Converting---to--amp--in-password-fields--tp14460118p14460118.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-really-dumb--Converting---to--amp--in-password-fields--tp14460118p14460460.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket really dumb? Converting to amp; in password fields?

2007-12-21 Thread fattymelt

I'm using the wicket-auth-roles package. I see the code that returns the
password is

password.getModelObjectAsString()

perhaps that is mucking with it?



fattymelt wrote:
 
 I've been debugging a (hopefully) unrelated problem when I came across
 this...
 
 Someone submits passwrd as a password in my login form and the back-end
 gets it as passwamp;amp;rd
 
 Are you kidding me? Why would that be happening?
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-really-dumb--Converting---to--amp--in-password-fields--tp14460118p14460170.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]