HttpServletRequest.getPathInfo( ) ???


Web tier: servlets, JSP, Web frameworks: HttpServletRequest.getPathInfo( ) ???

  1. HttpServletRequest.getPathInfo( ) ??? (2 messages)

    What kind of information should HttpServletRequest.getPathInfo() method return?

    From document, it says this method returns a string containing any additional path information following the servlet path but precedes the query string. If the request is the request from a HTML (using POST), what is the additional path information (if servlet is at path/servlet)

    Di He
  2. HttpServletRequest.getPathInfo( ) ???[ Go to top ]

    Take the following URL as an example.

    Servlet Name: myServlet

    getPathInfo() would return /extra/path/info

    This is effectively part of the URL which is nice from a hyperlink perspective, so it isn't affected by GET or POST.

    That's one of the nice things about it actually. Often this is used to provide the action argument for a command pattern system.



  3. HttpServletRequest.getPathInfo( ) ???[ Go to top ]

    Thank you, Tony.
    Still have a question: in the

    by my understanding, the servlet name is actionservlet and login is the extra path information. How can I get this login? I mean, is should I write HTML action part as
    ..../actionservlet/login ? And, login is a file name or something else?