Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

for sevlet calling by java  RSS feed

 
Amit Dubey Kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
want to use .writeObject but without using FileOutputStream
actuly i dont want to make newfile i want to get direct arraylist object
please tell me if anybody know about this my code servlet is


but here i m using one extra tmp file now i dont want to use that file so any body tell me what i have to do for That

please


a very very thanks in advance
[ October 30, 2007: Message edited by: Ben Souther ]
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can write objects directly to ServletOutputStream.
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HttpUrlConnection has very limited functionality (at least I think so). You may want to look at Jakarta's HttpClient.

http://jakarta.apache.org/httpcomponents/httpclient-3.x/index.html

Here is a sample application that shows how to use the Jakarta HttpClient API to send an XML document to a remote web server using HTTP POST

http://svn.apache.org/viewvc/jakarta/httpcomponents/oac.hc3x/trunk/src/examples/PostXML.java?view=markup
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!