Could you show to us the whole code? I mean, the page or panel that upload
the files as well the IRequestTarget class you have implemented?

On Thu, Jul 23, 2009 at 10:31 AM, Altuğ B. Altıntaş <alt...@gmail.com>wrote:

> Hi all ;
>
> I can't use WicketSessionFilter maybe because I am using Apache Shiro (old
> name is Apache Kİ).
>
> In fact Fernando's solution works; Now I can reach and use Session inside
> UploadRequestTarget which implements IRequestTarget.
>
> But then I realized that I reach a different Session object in
> UploadRequestTarget class. It creates a new Session so i can  NOT access it
> in other WebPages.
>
> In my Application class;
>
>  @Override
>    public final Session newSession(Request request, Response response)
> {
>            return new MySession(request);
>    }
>
> Are there any way to access all Sessions or stop creating a new Session in
> UploadRequestTarget (which implements IRequestTarget)
>
> Thanks.
>
> Altug.
>
> 2009/7/20 Igor Vaynberg <igor.vaynb...@gmail.com>
>
> > see WicketSessionFilter
> >
> > -igor
> >
> > On Sun, Jul 19, 2009 at 3:20 PM, Altuğ B. Altıntaş<alt...@gmail.com>
> > wrote:
> > > Hi Igor;
> > >
> > > I found the problem; problem is when i hit my UploadServlet via
> http-get
> > > method , i simply write the url and hit the enter then below code is
> > working
> > >
> > >  Session wicketSession = Session.get();
> > >
> > > I can get wicket Session, wow !! it is great...
> > >
> > > BUT ...
> > >
> > > When i hit  my UploadServlet via http-post method, swfupload access in
> > that
> > > way then i can NOT access wicketSession.
> > >
> > > I mean this code :
> > >
> > >  Session wicketSession = Session.get();
> > >
> > > it throws :
> > >
> > > java.lang.IllegalStateException: you can only locate or create sessions
> > in
> > > the context of a request cycle
> > >
> > > Any idea ?
> > >
> > > Thanks
> > >
> > > Altug..
> > >
> > >
> > > 2009/7/14 Igor Vaynberg <igor.vaynb...@gmail.com>
> > >
> > >> that doesnt make any sense. all things within the webapp share the
> > >> session. you guys are welcome to create a quickstart that replicates
> > >> this.
> > >>
> > >> -igor
> > >>
> > >> On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaş<alt...@gmail.com>
> > >> wrote:
> > >> > Also I have a problem like yours.
> > >> >
> > >> > Servlet session and Wicket's session are different so you are
> getting
> > >> nul.
> > >> > Just debug your application and you will see that they have
> different
> > >> > session Id's.
> > >> >
> > >> > I tried to use WicketSessionFilter but it doesn't work.
> > >> >
> > >> > I am using wicket 1.3.5.
> > >> >
> > >> > Cheers...
> > >> >
> > >> > Altug.
> > >> >
> > >> > 2009/6/23 danisevsky <danisev...@gmail.com>
> > >> >
> > >> >> hello, I am using MyMultiFileUploadServlet for uploading files and
> in
> > >> some
> > >> >> wicket component I need find out how many files was uploaded.
> > >> >> I was trying to set this number to the HttpSession in
> > >> >> MyMultiFileUploadServlet and get it in the component:
> > >> >>
> > >> >>                    HttpSession httpSession = ((WebRequest)
> > >> >> getRequest()).getHttpServletRequest()
> > >> >>                            .getSession();
> > >> >> String count = httpSession
> > >> >>                            .getAttribute("filesCount");
> > >> >>
> > >> >> but count is always null. Is there any way how to get some data
> from
> > >> >> servlet? Thanks
> > >> >>
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Altuğ.
> > >> >
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > >> For additional commands, e-mail: users-h...@wicket.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > Altuğ.
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Altuğ.
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus

Reply via email to