473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

a little bit of confusion in servlet concept.

dmjpro
2,476 2GB
actually i working with JSP.
but yesterday a friend was working with servlet.
there a Q. arised.

that is ...... if my servlet class extends HttpServlet class then if i leave all doGet and doPost method implementation then the service can't be resolved if the request comes with POST or GET method?

i m telling this because these methods r protected.
plz clear my conception.

kind regards.
dmjpro.
May 13 '07 #1
2 1511
JosAH
11,448 Expert 8TB
actually i working with JSP.
but yesterday a friend was working with servlet.
there a Q. arised.

that is ...... if my servlet class extends HttpServlet class then if i leave all doGet and doPost method implementation then the service can't be resolved if the request comes with POST or GET method?

i m telling this because these methods r protected.
plz clear my conception.

kind regards.
dmjpro.
If I remember correctly your class extends from an abstract class HttpServlet
and your class must implement the doGet and doPost methods, otherwise
your class will be abstract too. The parent class takes care of all the bookkeeping
and your class just implements those methods. The doPost method can delegate
to the doPost method or vice versa.

kind regards,

Jos
May 13 '07 #2
dmjpro
2,476 2GB
thanx for ur reply ......

as far as u mention that those emthods r abstract .. then i start the see the HttpServlet.
yes u r right .... that the class is abstract.
but those two methds r not abstract.
i m telling u from 1.3 specification.

kind regards.
dmjpro.
May 14 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Hai Tran | last post by:
Any help is appreciated. Installed Tomcat 4.1 and Mysql on a WinXP. I've manage to get Tomcat up and was able to view my first application ( myhome ) simple home page. Tomcat was installed under...
2
by: Rose Girl | last post by:
Hi Need some help on javascript. I need to know how to call a servlet from a javascript function. web-inf (jboss) path for servlet is: com.purpleace.ripple.admin.contacts.servlet.AdminReport...
3
by: ppcguy | last post by:
i've got a progress bar that tracks a process running on a server (java servlet). i know i can refresh the page and update the status...but this results in the page being redrawn everytime. ...
7
by: bylum | last post by:
Servlet SQLException Communication link failure java howto i can't connect jsp and database(mysql). This is the exception: exception org.apache.jasper.JasperException:...
6
by: santhoskumara | last post by:
How to request to servlet from Ajax and also I got the DOM object in the servlet through Business Logic. Now how will i pass the DOM object from serlvet to Clientside. Where in the client Side i am...
14
by: ramadeviirrigireddy | last post by:
Hi All, I have the following code for form and servlet. when the form is submitted the servlet will print the values passed by the form. i'm not getting the servlet o/p when i submit the...
6
by: Sushmita | last post by:
hi all, I have wrriten code for a small web application. From my JSP page i am not able to call the servlet.. its throwing an exception. "javax.servlet.ServletException: Wrapper cannot find...
1
by: shiyamala | last post by:
Hi i am shiyam, i am having some problem in java, i am basic java programmer. i have to write one program is writing the data into textfile name "newfile.txt" from one servlet and read it from...
9
by: mjahabarsadiq | last post by:
Hi I have created a servlet that is to be started at the server startup. And I got it. In that I have created a object of another class and set it as a session attribute. What I am trying is...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.