This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I want to learn one out of Spring and EJB. I have a little idea about EJB 3.0. I am about to complete my graduation and take a job.
Please suggest me which one should I choose and why?
Spring is the new "in thing" and for sure it has many many advantages... but EJB is a very widely accepted industry standard, So i would say knowlegde of EJB is a must.
I would say learn both of them atleast on highlevel and then select what you want to dig deep into.
I'll give the opposite advice; I've been doing enterprise Java development for almost ten years and have used EJBs exactly once (this might finally change with EJB 3.0). Spring is hardly the "new" thing; it's been around for years, and in my experience is far more prevalent than EJB.
chandan kumar mitwaa
Ranch Hand
Joined: Jul 01, 2009
Posts: 49
posted
0
Hello Vivek,
Can I manage learning both hand to hand, at same time?? Or I should complete one and go for the other?? How long is it going to take, if I learn them separately?
However I want to add both to my basket, may be in some near future. For the time being I want to have an experience level which helps me deliver considerable output to my company. Please reply in these contexts.
Chandan,
Once you know one, the other is going to be much faster to learn. The first will give you concepts such as transactions/security/remoting/etc.
I would say learn Spring first. EJB has been "borrowing" features from Spring so more translates that way.
In my option, Spring should be more useful from my experience, but I didn't said you can give up EJB. Since EJB has a lot of concept to implement Java Enterprise. This concept can let us easier to understand spring or another framework.
Actually, I learned EJB before touch Spring. However, I never implement EJB in my job , but I always use its concept.
For me as well it was same as Billy, Learnt EJB first, implemented 1 solution in it, and havnt used it for last 2.5 yrs (Have been using spring instead) There is certainly a lot of buzz around EJB 3.0, So i would say get an overview of both and then decide for yourself.
chandan kumar mitwaa
Ranch Hand
Joined: Jul 01, 2009
Posts: 49
posted
0
I read EJB 3.0 only a little, from O' Reilly's Enterprise JavaBeans 3.0, 1.5 years back and I found it quite interesting. I am not sure of Spring. I browse through companies and most of them require Spring. I have seen only a few asking for EJB. Is it that Spring is widely used?
saurabh soni
Greenhorn
Joined: Feb 09, 2010
Posts: 1
posted
0
Q1) i m using spring MVC and using mozilla 3.5 to access my page .
i m having a problem that it is returning me null values when filling my jsp page .
my code is.........
my command class is TravelReview.java
code-> public class travelReview{
public String getClientName() {
return clientName;
}
public void setClientName(String clientName) {
this.clientName = clientName;
}
}
name of my command class in controller is
public LiftServiceTravelReviewFormController()
{
setCommandClass(TravelReview.class);
setCommandName("TRAVELFORM");
}
my jsp page is ->
<form method="post" commandName="TRAVELFORM">
<table>
<spring:hasBindErrors name="TRAVELFORM">
<tr>
<td><b>There were following number of errors
${errors.errorCount} </b>
</td>
</tr>
<tr>
<td>
<ul>
<c:forEach var="errorobj" items="${errorlist.allErrors}">
<li><font color="red"><spring:message
code="${errorobj.code}" text="${errorobj}" /></font>
</li>
</c:forEach>
</ul>
</td>
</tr>
</spring:hasBindErrors>
</table>
<table border="0" width="100%" cellpadding="0" cellspacing="0"
bgcolor="A0A0A0">
<tr>
<td></td>
</tr>
<tr>
<td width="100%" align="center"><font face="bold" size="4"
color="#000000"><b>This feedback is for the agent giving description about the client!!</b></font>
</td>
</tr>
</table>
<table>
<tr>
<td></td>
</tr>
</table>
<table width="50%" border="1" bgcolor="A0A0A0">
<tr>
<td height="70%" align="left"></td>
</tr>
<tr>
<spring:bind path="TRAVELFORM.clientName">
<td align="center"><%=TravelReviewProviderConstant.CLIENT_NAME%></td>
<td align="left">
<input type="text" name="clientName" size="15"
value="${status.value }" width="10"></input>
</td>
<c:if test="${status.error}">
<p>There was an error while entering ClientName</p>
</c:if>
</spring:bind>
</tr>
Q2) also im using checkbox in my JSP page and want to return boolean value while submitting form in database but due to mozilla 3.5 it is returning null value so give me some idea to validate checkbox and it is not mandatory that client should click the checkbox while validating .
note that it does not return a null pointer exception in both the cases....
please do reply as soon as possible........
chandan kumar mitwaa
Ranch Hand
Joined: Jul 01, 2009
Posts: 49
posted
0
Hi saurabh soni,
Welcome to JavaRanch!!
You should start a new topic for your query. Please note that your post is not relevant or related to this topic. Also any code must be enclosed between [ code][\ code] so that it will be automatically formatted for better readability.
I have not gone through all the responses since the topics have gone off track. One reason for us to stick with Spring was a biggie - It works on Tomcat
I'll also go for spring. I've been working for 6 years now, almost all projects I've worked on in three companies used spring, and never needed to touch EJB