This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes calendar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

calendar

archana tiwari
Ranch Hand

Joined: Mar 15, 2012
Posts: 44
this code is not working ......calendar is not being displayed .please help me to get output.

pdf1.java


package LoginExample;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;


public class pdf1 extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
PrintWriter out = res.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />");
out.println("<script language=\"javaScript\" type=\"text/javascript\" src=\"C:/../calendar.js\"></script>");
out.println("<link href=\"C:/../calendar.css\" rel=\"stylesheet\" type=\"text/css\">");
out.println("<style type=\"text/css\">");
out.println("</style>");
out.println("<title>pdf </title>");
out.println("</head>");
out.println("<body>");
out.println("<p><br><br><center><b>");
out.println("<html ><head>");
out.println("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />");
out.println("<style type=\"text/css\">");
out.println("</style>");
out.println("</head>");
out.println("<body>");
out.println("</b><br><form action=\"D\" method=\"GET\" name=\"upform\">");
out.println("<table width=\"1269\" border=\"1\">");
out.println("<tr>");
out.println(" <td colspan=\"5\">");
out.println("Type:");
out.println("<select name=\"select\">");
out.println("<option>Local</option>");
out.println("<option>l2</option>");
out.println("</select>");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td width=\"270\">");
out.println("Div");
out.println("<input type=\"text\" name=\"textfield\" />");
out.println("</td>");
out.println("<td width=\"242\">");
out.println("Sec");
out.println("<input type=\"text\" name=\"textfield2\" />");
out.println("</td>");
out.println("<td width=\"268\"><form id=\"form4\" name=\"form4\" method=\"post\" action=\"\">");
out.println("Ind");
out.println("<input type=\"text\" name=\"textfield3\" />");
out.println("</td>");
out.println("<td width=\"200\">");
out.println("Year");
out.println("<input type=\"text\" name=\"textfield4\" />");
out.println("</td>");
out.println("<td width=\"255\">");
out.println ("SrNo.");
out.println("<input type=\"text\" name=\"textfield5\" />");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td>");
out.println(" Date");
out.println("<input type=\"text\" value=\"\" readonly=\"true\" name=\"indent1\" id=\"fromDate\">");
out.println("<a href=\"#\" onClick=\"setYears(2000, 2018); showCalender(this, 'indent1');\">");
out.println("<img src=\"C:/../calender.png\">");
out.println("</a>");
out.println(" <table id=\"calenderTable\">");
out.println("<tbody id=\"calenderTableHead\">");
out.println("<tr>");
out.println("<td colspan=\"4\" align=\"center\">");
out.println("<select onChange=\"showCalenderBody(createCalender(document.getElementById('selectYear').value,this.selectedIndex, false));\" id=\"selectMonth\">");
out.println("<option value=\"0\">Jan</option>");
out.println("<option value=\"1\">Feb</option>");
out.println("<option value=\"2\">Mar</option>");
out.println("<option value=\"3\">Apr</option>");
out.println("<option value=\"4\">May</option>");
out.println("<option value=\"5\">Jun</option>");
out.println("<option value=\"6\">Jul</option>");
out.println("<option value=\"7\">Aug</option>");
out.println("<option value=\"8\">Sep</option>");
out.println("<option value=\"9\">Oct</option>");
out.println("<option value=\"10\">Nov</option>");
out.println("<option value=\"11\">Dec</option>");
out.println("</select>");
out.println("</td>");
out.println("<td colspan=\"2\" align=\"center\">");
out.println("<select onChange=\"showCalenderBody(createCalender(this.value, document.getElementById('selectMonth').selectedIndex, false));\" id=\"selectYear\">");
out.println("</select>");
out.println("</td>");
out.println(" <td align=\"center\">");
out.println("<a href=\"#\" onClick=\"closeCalender();\">");
out.println("<font color=\"#003333\" size=\"+1\">X</font></a>");
out.println("</td>");
out.println("</tr>");
out.println("</tbody>");
out.println("<tbody id=\"calenderTableDays\">");
out.println("<tr style=\"\">");
out.println("<td>Sun</td><td>Mon</td><td>Tue</td><td>Wed</td><td>Thu</td><td>Fri</td><td>Sat</td>");
out.println("</tr>");
out.println("</tbody>");
out.println("<tbody id=\"calender\"></tbody>");
out.println(" </table>");
out.println("</td>");
out.println("<td colspan=\"4\">");
out.println("Del");
out.println("<input type=\"text\" name=\"textfield7\" />");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td colspan=\"5\">");
out.println("Item :");
out.println("<input type=\"text\" name=\"textfield8\" />");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td colspan=\"5\">");
out.println("Bud:");
out.println("<select name=\"select3\">");
out.println("<option> 1 </option>");
out.println("<option> 2 </option>");
out.println("<option> 3 </option>");
out.println("</select>");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td colspan=\"5\">");
out.println("Alter:");
out.println("<select name=\"select4\">");
out.println("<option> 5 </option>");
out.println("<option> 6 </option>");
out.println("</select>");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td colspan=\"5\">");
out.println("Ind:");
out.println("<input type=\"text\" name=\"textfield9\" />");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td>");
out.println("Alte.:");
out.println("<input type=\"text\" name=\"textfield10\" />");
out.println("</td>");
out.println("<td colspan=\"4\">");
out.println(" Ref.:");
out.println("<select name=\"select7\">");
out.println("<option> ab </option>");
out.println("<option> bc </option>");
out.println("</select>");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td>");
out.println("Appr");
out.println ("<select name=\"select5\">");
out.println("<option> a </option>");
out.println("<option> b </option>");
out.println("</select>");
out.println("</td>");
out.println("<td colspan=\"4\">");
out.println("Delg.: <br />");
out.println("<input type=\"text\" name=\"textfield11\" />");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td height=\"40\" colspan=\"5\"><form id=\"form18\" name=\"form18\" method=\"post\" action=\"\">");
out.println("Budr:");
out.println("<select name=\"select6\">");
out.println("<option> a </option>");
out.println("<option> b </option>");
out.println("</select>");
out.println("</td>");
out.println("</tr>");
out.println("<tr>")
out.println("<td><p>Item:");
out.println("<input name=\"radiobutton1\" type=\"radio\" value=\"c\" />");
out.println("C</p>");
out.println(" <input name=\"radiobutton1\" type=\"radio\" value=\"NonC\" />");
out.println("NonC");
out.println("<p>");
out.println("<input name=\"radiobutton1\" type=\"radio\" value=\"C\" />");
out.println("Cal");
out.println("</p>");
out.println("</td>");
out.println("<td>Pri:");
out.println ("<input name=\"radiobutton2\" type=\"radio\" value=\"Urg\" />");
out.println("Urg");
out.println("<input name=\"radiobutton2\" type=\"radio\" value=\"Most Ur\" />");
out.println("Most Ur");
out.println("<br>");
out.println("<input name=\"radiobutton2\" type=\"radio\" value=\"Nor\" />");
out.println("Nor");
out.println("</td>");
out.println ("<td colspan=\"3\">Prop:");
out.println("<input name=\"radiobutton3\" type=\"radio\" value=\"Yes\" />");
out.println ("Yes");
out.println("<input name=\"radiobutton3\" type=\"radio\" value=\"No\" />");
out.println("No");
out.println ("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td colspan=\"5\"><table width=\"1167\" border=\"1\">");
out.println("<tr>");
out.println("<td width=\"46\"><span class=\"style4\">Sr No. </span></td>");
out.println("<td width=\"148\"><span class=\"style4\">Descr </span></td>");
out.println("<td width=\"149\"><span class=\"style4\">Qua</span></td>");
out.println("<td width=\"44\"><span class=\"style4\">Unit</span></td>");
out.println("<td width=\"490\"><span class=\"style4\">Est[");
out.println("<input name=\"radiobutton\" type=\"radio\" value=\"bas\" />");
out.println("Bas </span>");
out.println("<input name=\"radiobutton\" type=\"radio\" value=\"tax\" />");
out.println("Tax</label>]");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td>1.</td>");
out.println("<td>");
out.println("<input type=\"text\" name=\"textfield14\" />");
out.println("</td>");
out.println("<td>");
out.println("<input type=\"text\" name=\"textfield17\" />");
out.println("</td>");
out.println("<td>");
out.println("<select name=\"select11\">");
out.println("</select>");
out.println("</td>");
out.println("<td>");
out.println("<input type=\"text\" name=\"textfield20\" />");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td>2.</td>");
out.println("<td>");
out.println("<input type=\"text\" name=\"textfield14\" />");
out.println("</td>");
out.println("<td>");
out.println("<input type=\"text\" name=\"textfield17\" />");
out.println("</td>");
out.println("<td>");
out.println("<select name=\"select11\">");
out.println("</select>");
out.println("</td>");
out.println("<td>");
out.println("<input type=\"text\" name=\"textfield20\" />");
out.println("</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td>3.</td>");
out.println("<td>");
out.println("<input type=\"text\" name=\"textfield14\" />");
out.println("</td>");
out.println("<td>");
out.println("<input type=\"text\" name=\"textfield17\" />");
out.println("</td>");
out.println("<td>");
out.println("<select name=\"select11\">");
out.println("</select>");
out.println("</td>");
out.println("<td>");
out.println("<input type=\"text\" name=\"textfield20\" />");
out.println("</td>");
out.println("</tr>");
out.println("</table></td>");
out.println("</tr>");
out.println("</table>");
out.println("<br>");
out.println("<input type=\"submit\" name=\"Submit\" value=\"Submit\" >");
out.println("</form>");
out.println("</body>");
out.println("</html>");
}
}
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41127
    
  45
Please UseCodeTags, and let's continue the discussion in the existing topic where you have answers already.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calendar
 
Similar Threads
How to make the previous day from today to be readonly?
How to display only single radio button checked by using onload method?
how to get form parameters data to a servlet?
Error comes whilke compiling the jsp page
calendar