aspose file tools*
The moose likes Websphere and the fly likes Servlet Mapping in WebSphere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Servlet Mapping in WebSphere" Watch "Servlet Mapping in WebSphere" New topic
Author

Servlet Mapping in WebSphere

Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
I have a web application deployed in WAS 4.0. One of the URLs I want to map to a servlet has an '&' in it (for ex: /<web.app." target="_blank">http://<servername>/<web.app.> name>/file&name). I know it's not a standard URL, but I landed up in this mess and I have to dig my way out of it. I've been trying to add a <servlet-mapping> entry in web.xml so that this URL with an & in it would be mapped to a servlet. I tried the following:

WebSphere did not like that, and the app.server returned an error when I tried to start it. (I tried this in Resin, and it did NOT give me any error, but that's beside the point). I then tried escaping the &, like below:

The App.Server started up fine this time, but when hit the URL /<web.app.Name>/file&name," target="_blank">http://<servername>/<web.app.Name>/file&name, the request is NOT mapped to the servlet. Can any one give me a clue about why the above mapping doesn't work? Thanks in advance.
-Bala.
Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Sorry about my post above. (Misuse of the Code tags, I think).
I have a web application deployed in WAS 4.0. One of the URLs I want to map to a servlet has an '&' in it (for ex: /<web.app." target="_blank">http://<servername>/<web.app.> name>/file&name. I know it's not a standard URL, but I landed up in this mess and I have to dig my way out of if). I've been trying to add a <servlet-mapping> entry in web.xml so that this URL with an & in it would be mapped to a servlet. I tried the following:
<servlet-mapping id="ServletMapping_5">
<servlet-name>TestServlet</servlet-name>
<url-pattern>/file&name</url-pattern>
</servlet-mapping>
WebSphere did not like that, and the app.server returned an error when I tried to start it. (I tried this in Resin, and it did NOT give me any error, but that's beside the point). I then tried escaping the &, like below:

<servlet-mapping id="ServletMapping_5">
<servlet-name>TestServlet</servlet-name>
<url-pattern>/file&name</url-pattern>
</servlet-mapping>
The App.Server started up fine this time, but when hit the URL /<web.app.Name>/file&name," target="_blank">http://<servername>/<web.app.Name>/file&name, the request is NOT mapped to the servlet. Can any one give me a clue about why the above mapping doesn't work? Thanks in advance.
-Bala.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Mapping in WebSphere