load external image from url and use it application wide

2010-05-09 Thread Christoph Grün
Hi,

 

I would like to load an image from an external url, store it in a domain
object and use it application wide without reloading it again from that URL.
It should be only loaded the first time it is accessed, then stored in the
domain object.

 

In the constructor of the domain class, I have created a wicket image 

Imgresource = new
Image(detailedImage,http://api.freebase.com/api/trans/image_thumb/en/hofb
urg_imperial_palace?maxwidth=250);

 

But if it is later used in a image panel, I get the error message:

 

INFO  - haredResourceRequestTarget - shared resource
ecgroup.web.panels.ImagePanel/http://api.freebase_de_DE.com/api/trans/image_
thumb/en/hofburg_imperial_palace not found or not allowed access

 

What is the best solution for this problem?

Do I have to mount the image as shared resource?

Is there an example for that?

 

Thanks, Christoph



Re: Multiple apps on single server

2010-05-09 Thread Janning Vygen
On Saturday 08 May 2010 23:37:59 Ján Raska wrote:
 Hello,

 I'm thinking about making small business by selling/renting e-shop and CMS
 applications written in Wicket. Now I'm trying to figure out, how many such
 applications can be hosted on a single server (let's assume 2x Dual Core
 Xeon 2.66 GHz, 4GB RAM). Except wicket, I'll use Spring and Hibernate or
 EclipseLink, libs in total shouldn't have more then 20-30MB, an average
 application can be assumed to have maximum of 200 active users at one time.

 Is there any way to figure it out? I'm basically trying to minimize a
 running cost per application and I love Java and Wicket too much to go back
 and do PHP stuff, though I guess it's impossible to beat PHP in terms of
 running cost. Can anybody help with this?

Java is much better in terms of resources than PHP, at least this my 
experience. It is not only much faster in my opinion, it has better tools to 
do profiling. I really did both on a high traffic website (600 accesses per 
second at peak time) and we solved almost any problem we had with 
java/tomcat/hibernate/postgresql vs apache/php/postgresql. 

In my experience, hardware is never an issue, at least not in the beginning. 
Most bottlenecks i have seen are software related. beginning at the database 
level with proper indexing and configuring the database, configuring the 
connection pool, using a cache, profiling your app will offer valuable 
insights. 
And not to be forgotten: take a look at the client with Yslow Firefox plugin. 
A great tool. And take thread dumps of you virtual machine at peak time to see 
what is really happening. 

So don't guess, measure!

kind regards
Janning


 Thanks

 Jan
 -
 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: CSS Templating

2010-05-09 Thread Igor Vaynberg
usually you would simply write a servlet to do it, but if you insist
on doing it in wicket...

https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html

-igor

On Fri, May 7, 2010 at 12:52 PM, Eric Hamel dantehick...@gmail.com wrote:
 All,

 I've been exploring the use of TextTemplateHeaderContributor.forCss method
 to build a CSS template for multiple application.

 Take for example:

 IModelMapString, Object model = new
 AbstractReadOnlyModelMapString,Object(){

 private static final long serialVersionUID = 1L;

 @Override
 public MapString, Object getObject() {
  HashMapString,Object map = new HashMapString, Object();
 map.put(body-bgcolor, red);
  return map;
 }

 };
  add(TextTemplateHeaderContributor.forCss(WelcomePage.class, Template.css,
 model));

 with CSS template:

 body{

 background-color: ${body-bgcolor};

 }



 The output works. However, the template is contributing to the header in the
 form of:

 style type=text/css!-- body{ background-color: red; }--/style

 which is unacceptable. Is there a way to generate a .css file to be used by
 the application ?

 Thank you

 --
 Sent by Eric Hamel


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



Re: images as resources

2010-05-09 Thread Igor Vaynberg
you can build a url using requestcycle.urlfor(new
resourcereference(class in the same package as image, image name));

armed with that you can build any kind of component you need..

-igor


On Fri, May 7, 2010 at 9:11 AM, Christoph Grün chris...@gmx.at wrote:
 Hi,

 I would like to have all images in a folder under resources and access them
 in different panels, which are in the package

 com.web.panels;



 What is the best way to do this and how to define the relative path?



 Thanks, Christoph







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



RE: Any solution for the context problem with the relative links of BookmarkablePageLink?

2010-05-09 Thread Chris Colman
Is your servlet container listening directly to port 80?

Yes. It's pure tomcat - not behind Apache Webserver.

If not, do the forwarding via a proxy on whatever you are using 
as a frontend.  In that frontend, have it rewrite the URLs (i.e. 
mod_proxy and mod_rewrite).

Otherwise, can you have your app mounted on /?

I have quite a few non wicket servlets for things like commands and web
services and each, including wicket, have their own unique context so
that they can all operate peacefully together under.

If I mount the wicket app on / will that then pick up request for all
the other contexts or is there a way to mount wicket at / and still
have other contexts mapping to different servlets?


--
Jeremy Thomerson
http://www.wickettraining.com



On Sat, May 8, 2010 at 12:40 AM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 I'll explain the problem in detail. I think it's similar to the link
I
 provided but maybe not:

 I have a site whose home page that is rendered via:

 www.mysite.com/content/home/pName/pValue

 but obviously the users will get their via:

 www.mysite.com

 I want the home page to be serviced via a forward to
 www.mysite.com/content/home/pName/pValue

 so that the search engines don't have to experience a 301 redirect.
 (where pName/pValue are required parameters that can be passed to any
 page)

 I forward via:

 RequestDispatcher rd = servletContext.

 getRequestDispatcher(www.mysite.com/content/home/pName/pValue);
 rd.forward(req, res);

 I don't mind if all subsequent pages a user visits use the full form
of
 the URL and these full URLs appear in the browser address bar. Eg.,

 www.mysite.com/content/contactUs/pName/pValue

 www.mysite.com/content/products/pName/pValue

 www.mysite.com/content/home/pName/pValue

 The forward works fine but any links on that page don't work because
the
 context of the wicket web app is 'content' - a separate servlet is
used
 to 'catch' URL's of the form www.mysite.com and redirects to the
wicket
 app.

 All my BookmarkablePageLinks are constructed assuming the 'content'
 context. I can change that so they work from www.mysite.com but then
 when the pages with www.mysite.com/content/blah... are visited those
 same links do not work.

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Saturday, 8 May 2010 10:53 AM
 To: users@wicket.apache.org
 Subject: Re: Any solution for the context problem with the relative
 links
 of BookmarkablePageLink?
 
 That wasn't a problem - it was someone configuring the proxy
 incorrectly.
  What (specifically) are you encountering?
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Fri, May 7, 2010 at 7:44 PM, Chris Colman
 chr...@stepaheadsoftware.comwrote:
 
  I was just wondering if there has been any developments on the
 problem
  outlined in this post because I'm having the same problem but
wanted
 to
  avoid the Index link solution:
 
 

http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-relative
  -path-Dilemma-td1933044.html
 
 
-
  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



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



Re: load external image from url and use it application wide

2010-05-09 Thread Zilvinas Vilutis
There are examples how to load external images here:
https://cwiki.apache.org/WICKET/how-to-load-an-external-image.html

All you've got to do is implement your own image cache

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com


On Sun, May 9, 2010 at 7:23 AM, Christoph Grün chris...@gmx.at wrote:

 Hi,



 I would like to load an image from an external url, store it in a domain
 object and use it application wide without reloading it again from that
 URL.
 It should be only loaded the first time it is accessed, then stored in the
 domain object.



 In the constructor of the domain class, I have created a wicket image

Imgresource = new
 Image(detailedImage,
 http://api.freebase.com/api/trans/image_thumb/en/hofb
 urg_imperial_palace?maxwidth=250http://api.freebase.com/api/trans/image_thumb/en/hofb%0Aurg_imperial_palace?maxwidth=250
 );



 But if it is later used in a image panel, I get the error message:



 INFO  - haredResourceRequestTarget - shared resource
 ecgroup.web.panels.ImagePanel/
 http://api.freebase_de_DE.com/api/trans/image_
 thumb/en/hofburg_imperial_palacehttp://api.freebase_de_DE.com/api/trans/image_%0Athumb/en/hofburg_imperial_palacenot
  found or not allowed access



 What is the best solution for this problem?

 Do I have to mount the image as shared resource?

 Is there an example for that?



 Thanks, Christoph




Re: Any solution for the context problem with the relative links of BookmarkablePageLink?

