James E Baker wrote:I don't think there's anything in the code you posted causing any delays. It's pretty basic stuff... just random number generating and switch statements. The only part that I am not sure about is the "doc.add" statement but I doubt that would do it either.
You could always //comment out parts (or all) of the code and then test your servlet.
Ulf Dittmer wrote:You can't have a method inside of a method.
I'm not quite sure what you're trying to do, but I very much doubt that it's going to work. The Servlet API has no provisions for a "paint" method.
public void paint(Graphics g)
doc.add(new Paragraph(quadcurve));
Maneesh Godbole wrote:Check out the API for the Graphics class. You will find methods to draw lines and text (hint)
1) Subclass a container like JPanel
Bear Bibeault wrote:You learned wrongly.
You use the mapping. Forget about the silly "/servlets" string.
Bear Bibeault wrote:I do not see the string "/servlet" in your mappings. Why is it in your URL if it's not in your mapping?
Bear Bibeault wrote:Not surprising as that doesn't match any of your servlet mappings. You can't just make up URLs. You have to use the actual mappings.
HTTP Status 404 - /servlet/EasyQnServlet
--------------------------------------------------------------------------------
type Status report
message /servlet/EasyQnServlet
description The requested resource (/servlet/EasyQnServlet) is not available.
Bear Bibeault wrote:What happened when you tried to hit the servlets directly using the browser?
Bear Bibeault wrote:What happened when you tried to hit the servlets directly using the browser?