PEGASUS84 wrote:
please can you tell me
any quicly method to implement this
because i've not time
O_o
Dave
Nils-Helge Garli wrote:
You're setting a request attribute, but trying to access a request
parameter. Also, I would recommend that you do not access the output
stream directly. I suggest you take some time to study some
servlet/jsp tutorials, and then move on to the Struts 2 bootstrap
guides.
Nils-H
On Mon, Mar 16, 2009 at 5:31 PM, PEGASUS84 <pegasu...@hotmail.it> wrote:
that's right!
now i realize this:
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.Action;
import javax.servlet.http.HttpServletRequest;
import com.opensymphony.xwork2.ActionContext;
import java.util.*;
public class filtro implements Interceptor {
private HttpServletRequest request;
public void setServletRequest(HttpServletRequest request){
this.request = request;
}
public HttpServletRequest getServletRequest(){
return request;
}
public void destroy() {
}
public void init() {
}
public String intercept( ActionInvocation actionInvocation) throws
Exception{
Map session = actionInvocation.getInvocationContext().getSession();
utente user = (utente)session.get("autenticato");
if (user != null)
request.setAttribute("ciao","condizione");
return Action.ERROR;
}
}
and into jsp page:
<%out.print(request.getParameter("ciao"))%>
but it doesn't work
--
View this message in context:
http://www.nabble.com/System.out-into-interceptor-tp22535922p22541213.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org