aspose file tools*
The moose likes Struts and the fly likes how can i change the suffix of struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how can i change the suffix of struts" Watch "how can i change the suffix of struts" New topic
Author

how can i change the suffix of struts

Kobe Luo
Greenhorn

Joined: Nov 30, 2007
Posts: 21
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

Joined: Nov 30, 2007
Posts: 21
why there is no separate framework forums,like struts, hibernate, spring??
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

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

Joined: Jan 10, 2002
Posts: 61433
    
  67

Originally posted by Kobe BryantLuo:
why there is no separate framework forums,like struts, hibernate, spring??

You didn't look very hard, did you?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kobe Luo
Greenhorn

Joined: Nov 30, 2007
Posts: 21
oh, i see the struts forum!
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

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

Joined: Nov 30, 2007
Posts: 21
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

Joined: Nov 27, 2006
Posts: 423

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

Joined: Nov 30, 2007
Posts: 21
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

Joined: Nov 27, 2006
Posts: 423

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can i change the suffix of struts