| 
import java.net.URL;
import com.fujitsu.uji.ext.UjiServletConnection;
 /*
  * 初期化処理。
  */
  protected void initUser () {
    try{
       // UjiServletConnectionオブジェクトを生成します。
       conn = new UjiServletConnection();
       conn.setURL(new URL("http://somehost/myServlet"));
       // ブラウザのクッキーを取得し、UjiServletConnectionオブジェクトに設定します。
       String cookie = com.fujitsu.uji.ext.PluginUtility.getCookieFromBrowser(this);
       // 設定するクッキーを取り出します。
       // ここでは全てのクッキーをUjiServletConnectionに設定しています。
       if(cookie != null && cookie.length() != 0){  
          conn.setCookie(cookie);
       }
       // 送信するデータを生成します。
       MyBean reqBean = new MyBean();
       MyBean resBean = (MyBean)conn.invoke(reqBean,"verb");
    } catch(Exception e){
       // 通信に失敗した場合の処理を記述します。
    }
 }
    |