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.

Do I really need to build a complete webapp just to add a simple Helloworld servlet to the server?

0
Posted

Do I really need to build a complete webapp just to add a simple Helloworld servlet to the server?

0

Location: http://www.jguru.com/faq/view.jsp?EID=445934 Created: Jun 26, 2001 Modified: 2001-07-18 10:31:12.417 Author: Sachin Patil (http://www.jguru.com/guru/viewbio.jsp?EID=280417) Question originally posed by James Richardson (http://www.jguru.com/guru/viewbio.jsp?EID=255219 Not at all. You can put a single servlet anywhere on your hard disk but you will have to configure your path in server.xml and servlet alias in web.xml as usual. Let me be a bit more descriptive. If I have my HelloWorld servlet under c:/foo/hello directory, i will set my path in server.xml like And then in web.xml : hello HelloWorld that tomcat considers while starting and you can start your servlet. [However, it’s not that big a deal to make a webapp. Just make a directory (say, /home/alex/foo), give it a WEB-INF/web.xml file, and put the servlet classes in /home/alex/foo/WEB-INF/classes, then add

Related Questions

What is your question?

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

Experts123