See no problem of using spring services within a servlet, see my servlet
example: http://pastebin.com/6tWstvAL
<http://pastebin.com/6tWstvAL>
Žilvinas Vilutis

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


On Mon, May 10, 2010 at 8:10 PM, Joe Fawzy <joewic...@gmail.com> wrote:

> Hi dear
> actually , access control and dynamic file generation requires using
> services which is injected by spring
> this cannot be easily done in pure servlet
>
> my current solution using spring @Controller and write diretly to the
> servlet response is somethingvery similar to writing a servlet
> but as i am planning to deploy on appengine, the startup time for spring
> especially when using spring mvc cannot be accepted (more than 30 sec)
>
> so i am tring to figure out a pure wicket solution
>
> thanks for your help
> Joe
>
> On Mon, May 10, 2010 at 5:34 AM, Igor Vaynberg <igor.vaynb...@gmail.com
> >wrote:
>
> > 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
> >
> >
>

Reply via email to