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

GET and POST method  RSS feed

 
geeta lalchandani
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp page where i m posting the data to a URL taht is temporarily out of service....
it wrks when i use the GET method..
but there is a malformedurl exception in case of post
why so???
 
Gaurav Chhabras
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont know the reason exactly but the problem might be that as in GET the data go with the help of URL i.e the data attached in the URL and then transffered and in POST methord the data will go with the body.
So when you are trying to add data in URL and using the POST methord then it might be possible that the error will be coming due to that reason.

I am not Exact about the above.
 
geeta lalchandani
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how does it matter how the data is posted?? the url should be validated befor the data is ....
so in that case the GET also shuldnt work, right??
 
Sravan Kumar
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, It should not work even in case of GET. The browser might have cached the page. Try sending different values (different from previous requests when the URL was working) with GET and check out if it works.
 
Tien-Chih Wang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
malformetedurl exception sometimes came from wrong charest parameters.
can you give more detail about the Exception message and code?

Tien-Chih Wang
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!