Re: requestParameters and %20

2009-08-29 Thread Fernando Wermus
I thought that wicket may have some class for this situation isnt true?

On Sat, Aug 29, 2009 at 10:45 PM, James Carman  wrote:

> have you tried java.net.URLDecoder?
>
> On Sat, Aug 29, 2009 at 3:43 PM, Fernando Wermus
> wrote:
>
> > I am serving a file from disk which its name is "red apple.jpg".
> > From html source it renders as follows
> >
> > 
> >
> > I found that On method getUri() and a variable into requestParameters the
> > image name has been translated to red%20apple.jpg
> >
> > new URIRequestTargetUrlCodingStrategy("/" + "thumbnail") {
> >
> > @Override public IRequestTarget decode(RequestParameters
> requestParameters)
> > {
> >
> > try {
> >
> > return serveImage(getURI(requestParameters), );
> >
> > } catch (Exception e) {
> >
> > throw new WicketRuntimeException(e);
> >
> > }
> >
> > }
> >
> > };
> >
> >
> > Which is the best way to manage this situation?
> >
> >
> > Do I have just implement a method from my own converting %20 or there is
> a
> > wicket way to do this job?
> >
> >
> > I am using wicket 1.3.6
> >
> > thanks in advance
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: About getSignInPageClass() in AuthenticatedWebApplication class

2009-08-29 Thread liny

Hi,

Has someone same requirement?
I'd like to know how to solve it.
Thank you ~
-- 
View this message in context: 
http://www.nabble.com/About-getSignInPageClass%28%29-in-AuthenticatedWebApplication-class-tp25199660p25208388.html
Sent from the Wicket - User 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: requestParameters and %20

2009-08-29 Thread James Carman
have you tried java.net.URLDecoder?

On Sat, Aug 29, 2009 at 3:43 PM, Fernando Wermus
wrote:

> I am serving a file from disk which its name is "red apple.jpg".
> From html source it renders as follows
>
> 
>
> I found that On method getUri() and a variable into requestParameters the
> image name has been translated to red%20apple.jpg
>
> new URIRequestTargetUrlCodingStrategy("/" + "thumbnail") {
>
> @Override public IRequestTarget decode(RequestParameters requestParameters)
> {
>
> try {
>
> return serveImage(getURI(requestParameters), );
>
> } catch (Exception e) {
>
> throw new WicketRuntimeException(e);
>
> }
>
> }
>
> };
>
>
> Which is the best way to manage this situation?
>
>
> Do I have just implement a method from my own converting %20 or there is a
> wicket way to do this job?
>
>
> I am using wicket 1.3.6
>
> thanks in advance
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>


Re: Google App Engine and Wicket

2009-08-29 Thread Scott Swank
Here's a minor point that tripped me up.  I have my WicketFilter
mapped to a given path:


