Hi Gurus please help,
I am
testing my BGColor.jsp I am using
tomcat standalone to test it. Test.html is retrieving BGColor.jsp.but the error is the BGcolor.jsp is with a background Green instead of yellow which I expected this is my first
JSP program please tell me what is wrong.I am enclosing both the file codes.
Thank you in advance
kotamraju
*******test.html****************
html>
<head>
<title>Testing</title>
</head>
<body BGCOLOR = "yellow" >
<L1>current time: <%= new java.util.Date() %>
<a href="C:\jakarta-tomcat-3.2.3\webapps\ROOT\WEB-INF\classes\BGColor.jsp">bring it</a>
</body>
</html>
*********BGColor.jsp file*************
<html>
<head>
<title>Kotamraju's Home Page -- I Code Therefore I am!</title>
</head>
<%
String bgColor=request.getParameter("bgColor");
boolean hasExplicitColor;
if(bgColor !=null) {
hasExplicitColor=true;
}else {
hasExplicitColor=false;
bgColor="white";
}
%>
<body BGCOLOR= "<%= bgColor %> " >
<%
if(hasExplicitColor) {
out.Println("you have explicit color of"+ bgColor):
}else
{out.println("no explicit so white is used");
}
%>
</body>