• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP where to start?

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really don't know if this is the right place for my topic but I am posting it. I really need help in it.

I am trying to learn few technologies. I am currently in JSP. I had planned to go like after core java JSP, servlets, struts, hibernate. I am currently in JSP.

Now I want to know if Custom tags is an important topic to cover or not? & If I can have good links or tutorials to it that will help. Do I really need to go in depth of everything in JSP or I can move forward to servlets & struts???

thanks

Irtiza

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Irtiza Ali wrote:Now I want to know if Custom tags is an important topic to cover or not?


Absolutely. Extending the capabilities of JSP with custom tags and other elements such as EL functions is a important part of writing modern JSP pages.

But... before you dive off into those subjects you should have a very firm grasp of basic JSP concepts such as scoped variables, the Expression Language (EL), and the JSTL (JSP Standard Tag Library).

Be sure to avoid antiquated and discredited scriptlets.

or I can move forward to servlets


You are doing it in the wrong order. Before learning JSP you should have a good grasp of Servlets. Without Servlets to serve as a JSP controller, you have no hope of writing good and modern JSP pages.

struts?


Avoid frameworks such as Struts until you have a firm grasp of all Servlet and JSP concepts.
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok.

I am sorry but I have a book of JSP from O'reilly in which servlets is after JSP.

anyways thanks. will be then going through the servlets first. Also Can anyone suggest me any books on servlets??

Irtiza
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's OK to learn them side-by-side, or soon after one another. Just be aware that JSPs can't stand alone without servlets.

The usual problem with learning JSP before servlets is that it usually trains you to put Java code into your JSP which is a very, very, very (and did I say very) bad practice.
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok

& both technologies are important right? I mean what I have browsed is that JSp is basically for the front end development. so what is actually done by servlets???& when ppl say this so do they mean front end development as what the web designers do because they also develop the front end.

Irtiza
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Irtiza Ali wrote:& when ppl say this


Please use real words when posting to the forums. Abbreviations such as "ppl" in place of "people" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

both technologies are important right?


Absolutely. Both are an imperative part of modern web applications that work together.

I mean what I have browsed is that JSp is basically for the front end development. so what is actually done by servlets?


JSPs provide the "view", servlets provide processing and control. Almost every request should go to a servlet (called a "controller") first that does the work of the request, and then forwards to a JSP to provide the view.

so do they mean front end development as what the web designers do because they also develop the front end.


"Front end development" can mean just about anything. It could mean only client-side development (HTML and JavaScript), or it could mean only the views, or it could mean anything above the business layer (which is how I usually use the term).
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here are a few articles that may be of help:

The Secret Life of JSPs

The Front Man
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok

I did understand the secret life of JSP's but couldn't understand the other one.

Also as in the other article your saying that we should not use java code in between the jsp code....then how will be connect through database & secondly why on earth every JSP book & every tutorial teaches us to use embed java through scriplet???

Thanks
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Irtiza Ali wrote:I did understand the secret life of JSP's but couldn't understand the other one.


What parts are you having problems with? The article outlines the reasons that modern best practices are the way that they are, and while a deep understanding may not be necessary at this point (you can always review it later), it's rather important to understand the premise.

Also as in the other article your saying that we should not use java code in between the jsp code....then how will be connect through database


That is the purpose of the Java classes that make up the rest of the application. The concept of Separation of Conerns says that everything should be in its proper place. DB code has no place anywhere near the UI, let alone in the view.

secondly why on earth every JSP book & every tutorial teaches us to use embed java through scriplet?


Because they're old. If you find older books on TV repair, they'll be talking about tubes not electronics. Times change and technology moves forward.
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

What parts are you having problems with?



the refresh button issue & PRG pattern...also that I though when I ll implement any website for my practicing then I ll get to know it.

Please sir can you give me any tutorials or links for new JSP books???because the book which I have is O'reilly JSP dec 2003.

And before that I have to learn servlets so if I can have any good updated link for servlets because whatever I am getting right now is books from 2001.


That is the purpose of the Java classes that make up the rest of the application.



