- This topic has 4 replies, 3 voices, and was last updated 19 years, 3 months ago by paulspencer.
-
AuthorPosts
-
paulspencerMemberMyEclipse 4.0M2
I noticed that the source code generated by the Struts flow editor include XDoclet tags.1) It appears that struts tags are not used when XDoclet is run. Is this correct?
2) Can XDoclet in MyEclispe be configured to generate struts-config.xml? If yes, how does this impact the Struts flow editor?
3) The generated struts tags appears to be incorrect. A colon is used in place of the period.
Tag Generated: @struts:action-forward name="success" path="/form/success.jsp" Tag Expected: @struts.action-forward name="success" path="/form/success.jsp"
Riyad KallaMember1) What files are the struts-tag directives being generated into? Please give an example.
2) Yes, please see here: http://xdoclet.sourceforge.net/xdoclet/ant/xdoclet/modules/apache/struts/StrutsConfigXmlSubTask.html
3) Bug, got it. Thank you for reporting this.
paulspencerMember1) The Struts tags are placed in the Action generated by the Struts flow editor.
2) My question is configuration related. Specifically which “Standard Configuration” in the Configuration table of Project’s MyEclipse-Doclet Property should be used to generate struts-config.xml.? If a “Standard Configuration” is not used, what are the steps need to add a configuration to generate struts-config.xml?
GregMemberPaul,
I will try to explain the situation to the best of my knowledge.
@paulspencer wrote:
1) The Struts tags are placed in the Action generated by the Struts flow editor.
Back in the early days of MyEclipse, we didn’t have a Visual Struts Designer, so users had to manually edit the struts-config.xml file. So to speed up development, we integrated advanced XDoclet support into MyEclipse that allowed developers to build the struts-config.xml file automatically. So, we had to generate the appropriate XDoclet tags inside each action class. Now, our users can use the Struts Visual Designer exclusively to manage, add, and delete elements in their struts application. It is no longer necessary to use XDoclet and putting the xdoclet tags in the source for actions does no harm since XDoclet isn’t used.
@paulspencer wrote:
2) My question is configuration related. Specifically which “Standard Configuration” in the Configuration table of Project’s MyEclipse-Doclet Property should be used to generate struts-config.xml.? If a “Standard Configuration” is not used, what are the steps need to add a configuration to generate struts-config.xml?
In order to build the struts-config.xml file using XDoclet that are some additional steps that you have to take as well as adding struts xdoclet tags to your classes. That is you have to add a standard Web XDoclet configuration in the MyEclipse-XDoclet property page of your webproject. Then under the standard <webdoclet> task you have to add a strutsconfig subtask. This subtask instructs XDoclet to look through your source files and generate a struts-config.xml file based on the xdoclet tags it finds.
This process is very similar to what we have outlined in our EJB Dev tutorial regarding xdoclet:
http://www.myeclipseide.com/images/tutorials/quickstarts/firstejb/The reason we don’t have a tutorial for doing this for a struts application is that now most users use the Visual Struts Designer to configure their struts-config.xml files.
I hope this clears things up.
paulspencerMemberGreg,
Thanks for the history lesson and the link. Both where very helpful.FYI: All of the questions in this thread have been answered to my satisfaction.
Paul Spencer
-
AuthorPosts