I've written a client/server application that does a POST from the java class to a servlet on my network. I'm sending a file through streams. I need to be able to send a filename for this transfered file as well. I would normally just call get/setAttribute or get/setParams but they don't work in this situation. Does anyone have an idea of what I'm looking for? Thanks for your time.
Perhaps your client could set a request header with the URLConnection method addRequestProperty("filename", "somefilename") and your servlet could read it with getHeader("filename") (Have not tried this but it seems like it should work) Bill
Joined: Sep 14, 2002
I have be using the addRequestProperty method on the client, yet I haven't found a way to get that value in the server. I'll try getHeader. Thanks for your post!