so when you mean java classes you mean servlets right???because I was reading in an old article that Servlets are classes. Also can you tell rather confirm this from what I have gone through all this that in a web application if which I ll make just for my practice using servlets & jsps...the JSP will just do nothing except what you have written in the "secret life of JSP's" i.e. only a little bit of front end. & the servlets will do all the connectivity from the database.& the bean classes will have the data.

Thanks

Irtiza


 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Irtiza Ali wrote:the refresh button issue & PRG pattern..


While those are important patterns, they're the type of thing you can come back to. The real important concepts to take away from the article is the proper layering of web applications between view, controller and model.

Patterns like PRG and Front Controller can come as they make sense.

Please sir can you give me any tutorials or links for new JSP books???because the book which I have is O'reilly JSP dec 2003.


Wow. 2003 is ancient.

The Head First Servlets and JSP book is a good one.

When it comes to scriptlets, it's ok to learn about them as you may come across older code that still uses them, but you should never use them in new code. It'd be like trying to put tubes in a modern TV.

And before that I have to learn servlets so if I can have any good updated link for servlets because whatever I am getting right now is books from 2001.


The Head First book covers both.

Also be aware that servlets, while undergoing some modernization, haven't changed anywhere near as much as JSP (which underwent a major shift away from scriptlets).

so when you mean java classes you mean servlets right?


Not necessarily. The servlets serve as UI controllers, but model code (including areas like business logic and persistence) should be arranged in classes that have nothing at all to do with presentation. That keeps your code as clean and flexible as possible.

because I was reading in an old article that Servlets are classes.


Yes, servlets are classes. But they are far from the only types of classes that you will find in web applications.

Also can you tell rather confirm this from what I have gone through all this that in a web application if which I ll make just for my practice using servlets & jsps...the JSP will just do nothing except what you have written in the "secret life of JSP's" i.e. only a little bit of front end. & the servlets will do all the connectivity from the database.& the bean classes will have the data.


That's pretty close -- but the servlets shouldn't do too much work themselves -- rather they control and delegate. Your application's logic and persistence should be in classes that have nothing to do with servlets or JSPs or other UI elements.

That not only makes the application logic clean and flexible, it also makes it much easier to test.


 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Irtiza,

I learnt Servlets and JSP from Head First Servlets & JSP. Its a great book. Trust me you will love this book.
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sir

so servlets(java classes) are different from all the logic & code in the bean classes or logic building classes.

now if I have to make an e.g web application how will I divide things into servlets JSP's & business logic & database classes.? any articles on this?

thanks
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look up terms such as DAO, Model 2, MVC, n-tier, and so on.
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes I know about MVC 2. Its implemented in the struts framework.

It is possible to make an application using only servlets & jsp???

Irtiza
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Irtiza Ali wrote:It is possible to make an application using only servlets & jsp?


Sure, but it won't be a good one.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Irtiza Ali wrote:yes I know about MVC 2.


There's no such thing as MVC 2 -- just MVC.

And if you know about MVC, then you know that control (C) is what servlets provide, and persistence (DB access) is part of the model (M) which is a completely separate layer from servlets.
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ohh

this means I have to study servlets then the remaining of JSP & then struts & then my first practice application ...5 days at least..

thanks Sir

will be asking questions on servlets from now on.

 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.theserverside.com/discussions/thread.tss?thread_id=20685 ???
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Irtiza Ali wrote:this means I have to study servlets then the remaining of JSP & then struts & then my first practice application


As I said earlier, I'd avoid frameworks like Struts until you have a very good grasp of the basics. (And even then, I am not a fan of the big frameworks.)
 
Irtiza Ali
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup as I wrote that I ll first finish servlets & JSP's so that I can move to a framework so that I can practice my first web application using all the today's standards.

secondly if frameworks are not good & we cannot make a good application only using servlets & JSP's then what to use???

 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I personally find that the big frameworks try to do too much and to be too general, and, for me, just create more work than they save.

Once you have a good grasp of the core technologies, you will be in a position to make that determination for yourself.
 
reply
    Bookmark Topic Watch Topic
  • New Topic