WicketFilter
/evansforlv/*


And then when I start up my local app and browse to

localhost:8080/evansforlv

I get redirected by Jetty to

localhost:8080/evansforlv/

with a trailing "/".  GAE is not so kind.  You must add the trailing
"/" to your url or you will simply get a blank page.  Since you are
never sent to the WicketFilter nothing is logged.  It's just a silent
failure.

Cheers,
Scott


On Mon, May 11, 2009 at 11:26 AM, Juha Palomäki wrote:
> File uploads seem to be causing some problems. On Wicket uploaded
> files are first written to some temporary file and on AppEngine this
> is obviously not possible. I haven't yet investigated if it is easy to
> change this behavior in Wicket. Another option might be to write a
> separate servlet for just handling the uploads,
> http://code.google.com/appengine/kb/java.html#fileforms
>
> Br,
> Juha
>
> On Sat, Apr 11, 2009 at 5:15 PM, Matthew Welch  wrote:
>> I've been experimenting a bit with Google App Engine and Wicket and things
>> seemed to work fairly well once I turned off the ModificationWatcher.
>> However, I realized that my simple tests were all stateless and that once
>> stateful, Wicket would use the DiskPageStore to write some files, which is
>> not allowed in the App Engine sandbox. Sure enough, once I added some
>> stateful pages, I started seeing exceptions related to the DiskPageStore.
>>
>> I'm a neophyte when it comes to the deep down Wicket internals so I'm not
>> sure what my other options might be. In a post Matej  Knopp said, ""*
>> DiskPageStore*'s purpose is to store serialized pages on disk in order to
>> allow access to previous page versions and also to conserve session memory
>> usage." This leads me to believe that using the sassion for storing this
>> information isn't a preferred approach. What about the App Engine's
>> datastore (an abstration on BigTable)? That seems like it might be too slow
>> to adequately serve this need, but I'm not sure. A thread on
>> Wicket/Terracotta integration ended up with an alternative
>> "SecondLevelCacheSessionStore" but I'm not sure if that is only usable with
>> Terracotta or if it might might sense in other situations. Any other
>> options?
>>
>> Also, looking forward, with the knoledge that writing giles and spawning new
>> threads are not allowed in the App Engine sandbox, are there any other items
>> I should be onl the lookout for in Wicket that might make it a poor choice
>> for this situation?
>>
>> Matt
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: WicketFilter

2009-08-29 Thread Igor Vaynberg
map WicketSessionFilter in front of those servlets, you will get both
Session.get() and Session.get().getApplication(), and
Application.get()

-igor

2009/8/29 Uwe Schäfer :
> Hi
>
> once in a while, i´d like to create a servlet (or worse) that can grab data
> from the wicket application. currently, i do it through singletons which
> feels quite dirty.
>
> i was wondering, if it would be possible to extend the WicketFilter, to
> offer a reference to anyone processing the request (further in the chain) to
> the application the request belongs to.
>
> It might confuse some existing code if Application.get() suddenly would
> work, even though Wicket is not processing the request, but there are plenty
> of other possibilties, like request-attributes (might be very cheap in terms
> of performance) or dedicated threadLocals.
>
> one could certainly do that by subclassing myself, but as this is the 3rd or
> 4th time i come across this need, i was wondering, if i am alone or simply
> missing something.
>
> cu uwe
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



requestParameters and %20

2009-08-29 Thread Fernando Wermus
I am serving a file from disk which its name is "red apple.jpg".
>From html source it renders as follows



I found that On method getUri() and a variable into requestParameters the
image name has been translated to red%20apple.jpg

new URIRequestTargetUrlCodingStrategy("/" + "thumbnail") {

@Override public IRequestTarget decode(RequestParameters requestParameters)
{

try {

return serveImage(getURI(requestParameters), );

} catch (Exception e) {

throw new WicketRuntimeException(e);

}

}

};


Which is the best way to manage this situation?


Do I have just implement a method from my own converting %20 or there is a
wicket way to do this job?


I am using wicket 1.3.6

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


WicketFilter

2009-08-29 Thread Uwe Schäfer

Hi

once in a while, i´d like to create a servlet (or worse) that can grab 
data from the wicket application. currently, i do it through singletons 
which feels quite dirty.


i was wondering, if it would be possible to extend the WicketFilter, to 
offer a reference to anyone processing the request (further in the 
chain) to the application the request belongs to.


It might confuse some existing code if Application.get() suddenly would 
work, even though Wicket is not processing the request, but there are 
plenty of other possibilties, like request-attributes (might be very 
cheap in terms of performance) or dedicated threadLocals.


one could certainly do that by subclassing myself, but as this is the 
3rd or 4th time i come across this need, i was wondering, if i am alone 
or simply missing something.


cu uwe

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



Re: Broken URLs when app packaged as WAR

2009-08-29 Thread Major Péter

Maybe this helps you:
http://www.coderanch.com/t/87915/Tomcat/tomcat-define-context-root-name

How did you mounted your url's? How did you created your link to the 
newrun page?


Regards,
Peter

2009-08-28 20:24 keltezéssel, Arun Gupta írta:

Created a Wicket application and runs fine using "mvn jetty:run" and
then created a WAR using "mvn package". When the app is deployed in
Tomcat, only the home page shows up correctly but all other links
giving 404.

For example

http://localhost:8080/runner/newrun works fine with Jetty but
http://localhost:8080/runner-1.0-SNAPSHOT/runner/newrun gives an error
in Tomcat.

Any idea ?

-Arun


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



Re: Broken URLs when app packaged as WAR

2009-08-29 Thread Mathias Nilsson

Should't that be

http://localhost:8080/runner-1.0-SNAPSHOT/newrun
-- 
View this message in context: 
http://www.nabble.com/Broken-URLs-when-app-packaged-as-WAR-tp25194698p25204500.html
Sent from the Wicket - User 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: Quick model/user/session question

2009-08-29 Thread James Carman
Aren't they chained based on the order of the filter mapping definitions,
not the order of the filter definitions?

On Aug 29, 2009 12:40 AM, "Igor Vaynberg"  wrote:

filters are executed in the order they are defined, so put the osiv
filter declaration before wicket.

-igor

On Thu, Aug 27, 2009 at 8:08 AM, Dane Laverty wrote:
> Thanks for the sugges...


Re: [ANN] Wicket Guice Metro, was: Wicket + Webservice

2009-08-29 Thread nino martinez wael
Cool!

2009/8/28 Uwe Schäfer :
> Bas Gooren schrieb:
>
> Hi Bas
>
>> I would like to integrate a webservice callable by others into my existing
>> Wicket application.
>> The reason is that I'm integration a third-party payment provider and they
>> provide a callback mechanism in the form of a WSDL I need to implement.
>> I'd like to be able to control the location where the webservice is
>> mounted from wicket, and access my guice-injected services through
>> wicket-guice integration. This way I have easy access to all the services
>> and daos in my application
>
> just popped it out:
>
> http://code.google.com/p/wicket-guice-jaxws/
>
> trivial code, please let me know if it works for you.
>
> cu uwe
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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