D
David Lee Lambert
What is the purpose of javax.servlet.http.HttpServlet.getPathInfo()?
I wanted to build a servlet that stores a virtual filesystem in
an SQL database. It just has one class, which overrides doGet and doPut
so far. Here's what WEB-INF/web.xml looks like:
<web-app>
<servlet>
<servlet-name>fs</servlet-name>
<description>Allows GET, PUT, DELETE of virtual files</description>
<servlet-class>com.lmert.slet.FileDB</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>fs</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
If I request
http://some.host:8080/slet/x/y/z/a.txt
with a web-browser, I need the relative path "x/y/z/a.txt". However,
getPathInfo() always returns an empty string. Is there some other method
I should use instead? Is it possible to do this?
I wanted to build a servlet that stores a virtual filesystem in
an SQL database. It just has one class, which overrides doGet and doPut
so far. Here's what WEB-INF/web.xml looks like:
<web-app>
<servlet>
<servlet-name>fs</servlet-name>
<description>Allows GET, PUT, DELETE of virtual files</description>
<servlet-class>com.lmert.slet.FileDB</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>fs</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
If I request
http://some.host:8080/slet/x/y/z/a.txt
with a web-browser, I need the relative path "x/y/z/a.txt". However,
getPathInfo() always returns an empty string. Is there some other method
I should use instead? Is it possible to do this?