Hk mingham

Greenhorn
+ Follow
since Oct 16, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hk mingham

totally thank you Trivikram Kamat and Bear Bibeault,i have a clearier mind on it after i have finished the answer from you.yeah,thaks so much.
13 years ago
i know the different between the post and get,but ,you know ,when request is maked by container,the container will automatically choose the right http method (post or get),and then it will past this http method (post or get) to servlet,and then ,the servlet will figure it out.


but the question is ,the servlet is designed by us,and how do we make the right choose between dopost() or doget()?
13 years ago

Joshi Nirav wrote:Hi,
I think in the book the statement was written in the context of the response and response type that would suppose to be written on the output stream an we need to tell the server that " Hey here my content and its type sending to wards our client who will request to our page ." because ultimately developer who will developing that page need to informe to server about the content.content type.

He said that container wont' know because after the execution/interpretation of the page code container will get the content/content type.


Thanks and Regards
Nirav Joshi





Nirav Joshi ,totally thanks for your answer,this is the first time i ask question in javaranch,i glad that i can get the answer in such short time and such great answer.all i should say is thanks Nirav Joshi.
13 years ago
in this book ,on page 131,it said "Q: Why do you have to set the content type? Can’t servers figure it out from the extension of the file? A:But we’re talking about what happens inside a servlet where there IS no file! You’re the one who is sending back the response; the Container has no idea what you’re sending."

how strange,he said "the Container has no idea what you’re sending",but,now ,we are building the whole web app,we can handle everything,the container can know the type after we built it,we aren't client,we are developer,why it said the container don't know?
13 years ago