I have a question on if this is possible to do. I have a profile servlet that has 2 url patterns, /profile and /profile/* .So in my project I have a user use GET /profile to get all of the profiles in JSON. Each profile has a favorite team string. Also, I use /profile/* for getting specific profiles by doing /profile/2 for example. Then I have profileFavTeam servlet that I want to get all of the data of the profile favorite team. So I need to get the profiles ID so I want the url to be /profile/"ID"/favteam and this would return the teams statistics.
So for example, If the profile ID is 2 has a favorite team called Liverpool, and I entered /profile/2/favteam, it would show the stats of Liverpool
So would my url for profileFavTeam in web.xml look like this because i want the user to put a number in ID /profile/*/favteam ?
But would this work if I have /profile/* url pattern in my profile servlet?