MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
liammullan
Post subject: How to integrate struts in J2EE project  PostPosted: Oct 15, 2004 - 11:36 AM
Registered Member
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
 
 View user's profile Send private message  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Oct 15, 2004 - 11:56 PM
Moderator
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
liammullan
Post subject:   PostPosted: Oct 16, 2004 - 07:18 PM
Registered Member
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
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits