Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I cannot get parameters as class from JSP  RSS feed

 
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can see my class and controller below , and when i submit my JSP form , i see that 'HTTP 400 , The request sent by the client was syntactically incorrect.'
How can i solve this problem ?



 
author & internet detective
Marshal
Posts: 37896
594
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Miri,
Can you share the URL that is sent to the server for that JSP. Or the JSP itself?
 
Miri Yusifli
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Miri,
Can you share the URL that is sent to the server for that JSP. Or the JSP itself?



I found that , when i send null value for inputs i see this error , it works perfectly when i send real integer value .
these variables is declared as int in my class, you can see them above


 
Ranch Hand
Posts: 69
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Miri Yusifli wrote:

I found that , when i send null value for inputs i see this error , it works perfectly when i send real integer value .
these variables is declared as int in my class, you can see them above



I believe a member variable declared as 'int' cannot be null.  Change it to Integer (don't forget to update your getter/setter methods). 
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!