|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
[jala] captcha broken?Hi!
I hope i also can ask jala questions in here. I just wanted to add a jala.Captcha() to my app and it did not work. First thing was, that the jcaptcha jar file was missing. I downloaded the latest version, changed the filename in Captcha.js and tried again. Again no luck. Captcha.js uses Packages.com.sun.image.codec.jpeg.JPEGCodec which seems not to be available in OpenJdk Java 1.6.0-b09. So i changed the code to use javax.imagei like this: /** * Render a new captcha image. */ this.renderImage = function renderImage() { var image = captcha.getImageChallenge(); var stream = new java.io.ByteArrayOutputStream(); javax.imageio.ImageIO.write(image, "jpg", stream); res.contentType = "image/jpeg"; res.writeBinary(stream.toByteArray()); return; }; Now it works! Maybe some of the jala folks can add this changes to the repository? thanks, Anton -- DI(FH) Anton Pirker Helma Freelancer http://www.ignaz.at http://shnitzl.org _______________________________________________ Helma-user mailing list Helma-user@... http://helma.org/mailman/listinfo/helma-user |
|
|
|
|
|
Re: [jala] captcha broken?Hello Anton,
Why not just rely on Helma's internal image saving mechanisms? They would use whatever is available on a given system... Jürg On 4 Aug 2008, at 09:25, Anton Pirker wrote: > Hi! > > I hope i also can ask jala questions in here. > > I just wanted to add a jala.Captcha() to my app and it did not work. > First thing was, that the jcaptcha jar file was missing. > I downloaded the latest version, changed the filename in Captcha.js > and > tried again. Again no luck. > > Captcha.js uses Packages.com.sun.image.codec.jpeg.JPEGCodec which > seems > not to be available in OpenJdk Java 1.6.0-b09. > > So i changed the code to use javax.imagei like this: > > /** > * Render a new captcha image. > */ > this.renderImage = function renderImage() { > var image = captcha.getImageChallenge(); > var stream = new java.io.ByteArrayOutputStream(); > javax.imageio.ImageIO.write(image, "jpg", stream); > res.contentType = "image/jpeg"; > res.writeBinary(stream.toByteArray()); > return; > }; > > > Now it works! > Maybe some of the jala folks can add this changes to the repository? > > thanks, > Anton > > > -- > DI(FH) Anton Pirker > Helma Freelancer > > http://www.ignaz.at > http://shnitzl.org > > _______________________________________________ > Helma-user mailing list > Helma-user@... > http://helma.org/mailman/listinfo/helma-user _______________________________________________ Helma-user mailing list Helma-user@... http://helma.org/mailman/listinfo/helma-user |
|
|
Re: [jala] captcha broken?Tobi Schäfer wrote:
> hey anton > > thanks for the suggestion which i hardly noticed due to some helma-user > mails not coming through. > > regarding the missing jar this is communicated at the jala site [1]. > (should this be more prominent?) oh. yes that should be definitely more promiment. i suggest it should be mentioned here: https://dev.orf.at/trac/jala/wiki/JalaModules#Captcha > > and would you mind creating a ticket at [1] with your patch attached? > we'd be very happy. > :) i have created a ticket, but there was an error while uploading the attachment (permission denied to store the image) so i added the svn diff in the ticket-text. -- DI(FH) Anton Pirker Helma Freelancer http://www.ignaz.at http://shnitzl.org _______________________________________________ Helma-user mailing list Helma-user@... http://helma.org/mailman/listinfo/helma-user |
|
|
Re: [jala] captcha broken?hello anton
> oh. yes that should be definitely more promiment. i suggest it > should be > mentioned here: > > https://dev.orf.at/trac/jala/wiki/JalaModules#Captcha i moved the note to the url you suggested. i agree it's the better spot. btw. i think the license restriction does not apply anymore, anyway, as the developers went back to lgpl just a few months after jala.captcha was released [1]. will post a ticket about that later. > i have created a ticket, but there was an error while uploading the > attachment (permission denied to store the image) so i added the svn > diff in the ticket-text. oops, thanks anyway, for both trying to add an attachment and letting me know that it does not work. i fixed the permissions for the trac attachment directory and uploads are working again. furthermore, i extracted the patch you provided in ticket #88 and added it as attachment to ticket #87 [2]. ciao, tobi -- [1] http://forge.octo.com/jcaptcha/confluence/display/general/2006/06/30/Back+to+LGPL ... [2] https://dev.orf.at/trac/jala/ticket/87 _______________________________________________ Helma-user mailing list Helma-user@... http://helma.org/mailman/listinfo/helma-user |
| Free embeddable forum powered by Nabble | Forum Help |