I have a web app, which is already deployed and running on tomcat. I need to create a web service, which will receive three parameters, and update two tables in the db. Can i create the service class within the same application and publish it as web service, or should i create brand new web application for this purpose alone?
Both your options are valid options.
If the web service will be coupled to the web application, then containing the web service in the web application may be a good idea.
If the web service is more independent, then publishing it in a web application of its own may be a better idea.
There are other factors as well, for instance if the web service is likely to change and the web application is not or vice versa, then separating the two may also be a good idea.