Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

encoding type to servlet

Thread view: 
Ike - 15 Jun 2006 00:56 GMT
Can anyone tell me, from the code snippet below, what the encoding type
would be for the Object[] below being sent via ans ObjectOutputStream to an
HttpServlet.service? Thanks, Ike
             URLConnection uc = servletURL.openConnection();
               uc.setDoOutput(true);
               uc.setDoInput(true);
               uc.setUseCaches(false);
               uc.setRequestProperty(I18N.rb.getString("Contenttype"),"application/octet-stream");

               ObjectOutputStream objOut = new
ObjectOutputStream(uc.getOutputStream());
               int sz=5;
               if(psObs!=null)
                   sz+=psObs.size()+1;
               Object conArray[] = new Object[sz];
               conArray[0]  = null;//driverField;
               conArray[1]  = null;//urlField;
               conArray[2]  = null;//userField;
               conArray[3]  = "0";
               conArray[4] = sqlField;
               if(sqlField.indexOf("?")>-1 && psObtypes!=null &&
psObtypes.size()>0){//this is a prepared statement
                   conArray[5]=psObtypes;
                   for(int t=0;t<psObs.size();t++){
                       //System.out.println(psObtypes.get(t));
                       conArray[6+t]=psObs.get(t);
                   }
               }
               objOut.writeObject(conArray);
               objOut.flush();
               objOut.close();
               try{
                   // get objects from servlet (1. message-string, 2.
headers 3.resultset-vector)
                   getObjectsFromServlet(uc);
               }catch (Exception gotophp){

               }
Ike - 16 Jun 2006 13:50 GMT
Its 64 bit encoded, then wrapped in UTF-8

//Ike


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.