portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sahu, Santosh" <Santosh.S...@ie.fid-intl.com>
Subject Valves,
Date Thu, 24 Aug 2006 15:33:23 GMT

Folks,
Any help is appreciated.
I am trying to write my own valve and put it in the jetspeed piple line.

Question is I want to call this for every request and up on a conditions
success redirect to a page. What is the best option ? Is to use
response.sendRedirect or use PageProfiler to do the job.
If it is response.sendRedirect then when I need to call this valve in the
pipeline?
If it is Page profiler when I need to call.

Code:
public void invoke(RequestContext request, ValveContext context) throws
PipelineException
	{     
	    	log.info("in Invoke -TCValveImpl");
	    	try
	    	{
	    	//Get the Authenticated Used Id
	    	//If(userId not null){
	    	//Call ITermsAndConditions to check the whether this user
accepted TC
	    	//if Accepted {
	    	//context.invokeNext(request);
	    	//}
	    	//else 
	    	HttpServletResponse resp = request.getResponse();
        	String basePath=request.getPortalURL().getBasePath();
        	//Get the LoginPage PSML file name from property file (can
be from spring xml files)
        	resp.sendRedirect(basePath+"/login.psml");
	    	}catch(Exception e)
	    	{
	    		e.printStackTrace();
	    	}
	 }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message