You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pierre Thibault <pt...@yahoo.ca> on 2005/06/13 06:01:24 UTC
Confused
Hello,
I am new to Struts and I am a bit confused. I would like some light.
I have just installed Tomcat 5 for Java WSDP. Do I need this version
to make Struts development or can I use the regular 5.5 version too?
I have installed both.
I also saw that Struts is listed in the Ex-Jakarta section of the
Jakarta web site. Is this mean that Struts is now replaced by Tapestry?
Also, I would like to know how can I have access to J2EE? I am on Mac
OS 10.4 and as I know I need JBoss to have access to J2EE. I have
installed JBoss on my machine too. But I don't understand how can I
use Tomcat, JBoss and Struts altogether. Can you help me?
Regards.
---------------------
Pierre
Re: [To sum it up] Re: Confused
Posted by Andre Van Klaveren <ny...@gmail.com>.
I wouldn't even say that Struts and EJBs are on the opposite end of a
scale. They can't be compared because they aren't the same thing
(apples and oranges comes to mind).
Struts is a Java implementation of the MVC (Model 2) pattern. It
gives you a nice framework with a controller and a bunch or really
nice utilities (tags, validation, etc) to build with. It's meant to
be used on your presentation tier. I know, some developers choose to
put business logic and persistence code in their Action classes but in
my opinion that's not a good practice since you're coupling your model
to your presentation tier. Change your presentation framework
(Struts) and you now have to change all of your business classes.
EJB provides a framework for your model (business) and persistence
tiers. It gives you nice things like declarative transaction and
security management, object pooling, etc. It's usually too complex
for anything other than large enterprise applications though. I'd go
with Hibernate or IBATIS.
On 6/15/05, Daniel Perry <d....@netcase.co.uk> wrote:
> I took one look at ejbs and ran a mile.
>
> Struts and EJBs seem to be at the opposite end of a scale.
> Struts is sensible, nice to work with, efficient, and generally everything
> that EJBs arnt!
>
> I personally use it with OJB (made that decision 1.5 yrs ago). Hibernate
> seems to be more popular, and if i was to make the decision now, i'd
> probably go with hibernate. I'm sticking with OJB in the systems i have
> because refactoring the whole lot would be such a chore, and OJB works fine
> (though i have had to deal with some really annoying intermittent bugs).
>
> Daniel.
>
> > -----Original Message-----
> > From: Pierre Thibault [mailto:pthibault33@yahoo.ca]
> > Sent: 14 June 2005 19:53
> > To: Struts Users Mailing List
> > Subject: Re: [To sum it up] Re: Confused
> >
> >
> > Le 14 juin 2005 à 04:59, Stéphane Zuckerman a écrit :
> >
> > Hello Stéphane,
> >
> > >
> > ...
> > > Anyway, this little presentation is far from complete, and I
> > > suggest you read some doc about J2EE applications before going
> > > further with struts (java.sun.com is a good start).
> > >
> > > --
> > > Stéphane Zuckerman
> > ....
> >
> > The difficulty here is that there is lot of pieces that go together.
> > There is a lot of choices and it is not clear for the new developers
> > which path to fellow. I decided to buy the book 'Struts The Complete
> > Reference' and I am only at the beginning. I'll continue to dig on
> > the subject. I'm happy to see that there is community here for
> > helping me. I fell already a lot more comfortable.
> >
> > Thank you.
> >
> > A+
> >
> > ----------------------
> > Pierre
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Virtually,
Andre Van Klaveren
Architect III, SCP
Enterprise Transformation Services
Unisys Corporation
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
[OT] Re: [To sum it up] Re: Confused / one little question
Posted by Radu Badita <ra...@gmail.com>.
In fact, this thread was really about Struts and how it integrates with
various J2EE technologies and containers, not "about Hibernate/EJBs"...
Anyway: I don't think that anyone says that Hibernate is better than EJB
period; but maybe easier and more flexible to use than Entity EJBs CMP,
which is just one of the species of EJBs.
It is true that EJB (entity beans or not) has these nice features you
mention: declarative transactions and declarative security (multi
threading and "synchronization" are in fact container and coding
related, and also "implemented" by Hibernate), BUT the question is: are
those really necessary?
Hibernate also supports CMT, and, if facaded by SessionBeans (which is a
very common scenario and is also recomanded for entity beans), you have
declarative transactions.
Security is a very nice feature, but in scenarios where you only use a
web application to access the EJBs, and the EJB container is "isolated"
from the rest of the world, it becomes either useless, or a burdain to
use... And I think that this scenario is the most common (especially
among the subscribers to a list such as "Struts Users" :)
It's also true that in some scenarios the Entity Beans might be more
effective than using an ORM such as Hibernate, but these scenarios are
extremely rare...
Also, even Hibernate is sometimes regarded as being too complicated and
too hard to learn by some (it was a very hot discussion about this on
this list), and in even simpler scenarios are preferred even simpler
tools such as iBatis, ORB, etc..
In my opinion, a discussion with a subject such as "EJB is better than
Hibernate" is completely meaningless... The right tool always depends on
the job, and the right tool for every imaginable job was just not yet
invented. :-)
The answer to your last question IMHO is: yes, you can, if the web layer
is the only thing accessing your beans. But the subject of security is
much more complicated in a real-life application than "what framework do
I need to best implement it?"
You're welcome,
Radu
Marco Mistroni wrote:
>Hello all,
> Sorry to get into this thread so late...
>Since I have same view as Daniel about Hibernate/EJBs, I wanted to ask
>one additional
>question, since right now I am using EJBs..
>
>Now, EJBs have some features that let the coder concentrate only
>On the business logic instead of dealing, for example, with
>synchronization, transaction, threading ..and security, meaning that you
>can declare in the
>Deployment descriptor which roles are allowed to do what with your EJBs.
>
>Where can you do the same with ORM tools? In the web layer?
>Or do you have to have a security framework in place (such as acegi)?
>
>Thanx and regards
> Marco
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: [To sum it up] Re: Confused / one little question
Posted by Marco Mistroni <mm...@waersystems.com>.
Hello all,
Sorry to get into this thread so late...
Since I have same view as Daniel about Hibernate/EJBs, I wanted to ask
one additional
question, since right now I am using EJBs..
Now, EJBs have some features that let the coder concentrate only
On the business logic instead of dealing, for example, with
synchronization, transaction, threading ..and security, meaning that you
can declare in the
Deployment descriptor which roles are allowed to do what with your EJBs.
Where can you do the same with ORM tools? In the web layer?
Or do you have to have a security framework in place (such as acegi)?
Thanx and regards
Marco
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: [To sum it up] Re: Confused
Posted by Daniel Perry <d....@netcase.co.uk>.
I took one look at ejbs and ran a mile.
Struts and EJBs seem to be at the opposite end of a scale.
Struts is sensible, nice to work with, efficient, and generally everything
that EJBs arnt!
I personally use it with OJB (made that decision 1.5 yrs ago). Hibernate
seems to be more popular, and if i was to make the decision now, i'd
probably go with hibernate. I'm sticking with OJB in the systems i have
because refactoring the whole lot would be such a chore, and OJB works fine
(though i have had to deal with some really annoying intermittent bugs).
Daniel.
> -----Original Message-----
> From: Pierre Thibault [mailto:pthibault33@yahoo.ca]
> Sent: 14 June 2005 19:53
> To: Struts Users Mailing List
> Subject: Re: [To sum it up] Re: Confused
>
>
> Le 14 juin 2005 à 04:59, Stéphane Zuckerman a écrit :
>
> Hello Stéphane,
>
> >
> ...
> > Anyway, this little presentation is far from complete, and I
> > suggest you read some doc about J2EE applications before going
> > further with struts (java.sun.com is a good start).
> >
> > --
> > Stéphane Zuckerman
> ....
>
> The difficulty here is that there is lot of pieces that go together.
> There is a lot of choices and it is not clear for the new developers
> which path to fellow. I decided to buy the book 'Struts The Complete
> Reference' and I am only at the beginning. I'll continue to dig on
> the subject. I'm happy to see that there is community here for
> helping me. I fell already a lot more comfortable.
>
> Thank you.
>
> A+
>
> ----------------------
> Pierre
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [To sum it up] Re: Confused
Posted by Pierre Thibault <pt...@yahoo.ca>.
Le 14 juin 2005 à 04:59, Stéphane Zuckerman a écrit :
Hello Stéphane,
>
...
> Anyway, this little presentation is far from complete, and I
> suggest you read some doc about J2EE applications before going
> further with struts (java.sun.com is a good start).
>
> --
> Stéphane Zuckerman
....
The difficulty here is that there is lot of pieces that go together.
There is a lot of choices and it is not clear for the new developers
which path to fellow. I decided to buy the book 'Struts The Complete
Reference' and I am only at the beginning. I'll continue to dig on
the subject. I'm happy to see that there is community here for
helping me. I fell already a lot more comfortable.
Thank you.
A+
----------------------
Pierre
[To sum it up] Re: Confused
Posted by Stéphane Zuckerman <st...@gmail.com>.
Hello Pierre,
Struts is "just" too big a project to stay among its siblings under the
Jakarta general project, which is why it is "on its own".
> I have just installed Tomcat 5 for Java WSDP. Do I need this version to
> make Struts development or can I use the regular 5.5 version too? I
> have installed both.
If you use JBoss, there is an embedded version of Tomcat 5 with it. You
don't need anything else.
> Also, I would like to know how can I have access to J2EE? I am on Mac
> OS 10.4 and as I know I need JBoss to have access to J2EE.
If you use JBoss to do your work, that's fine : it works great. Just
don't forget to put your webapp in the
$JBOSS_DIR/server/{default,minimal,all}/deploy directory (either as a
WAR archive, or as a yourapp.war directory).
For instance, I use the "default" server, that leads to a path like :
C:\jboss\jboss-4.0.1\server\default\deploy\my_webapp.war
(I am currently using MS-Windows for my devs)
> I have
> installed JBoss on my machine too. But I don't understand how can I use
> Tomcat, JBoss and Struts altogether. Can you help me?
Struts is a collection of Java packages that you must embed with your
web application.
You must understand how a J2EE application is built (which is a bit
beyond the scope of this mailing list, I think). Basically, this means
your application will have the following structure :
+---WEB-INF
| +-----classes
| +-----lib
|
|
+---META-INF
WEB-INF contains configuration files (such as web.xml, and
struts-config.xml), definition files (for instance the taglib definition
files), etc. ; its subdirectories contain the various compiled classes
(the "classes" directory ;-) ), and the various packages you hava to
embed with your application (for instance, struts.jar ;-) ).
Anyway, this little presentation is far from complete, and I suggest you
read some doc about J2EE applications before going further with struts
(java.sun.com is a good start).
--
Stéphane Zuckerman
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Confused
Posted by Pierre Thibault <pt...@yahoo.ca>.
Ok, I'll use Hibernate.
Le 14 juin 2005 à 04:31, delbd a écrit :
> I could add, use EJBs only if you really can't do without them :D
> Things like Hibernate are more flexible an easy to use than EJB 2.0
> and i
> heard the EJB 3.0 specs will be very similar to what current
> ORMapping like
> Hibernate does!
>
A+
----------------------
Pierre
Re: Confused
Posted by delbd <de...@oma.be>.
I could add, use EJBs only if you really can't do without them :D
Things like Hibernate are more flexible an easy to use than EJB 2.0 and i
heard the EJB 3.0 specs will be very similar to what current ORMapping like
Hibernate does!
Le Mardi 14 Juin 2005 10:08, Daniel Perry a écrit :
> No,
> J2EE is a NOT EJBS!
> J2EE is a collection of technologies, including servlets, jsp, EJBs, etc.
>
> Tomcat hosts various parts of J2EE - servlets, jsps, etc, but it is not a
> full J2EE container - it doesnt host EJBs. But you can use servlets, JSP
> and taglibs without using EJBs. I do. I've never used an EJB.
>
> Daniel.
>
> > -----Original Message-----
> > From: Pierre Thibault [mailto:pthibault33@yahoo.ca]
> > Sent: 14 June 2005 04:51
> > To: Struts Users Mailing List
> > Subject: Re: Confused
> >
> >
> > Yes, I want to use Beans.
> >
> > Do you mean that I can use servlets, JSP and taglibs without J2EE?
> >
> > Le 13 juin 2005 à 16:42, Dave Newton a écrit :
> > > Pierre Thibault wrote:
> > >> There are talking about Tomcat but not about JBoss. I'll continue
> > >> with JBoss because I want to access J2EE.
> > >
> > > I think you might be confused about what "J2EE" is. If you need
> > > EJBs, then yeah, JBoss would be one way to go. If you don't,
> > > there's a lot of other parts of J2EE, like servlets, JSP, taglibs,
> > > etc..
> > >
> > > Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
--
David Delbecq
Royal Meteorological Institute of Belgium
-
Is there life after /sbin/halt -p?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Confused
Posted by Daniel Perry <d....@netcase.co.uk>.
No,
J2EE is a NOT EJBS!
J2EE is a collection of technologies, including servlets, jsp, EJBs, etc.
Tomcat hosts various parts of J2EE - servlets, jsps, etc, but it is not a
full J2EE container - it doesnt host EJBs. But you can use servlets, JSP and
taglibs without using EJBs. I do. I've never used an EJB.
Daniel.
> -----Original Message-----
> From: Pierre Thibault [mailto:pthibault33@yahoo.ca]
> Sent: 14 June 2005 04:51
> To: Struts Users Mailing List
> Subject: Re: Confused
>
>
> Yes, I want to use Beans.
>
> Do you mean that I can use servlets, JSP and taglibs without J2EE?
>
> Le 13 juin 2005 à 16:42, Dave Newton a écrit :
>
> > Pierre Thibault wrote:
> >
> >
> >> There are talking about Tomcat but not about JBoss. I'll continue
> >> with JBoss because I want to access J2EE.
> >>
> >
> > I think you might be confused about what "J2EE" is. If you need
> > EJBs, then yeah, JBoss would be one way to go. If you don't,
> > there's a lot of other parts of J2EE, like servlets, JSP, taglibs,
> > etc..
> >
> > Dave
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Confused
Posted by Pierre Thibault <pt...@yahoo.ca>.
Yes, I want to use Beans.
Do you mean that I can use servlets, JSP and taglibs without J2EE?
Le 13 juin 2005 à 16:42, Dave Newton a écrit :
> Pierre Thibault wrote:
>
>
>> There are talking about Tomcat but not about JBoss. I'll continue
>> with JBoss because I want to access J2EE.
>>
>
> I think you might be confused about what "J2EE" is. If you need
> EJBs, then yeah, JBoss would be one way to go. If you don't,
> there's a lot of other parts of J2EE, like servlets, JSP, taglibs,
> etc..
>
> Dave
>
Re: Confused
Posted by Dave Newton <ne...@pingsite.com>.
Pierre Thibault wrote:
> There are talking about Tomcat but not about JBoss. I'll continue
> with JBoss because I want to access J2EE.
I think you might be confused about what "J2EE" is. If you need EJBs,
then yeah, JBoss would be one way to go. If you don't, there's a lot of
other parts of J2EE, like servlets, JSP, taglibs, etc..
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Confused
Posted by Pierre Thibault <pt...@yahoo.ca>.
Le 13 juin 2005 à 08:00, glenn.deschenes@cmhc.ca a écrit :
> Pierre,
>
> Struts is no longer a sub-project of Jakarta but is now on its own.
> Struts is alive and kicking: http://struts.apache.org/
>
>
Happy to hear that.
> You can look at section 6 [this might help]:
> http://struts.apache.org/userGuide/index.html
>
> As for JBoss... the last time I used it (can't exactly remember
> when)...
> JBoss has a version that is already bundled with Tomcat.
There are talking about Tomcat but not about JBoss. I'll continue
with JBoss because I want to access J2EE.
>
> As for the Mac, I cannot really help.
>
> HTH,
> Glenn
>
>
Thank you Glenn.
Re: Confused
Posted by gl...@cmhc.ca.
Pierre,
Struts is no longer a sub-project of Jakarta but is now on its own.
Struts is alive and kicking: http://struts.apache.org/
You can look at section 6 [this might help]:
http://struts.apache.org/userGuide/index.html
As for JBoss... the last time I used it (can't exactly remember when)...
JBoss has a version that is already bundled with Tomcat.
As for the Mac, I cannot really help.
HTH,
Glenn
Pierre Thibault <pt...@yahoo.ca>
13/06/2005 12:01 AM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
user@struts.apache.org
cc
Subject
Confused
Hello,
I am new to Struts and I am a bit confused. I would like some light.
I have just installed Tomcat 5 for Java WSDP. Do I need this version
to make Struts development or can I use the regular 5.5 version too?
I have installed both.
I also saw that Struts is listed in the Ex-Jakarta section of the
Jakarta web site. Is this mean that Struts is now replaced by Tapestry?
Also, I would like to know how can I have access to J2EE? I am on Mac
OS 10.4 and as I know I need JBoss to have access to J2EE. I have
installed JBoss on my machine too. But I don't understand how can I
use Tomcat, JBoss and Struts altogether. Can you help me?
Regards.
---------------------
Pierre