ServletContext c  =
getRequestCycle().getRequestContext().getServlet().getServletContext();


Geoff

On 8/29/05, Paolo Donà <[EMAIL PROTECTED]> wrote:
> Thanks Dario,
> It's not a matter of parameter retrival.
> I don't know hot to implement the "getDynamicContent" method because I
> cannot access the ServletContex from my page class.
> Can you do that?
> 
> Paolo
> 
> On 8/29/05, Darío Vasconcelos <[EMAIL PROTECTED]> wrote:
> > The easy, straighforward solution could be
> >
> > <html>
> > <body>
> >   MY HEADER HERE
> >   <span jwcid="@Insert" value="ognl:dynamicallyGeneratedFile"/>
> >   MY FOOTER HERE
> > </body>
> > </html>
> >
> > And in your .java:
> >
> >   public String getDynamicallyGeneratedFile() {
> >     // get parameters from somewhere
> >     return getDynamicContent(getVariableFoo(),..;
> >   }
> >
> > Please take into consideration that in TP the access to request
> > parameters is possible but not recommended; you can pass parameters to
> > a page by simply defining a property (in your .page) and filling it in
> > from the calling page.
> >
> > Have you looked at Tapestry in Action or the Tapestry tutorial? The
> > hangman sample application might be of help...
> >
> >
> >
> >
> > On 8/29/05, Paolo Donà <[EMAIL PROTECTED]> wrote:
> > > Hi guys,
> > > I'm migrating a JSP app to tapestry4.
> > > How can I migrate this simple JSP code to tapestry?
> > >
> > > <% String dinamicallyGeneratedFileName = request.getParameter(..); %>
> > > <html>
> > > <body>
> > >    MY HEADER HERE
> > >    <jsp:include page="<%=dinamicallyGeneratedFileName"%>.txt"/>
> > >    MY FOOTER HERE
> > > </body>
> > > </html>
> > >
> > > My text files are stored somewere on the context root, but I cannot
> > > define assets for them, because they are put there by the customer via
> > > ftp and their names are unpredictable.
> > > I would just need the ServletContext object inside my tapestry page
> > > but don't know how to get it. I could then call
> > > ServletContext.getResource() or getResourceAsStream() to load the file
> > > I need. I couldn't find a solution.
> > >
> > > Can someone point me to the right direction?
> > >
> > > Thanks a lot.
> > > Paolo
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > I have enough money to last me the rest of my life, unless I buy something.
> >     Jackie Mason
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
The Spindle guy.           http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:    
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates:            http://spindle.sf.net/updates

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to