Łukasz Suchecki

Ranch Hand
+ Follow
since Aug 04, 2009
Merit badge: grant badges
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Łukasz Suchecki

I think thats possible ;)
I think that new EJB standard is very easy to learn. Read for example Manning EJB 3 in Action, after that MZ_SCBCD_5_Study_Guide, do few mock exams (enthruware test is quite cheap and I think it's better then whizzlabs).
I'm J2EE guy. I like heavy stuff like EJB, MDB, ....
But it would be nice to get to know Spring 3.0 (there is a vision of a new project in 3.0 in next few months).
How should I start learning ? Is there any book, good tutorial itd (with examples ...)? (I've found only spring-framework-reference.pdf) but I dont know if its good way to start. Any hints ?
12 years ago
I've just passed SCWCD exam - 91% ;)
I was learning about 1,5 month (2h/day), I've read Head First 2 times, read spec (yes, I've skipped parts of it, I've concentrated on custom tags), made all enthruware tests (2 times), made JavaRanch free mock exam.
My thoughts about exam:
- I was very afraid of custom tags questions, but I've managed to get 100% from them (questions were very easy for me)
- I thought that easiest part was Structure and Deployment and Security, but I've got 87% and 83% (I cant figure out what I've checked wrong - I'm 100% sure that I've made everything ok...)

I dont know it's legal to say anything about questions, but I have one clue - read spec about JSTL core library. The book not covers all tags needed for exam (I had 2 tags not covered in book on my exam - one of them I've noticed in spec, second one I've skipped and it was big mistake)
12 years ago
Everyone STOP
We have to separate things:
- SPEC: spec says that the only non-idempotent method is POST. Thats all. We have to learn it and thats the only right answer on the exam.
- LIVE: as we know live is different that spec sometimes ;) you can make:
* POST that is not changing anything (so we can call it then idempotent)
* GET thats changing data (what is the problem to update DB in doGet method ???)
Please read posts ;)
The question was not only about Servlets&JSP but also about EJB and RMI
You can read about these topics in Mastering EJB 3.0 and in EJB 3.0 in Action (I'm not sure is in Action there is a chapter about RMI). There is no book from Head First series (actually there is but based on EJB2.0 spec)
And in near future there should be new books about EJB3.1 and JSP2.0 ;)
But I think that somebody made big mistake choosing time of releasing this book.
In few months time there will be SCWCD based on EE6.0 spec which means for example JSP 2.0...... So the author and releasing company wouldnt get much profit from this book.....
you can e.getRootCause().getMessage()
BUT you have to have message in thrown exception.
So you can make:

and in error page you can get exception.getRootCause().getMessage()
it's easy to check API:
getInitParameter(java.lang.String name)

So we can assume that in spec they said 2 times the same - because initParameters = servlet configuration.
development time - yes
translation time - yes
but improves performance - NO (it's the same)

And yes - I've noticed that I've choosen bad sentence to quote - I was speaking about performance not development time (sorry for mistake)

Arnaud Cogoluegnes wrote:as far as I know, there's no implementation (at least in GA) of the Web profile, so it means that if you want to go with EJB 3.1 Lite, you'll need a full-blown Java EE 6 server. With Spring 3.0 (or less), you can go anywhere :-)

Maybe in now not, but in 3-4 monts (now we have design stage, so all paper work, client acceptance, changes, acceptance, ... will take at least 2-3 monts) there should be for example glassfish implementation.
And I think that in near future my question will be very important - which technology is better, and why (what are adventages, disadventages, which one has better support in developers tools, which is simplier [yes - its very important because easier technology usually means quicker = cheaper development phase]). And second part - which is simplier for creating automative tests (EJB 3.1 will be suported by openejb)
12 years ago

tushar parab wrote:I have installed Tomcat on my pc(Windows XP) but when i try to compile the servlet code it gives me an error that package javax.servlet does not exists. the packagesI have imported are
import javax.Servlet.*;
import javax.Servlet.http.*;
I have set 4 environment variables
CATALINA_HOME :C:\Program Files\Apache Software Foundation\Tomcat 6.0
CLASSPATH :C:\Program Files\Apache Software Foundation\Tomcat
JAVA_HOME :C:\Program Files\Java\Jdk1.6.0_18
PATH :C:\Program Files\Java\Jdk1.6.0_18\bin;
Location of the sourcecode file HelloWorldServlet is as follows
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Examples\WEB-INF\classes
Can anyone suggest the solution. Thank you

Make a quick review of your knowledge of SCJP ;)
If you want to include jar file into classpath you need to add jar file into classpath and not the directory in which you have it.
so you should add servlet-api.jar (with it access path) to the classpath
I'm "child of heavy technology EJB" and almost everything I was doing in my previous company was based on EJB and MQ.
Now I’ve changed company, they have instead of few big “flag” webapps lots of small and light ones (and the new ones are now in first stages of analyses so we can choose technology) . It’s clear that old approach is wrong – there is no need for heavy EJB.
So there are 2 choices:
- develop apps in Spring 3.0
- choose known for me solution (EJB 3.x) but choose EJB Light spec (that one which doesn’t need app container, which cuts of from EJB2.0 standard, that has no MDB, …)

And here is my question: What are advantages of new Spring 3.0 over new EJB Light spec (3.1) and why I should choose something new (Spring) and not use something that I know, I’ve worked it for years.
12 years ago

Chinmaya Chowdary wrote:Hi, James.

I want to know if there is any improvement in terms of performance... like ... is the page loading time less if we use tags instead of the scriptlets/expressions ?

I think(I am guessing), scriptlets/expressions are faster over standard actions. If we compare the benefits of standard actions over scriptlets, this is minor issue.

Why do you think so ?
The only thing that is quicker is maybe translation phase

it's translated into:

So there is almost no difference with doing it by scriptlet by our own
you should ALWAYS use <c:url>, <c:redirect>, response.encodeURL, response.encodeRedirectURL.
And the container should take care about determining if you have cookies enabled (and encoding is not needed), or you have cookies disabled and it needs to keep encoding urls
and remember - you can have JSP body-content only for Classic Tags (tag files and Simple tags CAN'T have JSP body-content)