• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

no Dumb Questions

 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Whilst going through "Head First Servlets & JSP" book, following questions struck my mind.

1. In the HTML form, what happens if there are two html elements with SAME name? Does the form submission work? If so, what happens if for the actions GET & POST?

2. Can we able to send HttpResponse from server to client with the contentType set to some ABC, which is not mentioned in the headers in the request message? If so, how does the browser respond?

If they make sense, can anyone answer me please?


Cheers,
Naren
 
vani venkat
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi naveen
here are my 2 cents.
1. yes, it will work, if you give same name for two fields, request parameters go in arraylist of that type.
2. i am guessing browser will not render the page properly. i had trouble to download a jar file because i didnot pass correct content type to response.setContectType.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic