Webservices and Netbeans


I want to deploy a webservice developed in Netbeans to tomcat server. The Webservice has been developed locally tested and works fine with the client. But i need to know how I can deploy the local webservice to tomact on our server.

Thanks in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


You can create a .war file from your project which is like .jar but for web.
Then you put that on your Tomcat server. Then it should just work :)
More here:

Seems that NetBeans is creating the .war file for you.
You can find it in the dist directory in your project.


C'mon, is actually in the NetBeans menu
Help->Help Contents, then select Web Services from left tree.
Then go to "Deploying and Testing Web Services" :)

intergy-eeAuthor Commented:
Hi adrpo,

Thanks lot for your references and ideas.

I have gone through the articles specified above. I did find the WAR file in dist package i then copied it to a folder and tomcat server and added an entry in the server.xml file to point to the new folder.

this is my server.xml entry

 <Host appBase="pdfweb" debug="0" name="pdfweb" unpackWARs="true">

        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="common" prefix="pdfweb_access_log." suffix=".txt"/>

        <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="pdfweb_log." suffix=".txt" timestamp="true"/>
        <Context debug="0" docBase="pdfweb" path="" reloadable="true"/>

I have the war file in pdfweb folder.

I have a index.html file in the same place where the WAR file is and i am able to view the index.html with the URL like http://pdfweb:8080/pdfweb/index.html

Locally i am able to test my webservice with URL like this http://localhost:8080/PDFWeb/PDFServiceService?tester

But in the server when i try to access the tester using the URL like

I get a HTTP 404 error resource not found. What I am doing wrong?

Please help. Thanks.
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.


Look into your Tomcat logs: tomcat/logs/
and see what errors you get there and let me know.

BTW, what version of Tomcat are you using?


Hi again,

If you are on Tomcat 5.x, have a look here:

In general you put your .war in your tomcat/webapps
directory and it should just work. You have changed that to "pdfweb",
but that should work too. Have a look into pdfweb to see if Tomcat has exploded your archive. At leas if it did, then you know you're on the way.
Also: "Be sure to restart Tomcat after installing or updating your application."

It seems you can also: "Use the Tomcat 5 "Manager" web application to deploy and undeploy web applications".
See what you get if you go to: http://pdfweb:8080/manager

Make sure you have all the adidtional Jars your application may need in
tomcat/shared/lib (otherwise you'll get ClassNotFound Exceptions).



More on the Tomcat Manager here:

If you want Tomcat to just pick your application on the fly (without need of a stop/startup procedure), then add to your <Host ... autoDeploy="true">


intergy-eeAuthor Commented:
Hi Adrpo,

Thanks for your instant response. I got held up in some other project so couldn't reply back.

We have tomcat 4.1 running on our server. I followed your advise and deployed the webservice to the webapps folder. I want to know how we can invoke the wsdl of the webservice as I mentioned above

locally when the webservice is deployed in the IDE i am able to access the WSDL like


But how can i do the same thing from tomcat webserver.

When I try to access the class of the webservice i get an error saying it is not a servlet which makes sense as it is a webservice.

Any ideas. I hope i have explained the problem clearly. if not sorry.
intergy-eeAuthor Commented:
I fixed my problem by using the below
article which expalins clearly about deploying to Tomacat

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

Cool to hear you fixed it. Sorry I couldn't help more!

Closed, 125 points refunded.
Community Support Moderator
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.