• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error

 
nu nin
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good afternoon, i've an issue with a webpage that i have created but not 100% the other half was created it by a bro, so he add things that i really dunno why, i tried everything to solve this and i could't.

It's a webpage that makes a query a brings results from a data base. It doesn't work, when it brings the results & it seems to have a validation that it the error showed when query is done.


I Run the webapp from netbeans i do not introduce all the file into appache i had set up to netbeans to be easier.

There's a properties file that i didn't add because i know that it's ok.


rectabla.jsp




recetas.jsp




Java files

Servlet

recetas.java



gets & sets

rec.java




Mapping


 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65533
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As always, my first suggestion is to move all Java code out of the JSPs. Java code in JSPs has been an obsolete and discredited practice since 2002. That's 12 years ago.

All your Java code should be in Java classes that can be unit tested to find errors. Do not even try to write the JSP until your Java code tests properly and produces correct results.

Trying to find errors in Java code in JSPs is a lesson in frustration and is just one of the many reasons that this practice has been frowned upon for over a dozen years. The lack of testability is just one more.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65533
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nu nin wrote:It doesn't work, when it brings the results & it seems to have a validation that it the error showed when query is done.

This doesn't give us much information to help you. Please read ItDoesntWorkIsUseless and also UseAMeaningfulSubjectLine.

You did well by provided us with code with good formatting and in code tags, but we need more info on the nature of the error than you've given.

You'll also likely get better error reporting once you refactor your code to perform all operations in Java classes rather than in the JSPs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!