Results 1 to 1 of 1
  1. #1
    mr_anderson is offline Member
    Join Date
    May 2010
    Rep Power

    Default how to run servlet from a real website

    I wrote a servlet and it is working just fine on my tomcat (localhost), I registered for a website with a shared tomcat but I donot know how to run my servlets, I have the following in my website


    I read the FAQ of the service provider and I found the following:
    Servlet Set Up

    To setup servlet, you need to configure servlet into the file web.xml which needs to be placed in WEB-INF directory inside your public_html folder.

    www root directory or webapps:/public_html
    Classes directory located WEB-INF/Classes/
    There you will need to upload your Java class file.

    Our default url-mapping for servlet is: /servlet/* or /servlets/*
    To check servlet in your browser:
    I understood most of it but what will I write in the <url-pattern> assuming my servlet is called timeTest, will it be like this ?

    Right now this is my web.xml file ( I took it from netbeans and changed the url-pattern section).

    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
    I am doing it right or I am getting wrong somewhere ?
    Any reviews, comments are highly appreciated.

    Best Regards.
    Last edited by mr_anderson; 12-01-2010 at 03:23 AM.

Similar Threads

  1. Using a JMenu as a real option
    By nfh in forum AWT / Swing
    Replies: 3
    Last Post: 11-09-2009, 06:04 PM
  2. JList A real confusion.
    By darshak_patel in forum AWT / Swing
    Replies: 8
    Last Post: 02-07-2009, 01:17 AM
  3. Need help real bad on 2D array please !
    By TrungTran in forum New To Java
    Replies: 2
    Last Post: 11-23-2008, 05:04 AM
  4. How to download website (Get all link in website)
    By finalmem in forum Advanced Java
    Replies: 0
    Last Post: 11-12-2008, 09:43 AM
  5. real world java
    By Zosden in forum Forum Lobby
    Replies: 6
    Last Post: 06-25-2008, 05:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts