struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PEGASUS84 <pegasu...@hotmail.it>
Subject Re: System.out into interceptor
Date Mon, 16 Mar 2009 16:31:04 GMT

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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message