Hi! If I'm right the problem is that you submit a form. In the T5 the rendering of the page is separated with a redirect.
1. You could send a GET request instead of POST. http://tappage.url/CDE And the appropriate onActivate method would be something like: void onActivate(String abc) { ... } 2. The T5 page should store the values from the first onActivate in persistent properties (the 'flash'-style would be preferred) @Persist(value="flash") String abc; void onActivate() { String _abc= req.getParameter("ABC"); if (_abc == null) { // use value from this.abc } else { abc = _abc; } } But this second seem to me kinda awkward... Cheers! Sandor Irlanda On Sat, Feb 19, 2011 at 6:36 AM, gauravchopra <[email protected]>wrote: > > Dear All, > > > I am new to tapestry and require your help in resolving this issue. I have > a > requirement to call tapestry application from other application (built in > servlets and jsp) I am calling Tapestry page from the servlet and passing > certain parameters to the Tapestry page. > Servlet code: > PrintWriter newpage; > response.setContentType("text/html"); > newpage = response.getWriter(); > newpage.println("<form name=\"formMenu\" action=\"" + Tapestry url + "\" > method=\"post\" >"); > newpage.println("<input type=\"hidden\" name=\"ABC\" value=\"CDE\">"); > > > At Tapestry end: > > in the Page java file, i defined onActivate method and the values are > coming > at this end > @Inject > private Request req; > void onActivate() > { > > String abc= req.getParameter("ABC"); > > > } > > The onActivate method gets called twice, 1st time i can see the values > passed to page and makes the value as null in 2nd time call. Which event > should i use at the tapestry end to get the values from servlet and avoid > the above situation? Is there any other way to achieve the requirement? > The page will get called from other application as well as directly login > into tapestry application. > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Calling-Page-from-Servlet-tp3392127p3392127.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
