Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 package org.apache.geronimo.samples.daytrader.web;
 import  javax.servlet.*;
 import  javax.servlet.http.*;
 public class OrdersAlertFilter implements Filter {

Constructor for CompletedOrdersAlertFilter
 	public OrdersAlertFilter() {

See also:
 	private FilterConfig filterConfig = null;
 	public void init(FilterConfig filterConfigthrows ServletException {
 	      this. = filterConfig;

See also:
Filter.doFilter(ServletRequest, ServletResponse, FilterChain)
 	public void doFilter(
 		ServletRequest req,
 		ServletResponse resp,
 		FilterChain chain)
 		throws IOException, ServletException {
 		if ( == null)
 			String action = req.getParameter("action");
 			if ( action != null ) 
 				action = action.trim();
 				if ( (action.length() > 0) && (!action.equals("logout")) )
 					String userID;
 					if ( action.equals("login") )
 						userID = req.getParameter("uid");
 						userID = (String) ((HttpServletRequest) req).getSession().getAttribute("uidBean");
 					if ( (userID != null) && (userID.trim().length()>0) )
 						TradeServices tAction=null;
 						if(TradeConfig.getAccessMode() == .)
 							tAction = new TradeAction();
 						else if(TradeConfig.getAccessMode() == .)
 							tAction = new TradeWebSoapProxy();										
 						java.util.Collection closedOrders = tAction.getClosedOrders(userID);
 						if ( (closedOrders!=null) && (closedOrders.size() > 0) )
 						if (Log.doTrace()) Log.printCollection("OrderAlertFilter: userID="+userID+" closedOrders="closedOrders);
 		catch (Exception e)
 			Log.error(e"OrdersAlertFilter - Error checking for closedOrders");
         ServletContext sc = .getServletContext();
         //String xyz = (String) sc.getAttribute("hitCounter");

See also:
 	public void destroy() {
 		this. = null;	
New to GrepCode? Check out our FAQ X