| Author |
Message |
|
|
Post subject: How to integrate struts in J2EE project
Posted: Oct 15, 2004 - 11:36 AM
|
|
Registered Member


Joined: Oct 14, 2004
Posts: 2
|
|
Hi,
I have a newbe question regarding the use of stuts in a J2EE project.
I have developed a small struts project as described in the tutorials, and have a nice struts-config.xml and a generated web.xml. It works fine.
Now I want to add the capability of using ejb references to a simple accompanying EJB project. My question is how can I add the ejb-ref elements to the default struts web.xml? I would like to use XDoclet, but if I use the deploymentdescriptor Xdoclet subtask, it replaces the action servlet info in the default struts web.xml.
This question would also apply to other changes I might want to make to web.xml, for example adding servlet mapping elements etc.
any help appreciated,
Liam
ps I'm using eclipse 3.0.1, jboss 3.2.5, myeclipse 3.8.2 |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 15, 2004 - 11:56 PM
|
|
Moderator


Joined: May 06, 2003
Posts: 6760
|
|
Liam,
Great question. Unfortunately, I'm not an expert on using Struts with XDoclet and EJB generation, so I snooped around and found a tutorial on DevX that looks like it will be helpful to you. It's available here:
http://www.devx.com/Java/Article/21065/0/page/1
It's not based on MyEclipse, but it is Eclipse based so it should be similar to what you need. Can anyone else provide any insights? |
_________________ --Scott
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Oct 16, 2004 - 07:18 PM
|
|
Registered Member


Joined: Oct 14, 2004
Posts: 2
|
|
Hi,
thanks thanks for the pointer Scott. The article implies the solution of splitting the web.xml generated by MyEclipse-struts into a merge directory prior to running xdoclet tasks. This works well.
I image I could use the 'strutsconfigxml' XDoclet subtask instead, but when I run it I get an error:
BUILD FAILED: C:\eclipse3-0-1\eclipse\workspace\TrainingTest\xdoclet-build.xml:32: Can't create a strutsconfigxml element under webdoclet. Make sure the jar file containing the corresponding subtask class is on the classpath specified in the <taskdef> that defined {2}.
I've seen this error mentioned once or twice but never found a solution... I have the xdoclet jar on the build path for the project. Anyone have an idea?
thanks,
Liam |
|
|
| |
|
|
|
 |
|
|
| |