2010-05-09 Thread Jeremy Thomerson
On Sun, May 9, 2010 at 5:47 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 Is your servlet container listening directly to port 80?

 Yes. It's pure tomcat - not behind Apache Webserver.

 If not, do the forwarding via a proxy on whatever you are using
 as a frontend.  In that frontend, have it rewrite the URLs (i.e.
 mod_proxy and mod_rewrite).
 
 Otherwise, can you have your app mounted on /?

 I have quite a few non wicket servlets for things like commands and web
 services and each, including wicket, have their own unique context so
 that they can all operate peacefully together under.

 If I mount the wicket app on / will that then pick up request for all
 the other contexts or is there a way to mount wicket at / and still
 have other contexts mapping to different servlets?


If you're using the Filter, it should fall through for other requests -
allowing them to still be processed.  You may have to configure this
behavior - it's been a while since I've personally done it.  I know that
last week I configured a Wicket webapp on /foo when I already had another
app on / and they both worked just fine.  Two wars - one deployed in
tomcat/webapps/ROOT, and the other in tomcat/webapps/foo.  It just worked.

--
Jeremy Thomerson
http://www.wickettraining.com


Re: Any solution for the context problem with the relative links of BookmarkablePageLink?

2010-05-09 Thread James Carman
I don't think ProxyPass will work (at least it didn't used to) if you
try to use the / path, so that might be the trouble you're seeing
(if you're seeing any).

On Sun, May 9, 2010 at 6:47 PM, Chris Colman
chr...@stepaheadsoftware.com wrote:
Is your servlet container listening directly to port 80?

 Yes. It's pure tomcat - not behind Apache Webserver.

If not, do the forwarding via a proxy on whatever you are using
as a frontend.  In that frontend, have it rewrite the URLs (i.e.
mod_proxy and mod_rewrite).

Otherwise, can you have your app mounted on /?

 I have quite a few non wicket servlets for things like commands and web
 services and each, including wicket, have their own unique context so
 that they can all operate peacefully together under.

 If I mount the wicket app on / will that then pick up request for all
 the other contexts or is there a way to mount wicket at / and still
 have other contexts mapping to different servlets?


--
Jeremy Thomerson
http://www.wickettraining.com



On Sat, May 8, 2010 at 12:40 AM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 I'll explain the problem in detail. I think it's similar to the link
 I
 provided but maybe not:

 I have a site whose home page that is rendered via:

 www.mysite.com/content/home/pName/pValue

 but obviously the users will get their via:

 www.mysite.com

 I want the home page to be serviced via a forward to
 www.mysite.com/content/home/pName/pValue

 so that the search engines don't have to experience a 301 redirect.
 (where pName/pValue are required parameters that can be passed to any
 page)

 I forward via:

 RequestDispatcher rd = servletContext.

 getRequestDispatcher(www.mysite.com/content/home/pName/pValue);
 rd.forward(req, res);

 I don't mind if all subsequent pages a user visits use the full form
 of
 the URL and these full URLs appear in the browser address bar. Eg.,

 www.mysite.com/content/contactUs/pName/pValue

 www.mysite.com/content/products/pName/pValue

 www.mysite.com/content/home/pName/pValue

 The forward works fine but any links on that page don't work because
 the
 context of the wicket web app is 'content' - a separate servlet is
 used
 to 'catch' URL's of the form www.mysite.com and redirects to the
 wicket
 app.

 All my BookmarkablePageLinks are constructed assuming the 'content'
 context. I can change that so they work from www.mysite.com but then
 when the pages with www.mysite.com/content/blah... are visited those
 same links do not work.

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Saturday, 8 May 2010 10:53 AM
 To: users@wicket.apache.org
 Subject: Re: Any solution for the context problem with the relative
 links
 of BookmarkablePageLink?
 
 That wasn't a problem - it was someone configuring the proxy
 incorrectly.
  What (specifically) are you encountering?
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Fri, May 7, 2010 at 7:44 PM, Chris Colman
 chr...@stepaheadsoftware.comwrote:
 
  I was just wondering if there has been any developments on the
 problem
  outlined in this post because I'm having the same problem but
 wanted
 to
  avoid the Index link solution:
 
 

 http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-relative
  -path-Dilemma-td1933044.html
 
 
 -
  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



 -
 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



efficient resource downloading

2010-05-09 Thread Joe Fawzy
Hi
i want to know if this is an efficient way to download some files

i want my users to be able to download certain files just to registerd users
only so i can put that logic in the page constructor
but is this efficient way to do this as this may be called thausands of
times per hour   (the files generated dynamically)
does the construction of a page and all the other bits is heavy for such a
task

i am using spring MVC right now with its rest style model and annotation but
it seems to me too heavyweight for the task

so is this appropriate?
is there another way more efficient?

public class DownloadManagerPage extends WebPage{
private static final long serialVersionUID = 1L;

public DownloadManagerPage(PageParameters parameters) {
super(parameters);
if (registeredUser(parameters)) {
getRequestCycle().setRequestTarget(new
ResourceStreamRequestTarget(new AbstractResourceStreamWriter() {
private static final long serialVersionUID = 1L;
public void write(OutputStream output) {
output
}

public String getContentType() {
return ..;
}
}));
}
}

private boolean registeredUser(PageParameters parameters) {
return ;
}
}

thanks in advance
Joe


RE: Any solution for the context problem with the relative links of BookmarkablePageLink?

2010-05-09 Thread Chris Colman
Using the word 'context' was probably misleading on my part. In servlet
containers context=app. What I was talking about was the first 'path'
element after the domain name,

Eg., content in www.mysite.com/content

In this case I'm talking about a single app but I set up multiple
different URL patterns in the web.xml of that app to direct different
patterns to different filters/sevlets.

I have a virtual host and all the filters/servlets are under that
virtual host and all desployed via a single .war

 Is your servlet container listening directly to port 80?

 Yes. It's pure tomcat - not behind Apache Webserver.

 If not, do the forwarding via a proxy on whatever you are using
 as a frontend.  In that frontend, have it rewrite the URLs (i.e.
 mod_proxy and mod_rewrite).
 
 Otherwise, can you have your app mounted on /?

 I have quite a few non wicket servlets for things like commands and
web
 services and each, including wicket, have their own unique context so
 that they can all operate peacefully together under.

 If I mount the wicket app on / will that then pick up request for
all
 the other contexts or is there a way to mount wicket at / and still
 have other contexts mapping to different servlets?


If you're using the Filter, it should fall through for other requests -
allowing them to still be processed.  You may have to configure this
behavior - it's been a while since I've personally done it.  I know
that
last week I configured a Wicket webapp on /foo when I already had
another
app on / and they both worked just fine.  Two wars - one deployed in
tomcat/webapps/ROOT, and the other in tomcat/webapps/foo.  It just
worked.

--
Jeremy Thomerson
http://www.wickettraining.com

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



Re: how to get some data from servlet

2010-05-09 Thread Fernando Wermus
would you paste your code here? I will get a try if there is no problem.

On Sat, May 8, 2010 at 9:04 PM, Zilvinas Vilutis cika...@gmail.com wrote:


 The problem is not in wicket, but in SwfUpload or more specific would be
 the
 Adobe Flash itself - which uses IE cookies in any case, even when you're
 using FF or Chrome or Safari on Windows (
 http://swfupload.org/forum/generaldiscussion/869 )

 Not sure how secure is it - but I've solved this in the following way:
 - I've created a SecureSessionHolder static class which holds a list of
 secure session ids
 - Adding the secure session id to the list in SecureSessionHolder on
 authentification
 - an impl of HttpSessionListener to remove the session ids from the
 static
 list in SecureSessionHolder when session is destroyed
 - in the SwfUpload servler just check if the session id ( passed as a
 submit
 parameter ) is in the secure session list in SecureSessionHolder before
 parsing the response data

 If anybody has got any security concerns on this impl - please notify me,
 I'll appreciate any opinions

 -
 
 nothing is impossible
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/how-to-get-some-data-from-servlet-tp1885531p2136546.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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Any solution for the context problem with the relative links of BookmarkablePageLink?

2010-05-09 Thread Jeremy Thomerson
Should still work.  If you're using the filter, the idea is that it will
only respond to the URLs that it recognizes, and will pass other requests
down the chain.

--
Jeremy Thomerson
http://www.wickettraining.com



On Sun, May 9, 2010 at 8:48 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 Using the word 'context' was probably misleading on my part. In servlet
 containers context=app. What I was talking about was the first 'path'
 element after the domain name,

 Eg., content in www.mysite.com/content

 In this case I'm talking about a single app but I set up multiple
 different URL patterns in the web.xml of that app to direct different
 patterns to different filters/sevlets.

 I have a virtual host and all the filters/servlets are under that
 virtual host and all desployed via a single .war

  Is your servlet container listening directly to port 80?
 
  Yes. It's pure tomcat - not behind Apache Webserver.
 
  If not, do the forwarding via a proxy on whatever you are using
  as a frontend.  In that frontend, have it rewrite the URLs (i.e.
  mod_proxy and mod_rewrite).
  
  Otherwise, can you have your app mounted on /?
 
  I have quite a few non wicket servlets for things like commands and
 web
  services and each, including wicket, have their own unique context so
  that they can all operate peacefully together under.
 
  If I mount the wicket app on / will that then pick up request for
 all
  the other contexts or is there a way to mount wicket at / and still
  have other contexts mapping to different servlets?
 
 
 If you're using the Filter, it should fall through for other requests -
 allowing them to still be processed.  You may have to configure this
 behavior - it's been a while since I've personally done it.  I know
 that
 last week I configured a Wicket webapp on /foo when I already had
 another
 app on / and they both worked just fine.  Two wars - one deployed in
 tomcat/webapps/ROOT, and the other in tomcat/webapps/foo.  It just
 worked.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com

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




Re: efficient resource downloading

2010-05-09 Thread Igor Vaynberg
write a servlet

-igor

On Sun, May 9, 2010 at 6:37 PM, Joe Fawzy joewic...@gmail.com wrote:
 Hi
 i want to know if this is an efficient way to download some files

 i want my users to be able to download certain files just to registerd users
 only so i can put that logic in the page constructor
 but is this efficient way to do this as this may be called thausands of
 times per hour   (the files generated dynamically)
 does the construction of a page and all the other bits is heavy for such a
 task

 i am using spring MVC right now with its rest style model and annotation but
 it seems to me too heavyweight for the task

 so is this appropriate?
 is there another way more efficient?

 public class DownloadManagerPage extends WebPage{
    private static final long serialVersionUID = 1L;

    public DownloadManagerPage(PageParameters parameters) {
        super(parameters);
        if (registeredUser(parameters)) {
            getRequestCycle().setRequestTarget(new
 ResourceStreamRequestTarget(new AbstractResourceStreamWriter() {
                private static final long serialVersionUID = 1L;
                public void write(OutputStream output) {
                            output
                }

                public String getContentType() {
                    return ..;
                }
            }));
        }
    }

    private boolean registeredUser(PageParameters parameters) {
        return ;
    }
 }

 thanks in advance
 Joe


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



RE: Any solution for the context problem with the relative links of BookmarkablePageLink?

2010-05-09 Thread Chris Colman
Oh, of course! Sorry I was mistakenly assuming we'd use /* which would
match everything but if we use the non wild card / then that will only
do an exact match and other URLs with /content etc., will still be able
to match their own separate patterns and redirect to their appropriate
filters/sevlets.

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
Sent: Monday, 10 May 2010 12:23 PM
To: users@wicket.apache.org
Subject: Re: Any solution for the context problem with the relative
links
of BookmarkablePageLink?

Should still work.  If you're using the filter, the idea is that it
will
only respond to the URLs that it recognizes, and will pass other
requests
down the chain.

--
Jeremy Thomerson
http://www.wickettraining.com



On Sun, May 9, 2010 at 8:48 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 Using the word 'context' was probably misleading on my part. In
servlet
 containers context=app. What I was talking about was the first 'path'
 element after the domain name,

 Eg., content in www.mysite.com/content

 In this case I'm talking about a single app but I set up multiple
 different URL patterns in the web.xml of that app to direct different
 patterns to different filters/sevlets.

 I have a virtual host and all the filters/servlets are under that
 virtual host and all desployed via a single .war

  Is your servlet container listening directly to port 80?
 
  Yes. It's pure tomcat - not behind Apache Webserver.
 
  If not, do the forwarding via a proxy on whatever you are using
  as a frontend.  In that frontend, have it rewrite the URLs (i.e.
  mod_proxy and mod_rewrite).
  
  Otherwise, can you have your app mounted on /?
 
  I have quite a few non wicket servlets for things like commands
and
 web
  services and each, including wicket, have their own unique context
so
  that they can all operate peacefully together under.
 
  If I mount the wicket app on / will that then pick up request
for
 all
  the other contexts or is there a way to mount wicket at / and
still
  have other contexts mapping to different servlets?
 
 
 If you're using the Filter, it should fall through for other
requests -
 allowing them to still be processed.  You may have to configure this
 behavior - it's been a while since I've personally done it.  I know
 that
 last week I configured a Wicket webapp on /foo when I already had
 another
 app on / and they both worked just fine.  Two wars - one deployed in
 tomcat/webapps/ROOT, and the other in tomcat/webapps/foo.  It just
 worked.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com

 -
 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: how to get some data from servlet

2010-05-09 Thread Zilvinas Vilutis
SecureSessionHolder: http://pastebin.com/J891bDye

SecureSessionListener: http://pastebin.com/UBnLRLJ7

and just inside your implementation of
org.apache.wicket.authentication.AuthenticatedWebSession.authenticate(String,
String) ( or any other auth method ) call
SecureSessionHolder.addSecureSession( sessionId );



Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com


On Sun, May 9, 2010 at 6:57 PM, Fernando Wermus
fernando.wer...@gmail.comwrote:

 would you paste your code here? I will get a try if there is no problem.

 On Sat, May 8, 2010 at 9:04 PM, Zilvinas Vilutis cika...@gmail.com
 wrote:

 
  The problem is not in wicket, but in SwfUpload or more specific would be
  the
  Adobe Flash itself - which uses IE cookies in any case, even when you're
  using FF or Chrome or Safari on Windows (
  http://swfupload.org/forum/generaldiscussion/869 )
 
  Not sure how secure is it - but I've solved this in the following way:
  - I've created a SecureSessionHolder static class which holds a list of
  secure session ids
  - Adding the secure session id to the list in SecureSessionHolder on
  authentification
  - an impl of HttpSessionListener to remove the session ids from the
  static
  list in SecureSessionHolder when session is destroyed
  - in the SwfUpload servler just check if the session id ( passed as a
  submit
  parameter ) is in the secure session list in SecureSessionHolder before
  parsing the response data
 
  If anybody has got any security concerns on this impl - please notify me,
  I'll appreciate any opinions
 
  -
  
  nothing is impossible
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/how-to-get-some-data-from-servlet-tp1885531p2136546.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
 
 


 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus



Re: Any solution for the context problem with the relative links of BookmarkablePageLink?

2010-05-09 Thread Igor Vaynberg
you would use /*, wicket lets urls that it cannot map fallthrough and
be handled as usual.

additionally wicketfilter has some context params that lets you
specify ignore masks, see the source/javadocs.

-igor

On Sun, May 9, 2010 at 8:22 PM, Chris Colman
chr...@stepaheadsoftware.com wrote:
 Oh, of course! Sorry I was mistakenly assuming we'd use /* which would
 match everything but if we use the non wild card / then that will only
 do an exact match and other URLs with /content etc., will still be able
 to match their own separate patterns and redirect to their appropriate
 filters/sevlets.

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
Sent: Monday, 10 May 2010 12:23 PM
To: users@wicket.apache.org
Subject: Re: Any solution for the context problem with the relative
 links
of BookmarkablePageLink?

Should still work.  If you're using the filter, the idea is that it
 will
only respond to the URLs that it recognizes, and will pass other
 requests
down the chain.

--
Jeremy Thomerson
http://www.wickettraining.com



On Sun, May 9, 2010 at 8:48 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 Using the word 'context' was probably misleading on my part. In
 servlet
 containers context=app. What I was talking about was the first 'path'
 element after the domain name,

 Eg., content in www.mysite.com/content

 In this case I'm talking about a single app but I set up multiple
 different URL patterns in the web.xml of that app to direct different
 patterns to different filters/sevlets.

 I have a virtual host and all the filters/servlets are under that
 virtual host and all desployed via a single .war

  Is your servlet container listening directly to port 80?
 
  Yes. It's pure tomcat - not behind Apache Webserver.
 
  If not, do the forwarding via a proxy on whatever you are using
  as a frontend.  In that frontend, have it rewrite the URLs (i.e.
  mod_proxy and mod_rewrite).
  
  Otherwise, can you have your app mounted on /?
 
  I have quite a few non wicket servlets for things like commands
 and
 web
  services and each, including wicket, have their own unique context
 so
  that they can all operate peacefully together under.
 
  If I mount the wicket app on / will that then pick up request
 for
 all
  the other contexts or is there a way to mount wicket at / and
 still
  have other contexts mapping to different servlets?
 
 
 If you're using the Filter, it should fall through for other
 requests -
 allowing them to still be processed.  You may have to configure this
 behavior - it's been a while since I've personally done it.  I know
 that
 last week I configured a Wicket webapp on /foo when I already had
 another
 app on / and they both worked just fine.  Two wars - one deployed in
 tomcat/webapps/ROOT, and the other in tomcat/webapps/foo.  It just
 worked.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com

 -
 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



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