• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to understand the URL mapping in Struts

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<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.....
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
reply
    Bookmark Topic Watch Topic
  • New Topic