Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is the difference between GenericServlet and HttpServlet?

GenericServlet httpservlet
0
Posted

What is the difference between GenericServlet and HttpServlet?

0

GenericServlet is for servlets that might not use HTTP, like for instance FTP servlets. Of course, it turns out that there’s no such thing as FTP servlets, but they were trying to plan for future growth when they designed the spec. Maybe some day there will be another subclass, but for now always use HttpServlet. In short GenericServlet is protocol independent, whereas HttpServlet is protocol dependent Generic servlet is used for small data transfer whereas HttpServlet is used for huge data transfer.

0

GenericServlet is for servlets that might not use HTTP, like for instance FTP servlets. Of course, it turns out that there’s no such thing as FTP servlets, but they were trying to plan for future growth when they designed the spec. Maybe some day there will be another subclass, but for now, always use HttpServlet.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.