Home > Contents > Index >
FormPoster.addTextValue
Adds a name/value pair to the mime message under construction.
Syntax
public boolean addTextValue(String sParamName, String sValue)Parameters
sParamName
- Name of the parameter.
sValue
- Value string of the parameter
Example
FormPoster fp = new FormPoster(); FTValList vlCookies; fp.setURL("http://myserver/servlet/CatalogManager"); // Add a new row to MyTable FTStatusCode ftStatus = new FTStatusCode(); status = fp.login(true, ftStatus, "myusername", "mypassword"); vlCookies = fp.findAllCookies(); Status = fp.addFile("url", "test.html", "/export/home/temp/test.html", "text/html"); Status = fp.addTextValue("tblname", "MyTable"); Status = fp.addURL("myparameter", "http://server/main.html"); Status = fp.addTextValue("id", "1323"); Status = fp.addTextValue("ftcmd", "addrow"); fp.setCookies(vlCookies); Status = fp.post(); // Fetch the response without the http headers CleanResponse = fp.cleanRawResponse(true); fp.login(false, ftStatus, null, null);See Also
addFile , addURL , setCharacterEncoding
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.