vendredi 20 février 2015

Tv Series Genre with the use of NetBeans

I'm creating a project in NetBeans and I seem to get into trouble with launching it, when I choose a genre it just shows null and does not shows what I advice to watch. This is the problem: http://localhost:8084/TvSeriesProject/tvseriesgenre.do?genre+=Action. I have to delete the + sign before genre to correct it, but how would I correct it permanently? This is a part of my code:



out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");


out.println("<title>Servlet TvSeriesServlet</title>");
out.println("<h1>TV Series Genre Selection </h1>");
String g = request.getParameter("genre");
out.println("Chosen genre is: " + g + "<br>");
// My first genre - Action
if ("Action".equals(g)) {
out.println("<br>Try watching: Arrow");
out.println("<br>Try watching: Flash");
out.println("<br>Try watching: Smallville <br>");
}

Aucun commentaire:

Enregistrer un commentaire