All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.frameworkset.spi.remote.hession.RestfulHessianHandlerFactory Maven / Gradle / Ivy

Go to download

bboss is a j2ee framework include aop/ioc,mvc,persistent,taglib,rpc,event ,bean-xml serializable and so on.http://www.bbossgroups.com

The newest version!
package org.frameworkset.spi.remote.hession;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class RestfulHessianHandlerFactory extends HessianHandlerFactory {

	public RestfulHessianHandlerFactory() {
		// TODO Auto-generated constructor stub
	}
	protected String getServiceName(HttpServletRequest request,HttpServletResponse response)
	{
		String service=request.getRequestURI();
		int idx = service.lastIndexOf('/');
		if(idx > 0)
		{
			return service.substring(idx+1);
		}
		else
		{
			throw new HessionException(service + " is not a hessian service address.");
		}
	}
	
	public static void main(String[] args)
	{
		String service="aa/";
		int idx = service.lastIndexOf('/');
		
		
		System.out.println( service.substring(idx+1));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy