• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP Status 405 error

 
karthik mahalingam
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

right now iam working with Sun One App server...(deploying an EJB application)...

In one of the screens, with a textbox field when i press enter iam getting the following error:
_________________________________

HTTP Status 405 - HTTP method GET is not supported by this URL
type Status report

message HTTP method GET is not supported by this URL
description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).

Sun-Java-System/Application-Server-PE-8.0
__________________________________
Please get me a solution at the earliest....

Thanks in advance..
regards
Karthik Mahalingam
[ February 24, 2005: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using method="post" in the HTML Form tag?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

thanks Ben
ya you are right ..iam using method=post in my tag...
how to proceed now???


Karthik, nobody benefits from the discussion if it dissapears into a private message conversation.

The message you're getting says that you are making a GET request instead of a POST request.
Can you post the form portion of the HTML?
 
karthik mahalingam
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok Ben ...

this is my HTML code:

<html><head><title>
Question2</title>
<base target='_top'>
<META HTTP-EQUIV='Expires' CONTENT='0'>
<link href='/granthacvs/html/sample.css' type='text/css' rel='stylesheet'>
</head><script language='javascript'>
function faq(){
window.open('/granthacvs/html/faq_page.htm','FAQ','toolbar=no,scrollbars=yes,resizable=no,width=600,height=500')
}
function linkscript(fb){
x = '/granthacvs/html/BioDataHelp1.html#'+fb;
window.open(x,'FAQ','toolbar=no,scrollbars=yes,resizable=no,width=600,height=500')
}
function autoFocus(f){
f.q200611.focus();
}
function main(){
var f=document.frm1;
if(f.q200611.value == ''){
alert('You must answer all questions on this page to continue.\n\nClick the OK button to go to the first empty field.\n\nIf you don\'t have the information you need, please save & exit. You may resume\nyour session at a later time by entering your password.');f.q200611.focus();f.q200611.select();return false;}
if(!f.q200611.value == ''){
if((f.q200611.value).length > 2)
{ alert('The information that you provided exceeded allowed length for the field.\n\nClick the OK button to go to the field. Please provide a shorter response. needs2width');f.q200611.focus();f.q200611.select();return false;}
if(isNaN(f.q200611.value))
{ alert('You must enter numeric data only for this field (decimal point is allowed).\n\nClick the OK button to enter numeric value.');f.q200611.focus();f.q200611.select();return false;}
}
return true;
}
function Continue() {
if (main()){
document.frm1.method='post';
document.frm1.action='/granthacvs/PengGetQuestions';
document.frm1.submit();
}
}
function Back() {
document.frm1.method='post';
document.frm1.action='/granthacvs/PengBackServlet';
document.frm1.submit();
}
</script>
<style type='text/css'>
#btnFont1{
font-family: Arial Rounded MT Bold;
background-color: rgb(0,128,128);
color: rgb(255,255,255);
font-size: 12pt;
font-weight: bold;
}
</style>
<body>
<form name='frm1'>
<center><table border='0' width=600 cellspacing='0' cellpadding='0'>
<tr>
<td><img src='/granthacvs/images/banner.gif'></td>
<td><a style='text-decoration:none;' name='contact' href= 'mailto:karthik@compucrafters.com'><font size=2 face='arial'color='#679CA0'><b>Contact Us</b></font></a>
<br>
<a style='text-decoration:none;' name='help' href='javascript:faq()'><font size=2 face='arial'color='#679CA0'><b>Help</b></font></a>
<br>
<a style='text-decoration:none;' name='saveexit' href='/granthacvs/SaveExit?user=~user~'><font size=2 face='arial'color='#679CA0'><b>Save & Exit</b></font></a>
</td>
</tr>
<tr><td bgcolor="#028181"><img border='0' height='1' width='1'></td><td bgcolor="#028181"><img border='0' height='1' width='1'></td></tr>
</table></center>

<center><table border='0' width= 550>
<tr><td width='0'></td><td width= 550 ><p><FONT name='Arial' size='3' color='Green'>Question 2:</FONT></p></td></tr>
</table></center>

<center><table border=0 width= 550>
<tr><td width='0'></td><td width='275' align='left' valign='top'><FONT name='Arial' size='5' color='Magenta'><B><I>Enter your Age</I></B></FONT></td>
<td width='50%' align='left' valign='top'><input type='text' name='q200611' tabindex='01' size=4 maxlength=2 value="~q200611~">
</td></tr>
</table></center>

<br>
<br>
<br>
<br>
<input type='hidden' name='errormessage' value=~errormessage~>
<input type='hidden' name='applicationId' value=~applicationId~>
<input type='hidden' name='languageId' value=~languageId~>
<input type='hidden' name='user' value=~user~>
<input type='hidden' name='prevpageid' value=~prevpageid~>
<input type='hidden' name='pageid' value='20062'>
<input type='hidden' name='directioncheck' value=''>

<br><br>
<center><table border=0 width= 550><tr>
<td width='50' align='left'>
<div id='back'><a href='javascript:Back()'><img src='/granthacvs/images/back.gif' border=0></a></div>
</td><td width='450' align='center'>
<div id='status'><center><table border='0' cellspacing='0' bgcolor='black' width='300' height='20'>
<tr><td width=102 bgcolor='#028181'><FONT SIZE=1 COLOR='#028181'>.</FONT></td><td width=198><FONT SIZE=1 COLOR='#00aaaa'>.</FONT></td></tr></table>
<FONT SIZE=2 COLOR='#003366'><b>Progress</b> </FONT></center></div>
</td><td width='50' align='right'>
<div id='continue'><a href='javascript:Continue()'><img src='/granthacvs/images/forward.gif' border=0></a></div>
</td></tr></table></center>

<center><table width='600' border='0' cellspacing='0' cellpadding='0'>
<tr><td bgcolor='#028181' width='600' class='special'><img border='0' height='1' width='1'></td></tr>
</table></center>

</form>
</body></html>
*************

do suggest me the changes
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, please, when posting code (especially when posting a lot of code), use the UBB Code tags. There is a button on the page to help with this. Doing so preserves your indenting and makes the code much easier to read.



I think your form is never being submitted. Instead the the clicking of the anchor tag is triggering a GET request. Using the onclick event to call your JS function and returning 'false' from the function will probably take care of this. If you need examples, the guys in HTML/Javascript could probably give you better ones than I could.

If you want to know exactly what your browser is sending, download either Mozilla or Firefox, and install LiveHttpHeaders.
http://livehttpheaders.mozdev.org/
With it, you can watch the request and reponse headers, in real time, as they are being sent back from the browser and server.

<opinion>
It looks like you're relying on a lot of Javascript code to do things that could be done, either on the server or with straight HTML.
Example:
You're always using the POST method in your form.
Why not just hard code the attribute in the form tag instead of setting it in the JS function:
<form method="post" name="frm1">
</opinion>

The less I rely on client side code, the better I sleep at night.
[ February 24, 2005: Message edited by: Ben Souther ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!