IBM AS/400E Network Router User Manual


 
samplejava()
{
String userMethod;
String cl;
cl = new String();
// Get the REQUEST_METHOD variable (POST or GET)
userMethod = System.getProperty("REQUEST_METHOD");
if (userMethod != null)
{
if (userMethod.equalsIgnoreCase("POST"))
{
System.out.println("Server method not supporting");
System.exit(0);
}
else
{
// if the method is GET
if (userMethod.equalsIgnoreCase("GET"))
{
// Get the Value of Query String
cl = System.getProperty("QUERY_STRING");
}
else
{
errMsg("Invalid REQUEST_METHOD specified");
System.exit(0);
}
}
}
else
{
// Print No method
errMsg ("No REQUEST_METHOD specified");
System.exit(0);
}
if (cl == null )
{
errMsg ("No user data");
System.exit(0);
}
else
{
// fill the Hash table with the user values
cgi_vars = parseArguments(cl);
}
}
90 Web Programming Guide V4R5