Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

I cannot get parameters as class from JSP

 
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
Posts: 40035
809
Eclipse IDE VI Editor Java
  • 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: 92
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).  
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic