• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java web application development in netbeans Error- required: String[], found: String  RSS feed

 
saheed omotola
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need someone to help me out. I am working on a web application but got stuck along the line. After writing the servlet, jsp and java beans codes on seperate pages, I have been having problem with integrating them. The error message I am getting is: required: String[], found: String. Below are my codes


Java web application development in netbeans Error- required: String[], found: String



Servlet code



Java bean code



output.jsp code



index.jsp code



 
Emil Jennings
Ranch Hand
Posts: 75
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your servlet is calling:



With a String parameter. Your Java bean code has:



Since void setProgLangList(String[] parameterValues) is set to default access modifier I'm guessing that the servlet can only call public void setProgLangList(String ProgLangList) and since request.getParameterValues(...) returns a String array, you receive the exception. I'm not a serlvet programmer, but it makes sense to me.
 
saheed omotola
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What changes do I make to the code then
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saheed omotola wrote:What changes do I make to the code then

I'm afraid we're NotACodeMill here. Emil has explained your problem; now it's time for you to ShowSomeEffort, and try something yourself.

If, after that, you still have problems, feel free to come back and tell us about it, and we'll be glad to help.

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!