Java tutorial
//package com.java2s; /******************************************************************************* * Copyright (c) 2013-2015 Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributor: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ public class Main { public static String getStartPageParameters(String StartPageName) { String parameterString = null; int indexOfQueryParameter = getQueryIndex(StartPageName); if (indexOfQueryParameter > 0) { parameterString = StartPageName.substring(indexOfQueryParameter, StartPageName.length()); } return parameterString; } private static int getQueryIndex(String homeUrl) { return homeUrl.indexOf("?"); //$NON-NLS-1$ } }