This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I have a dislike/like section for a website i am making for a website but am having problems.  RSS feed

 
Ramos Garcia
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A user can dislike/like a topic. However I have to submit buttons in my jsp file, the issue is that when a user presses like/dislike it should print out on the consile line. It does that perfectly but it prints out both when it should only print out either like or dislike.

My JSP code:

Servlet Code:


and my java class code:



Thanks in advanced

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, yeah:
This code prints the value regardless of the value of the parameter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!