i'm a newbie so help me out here in simple program
java code:
import java.io.* ;
import javax.servlet.* ;
import javax.servlet.http.* ;
public class color extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/html");
PrintWriter pw = res.getWriter();
String color = req.getParameter("color") ;
pw.println("The color is" + color) ;
pw.println("<html>") ;
pw.println("<body bgcolor = "color">") ;
pw.println("</body>") ;
pw.println("</html>") ;
}
}
i want to display the color in background along with the text "the color is" whenever appropriate color
is selected but whenever i compile this program i get 1 error as follows
' ) ' is expected at line pw.println("<body bgcolor = "color">") ;
where am i supposed to put that bracket?
thanks in advance