Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Servlet to respond many requests

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Servlet to respond many requests

    Hi, I'm developing a servlet to be the interface between the web app and the server. I want to have one single servlet with all necessary methods to respond to the client requests instead of creating different servlet for different requests. The servlet will be a command interpreter, is there anyway I can add information about the request in the POST or GET method? Thank you


  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: Servlet to respond many requests

    Welcome to Java Programming Forums CarlosM87.
    In servlet you simply gets request and response through HttpServlet. Read through it and you will find the answer. Or if i misunderstood, explain it in detail, what you exactly want.

  3. #3
    Member
    Join Date
    Dec 2011
    Posts
    50
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: Servlet to respond many requests

    Quote Originally Posted by CarlosM87 View Post
    Hi, I'm developing a servlet to be the interface between the web app and the server. I want to have one single servlet with all necessary methods to respond to the client requests instead of creating different servlet for different requests. The servlet will be a command interpreter, is there anyway I can add information about the request in the POST or GET method? Thank you
    Looks like you want to have a kind of "front controller" servlet that intercepts all incoming requests from client. If so, you need to configure the mapping for your servlet properly, the URL pattern for all requests is /*

  4. #4
    Junior Member
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Servlet to respond many requests

    You can also take a look at this tutorial it might be useful

Similar Threads

  1. Get Box to Respond to JScrollPane
    By bgroenks96 in forum AWT / Java Swing
    Replies: 1
    Last Post: September 25th, 2011, 10:18 AM
  2. collecting information/moving from servlet to servlet
    By CBird in forum What's Wrong With My Code?
    Replies: 0
    Last Post: March 1st, 2011, 07:04 PM
  3. [SOLVED] Platform game player doesn't respond to keyboard
    By jesamjasam in forum What's Wrong With My Code?
    Replies: 4
    Last Post: December 12th, 2010, 09:44 AM
  4. Servlet or Jsp?
    By flangofas in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: December 8th, 2010, 11:54 AM
  5. Tutorial requests
    By Json in forum The Cafe
    Replies: 9
    Last Post: August 1st, 2009, 03:14 PM