Servlet Mapping question.
Hi everybody :)
This is my first post here, so I apologize in advance for anything I probably will do :p
I need help with a servlet mapping issue. I've created a servlet. The URL to the servlet looks like this:
http://localhost/ec/mail?id=523/8PysK6GF034
"mail" is the servlet, with takes one parameter, id, which I retrieve later with:
req.getParameter("id")
That works fine, no problems there. The slash "523/8PysK6GF034" is just a commodity I have to help me "split" the above string later, inside my servlet.
Again, all this work. However, I want to part the above like this:
http://localhost/ec/mail/523/8PysK6GF034
That means, I want to, somehow, get the string being parsed after the servlet. (523/8PysK6GF034)
How can I do that? My web.xml looks like this (the relevant parts):
Code:
<servlet>
<servlet-name>WebMailServlet</servlet-name>
<servlet-class>xx.xx.xx.xx.WebMailServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>WebMailServlet</servlet-name>
<url-pattern>/mail/*</url-pattern>
</servlet-mapping>
The server I use is JBoss, if that is worthy mentioning :)
Thanks in advance.
X