aspose file tools*
The moose likes Struts and the fly likes Unable to understand the URL mapping in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unable to understand the URL mapping in Struts" Watch "Unable to understand the URL mapping in Struts" New topic
Author

Unable to understand the URL mapping in Struts

Diptish Kumar
Greenhorn

Joined: Aug 09, 2010
Posts: 1
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

If we change it to

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.dom</url-pattern>
</servlet-mapping>

Then also it works and the path ends with dom.....So how come the url pattern is getting changed , is it controlled by the framework, in normal serlvets ...it happens other way around like in address bar we write http://localhost:8080/myweb/data.dom... it checks for the url pattern and ask for the respective servlet , if I am not wrong.....
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I don't really understand what you're asking.

There's a Struts servlet. It's mapped to whatever URL you give it. If there's a request that matches the Struts action servlet, Struts will dispatch the request to the appropriate action.

(All this is Struts 1, of course.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to understand the URL mapping in Struts