Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Servlets
Simple servlet. Error says "HTTP method GET is not supported by this URL"
michael tall
Ranch Hand
Posts: 61
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
When I enter
http://1.1.1.1:8080/TableLoop
I see the error message. I included servlet-mapping in web.xml and placed the
servlet
under default application
Servlet code is given below.
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class TableLoop extends HttpServlet { protected void doGet(HttpServletRequest req4, HttpServletResponse res4) throws ServletException, IOException { res4.setContentType("text/html"); PrintWriter out = res4.getWriter(); out.println("<html><head><title>Table with 25 rows</title></head><body>"); int col=0; for(int i7=1; i7<=25; i7++) { out.println("<tr><td>Row"+i7+",Col"+(++col)+"</td><td>Row"+i7+",Col"+(++col)+"</td><td>Row"+i7+",Col"+(++col)+"</td></tr>"); col=0; } out.println("</body></html>"); out.close(); } }
Ben Souther
Sheriff
Posts: 13411
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
It looks like you have implemented doGet so GET should be supported.
Can you post your servlet declaration and url-mappings from your web.xml file?
Java API
J2EE API
Servlet Spec
JSP Spec
How to ask a question...
Simple Servlet Examples
jsonf
michael tall
Ranch Hand
Posts: 61
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You're correct. I made a mistake in web.xml entry. It is corrected now. Thanks.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Storing resultset into arraylist
whilst fooling around with SessionId and cookies...
Servlet becomming slow
Servlet becomming slow
Connection Pooling
More...