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

com.genexus.webpanels.ContextPath Maven / Gradle / Ivy

Go to download

Core classes for the runtime used by Java and Android apps generated with GeneXus

There is a newer version: 4.7.3
Show newest version
package com.genexus.webpanels;
import com.genexus.servlet.IServletContext;

public class ContextPath
{
	public static IContextPath getIContextPath(IServletContext context)
	{
		try
		{
			if ((context.getMajorVersion() == 2 && context.getMinorVersion() > 1) || context.getMajorVersion() > 2)
			{
				return (IContextPath) Class.forName("com.genexus.webpanels.ContextPathNew").newInstance();
			}
			else 
			{
				return (IContextPath) Class.forName("com.genexus.webpanels.ContextPathOld").newInstance();
			}
		}
		catch (Throwable e)
		{
			try
			{	// El JSDK.jar viejo no tiene la getMajorVersion(), por lo que tira un Error, asi que intentamos con el ContextPathOld
				return (IContextPath) Class.forName("com.genexus.webpanels.ContextPathOld").newInstance();
			}catch(Exception e2)
			{
				return null;
			}
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy