Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP Status 405 - HTTP method GET is not supported by this URL  RSS feed

 
tong yuxin
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just write a small code :
---------------------------------------------
<form method="POST" action="Inquire.do">
XXXX<p>
XXXX:
<select name="cer",size="1">
<option A >A
<option B>B
</select>
<select name="ert",size="1">
<option C >C
<option D>D
</select> .........
----------------------------------------------------
its fine when i use it to request servlet.
But when i modifiy a little bit of that code and the funny thing happen
---------------------------------------------
<form method="POST" action="Inquire.do">
XXXX<p>
XXXX:
<select name="cer",size="1">
<option A >A
<option B>B
</select>
<select name1="ert",size="1"> // see i modified the name to name1
<option C >C
<option D>D
</select> .........
----------------------------------------------------
i got exception about : HTTP method GET is not supported by this URL

SO, what's the "name" really means?
why it sent get() request?

please help!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65832
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
name1 is not valid HTML. Don't do that.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, what's the comma doing between the name1 and size attributes?
 
Paul Yule
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"name" is an attribute tied to the <select> tag (among others)...you should be changing the value of the attribute not the attribute identifier...in this case attribute identifier is "name". The HTML has rules for how tags and attributes are interpreted. It has no rules for the name1 attribute.

Just like "src" is an attribute for the <img> tag ... with the value of "src" being w/e you needed to link to.



If you changed the identifier of an attribute how would the browser interpret your name1 attribute or src1 attribute?
[ September 19, 2008: Message edited by: Paul Yule ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!