Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i change the suffix of struts

 
Kobe Luo
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
the struts1.x's suffix is "*.do",
and the struts 2.x is "*.action",
how can i change it for another?
thank you!
 
Kobe Luo
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why there is no separate framework forums,like struts, hibernate, spring??
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First: There is a struts forum!
Second: you can change the extension in a property file (for struts2 have a look at http://struts.apache.org/2.x/docs/strutsproperties.html ).
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kobe BryantLuo:
why there is no separate framework forums,like struts, hibernate, spring??

You didn't look very hard, did you?
 
Kobe Luo
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh, i see the struts forum!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kobe,
Hibernate and Spring are in more general forums. Hibernate is in "Object Relational Mapping" up top. Spring is in "Application Frameworks" right below this one.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And on to your original question. The following is the part of your web.xml that maps actions to the struts servlet. The *.do is arbitrary. You can change it to anything you want. I've never used *.do there as I don't want my URLs to be implementation specific.

 
Kobe Luo
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
And on to your original question. The following is the part of your web.xml that maps actions to the struts servlet. The *.do is arbitrary. You can change it to anything you want. I've never used *.do there as I don't want my URLs to be implementation specific.



it seems that the <html:form> tag will add ".do" to the action by default,
how can i change the default?
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kobe BryantLuo:


it seems that the <html:form> tag will add ".do" to the action by default,
how can i change the default?


You haven't browsed the first link that I provided you already, did you?
 
Kobe Luo
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Joachim Rohde:


You haven't browsed the first link that I provided you already, did you?


Now, I am still use the struts 1.x,so the link is not suitable for me now.
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question have been answered in this thread anyway already. So last try: http://struts.apache.org/1.3.8/userGuide/configuration.html#dd_config_mapping
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic