You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by gauravchopra <ga...@gmail.com> on 2011/02/18 22:49:43 UTC
Calling Page from Servlet
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 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-tp3391828p3391828.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
Re: Calling Page from Servlet
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Hi!
Please post your questions in the users list. This list discusses the
development *of* Tapestry, not *with* Tapestry. ;)
On Fri, 18 Feb 2011 19:49:43 -0200, gauravchopra
<ga...@gmail.com> 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 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.
>
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
Coordenador e professor da Especialização em Engenharia de Software com
Ênfase em Java da Faculdade Pitágoras
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org