Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet @WebServlet url patterns

 
malik ge
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In the following code:



The @WebServlet annotation defines two urlPatterns signIn and signUp.
I want to know, is it possible if:

  • signIn is passed then servlet should perform some task,
  • and if signUp is passed then some other functionality is performed, other than sign-In's functionality

  •  
    Ulf Dittmer
    Rancher
    Posts: 42967
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You could call HttpServletRequest.getRequestURL to determine which URL was actually called.
     
    malik ge
    Ranch Hand
    Posts: 69
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic