Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Confustion

 
Bryan Lemmer
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I am a fledgeling web app developer using ASP and sql server 2000. been in the field for about a year and a half. i am looking to start developing my web apps using jsp.

I have a whole bunch of questions:
I am unsure of which java package to use. i currently have j2se 5 with java beans IDE installed as well as j2se 6 and also j2ee. which of these packages are essential for my jsp development. i am currently reading a book that says that servlets and JSP fall into the J2ee section.

do i need all of these installed or only the j2ee?

I have also downloaded and installed apache on my local machine which i access through port 8080. i plan to install apache on our server later this week. when i access this server on a local lan, do i have to still access it using https://BladeServer:8080/uKanbanNew/default.asp or is there another way to do it without using the port, bearing in mind that the server is currently running our other apps using IIS.

I have also read that servlets can be used to control the data in/out process from a web page. how is this done? does the jsp send info to the servlet who then decides what to do with it and then send that correct info back to the client jsp or does the user interface directelly with the servlet. what would be the best configuration for this?

i need to ask all these questions before i get stuck in because i dont want to start out with bad practices.

i think this is all for now!

any help will be greatly apprecited.

Cheers
Bryan
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All you need is a web container, like Tomcat, and J2SE
http://tomcat.apache.org/

does the jsp send info to the servlet who then decides what to do with it and then send that correct info back to the client jsp

Yes, this is basically what it does.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These articles may help:

This article
and
this article
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some more detailed answers now that I've had sufficient caffeine:

Originally posted by Bryan Lemmer:
I am unsure of which java package to use. i currently have j2se 5 with java beans IDE installed as well as j2se 6 and also j2ee.


You don't need j2ee unless you're going to dive into EJBs. Which you shouldn't be at this point. So the J2se package that matches your container should be the one to use.

For example, I use j2se 5 with Tomcat 5.5.

The servlet and JSP APIs are provided by the servlet container that you use. I recommend Tomcat for all newbies.

i am currently reading a book that says that servlets and JSP fall into the J2ee section.


Technically, that's correct. But j2ee also encompasses a wide range of other tehcnologies that you don't need and just cloud the picture.

I have also downloaded and installed apache on my local machine which i access through port 8080.


Do you mean the Apache Web Server or Apache Tomcat? The latter is what you need. Just saying "apache" is ambiguous.

bearing in mind that the server is currently running our other apps using IIS.


If you've already got IIS running on port 80, you can't run Tomcat on 80.

There is a way -- tortuous though it may be -- to have IIS route requests on port 80 to Tomcat running on port 8080. Don't ask me for details, I only use Windows when someone much larger than myself forces me to at gun-point.

I have also read that servlets can be used to control the data in/out process from a web page.


Yes, this is the accepted best-practice pattern for web applications. The articles I mentioned in my previous posting should be helpful in learning about JSP and web application patterns.

does the jsp send info to the servlet who then decides what to do with it and then send that correct info back to the client jsp


Pretty much -- again, see the articles. However, a terminology correction. "client JSP" has no meaning. JSP is a server-side technology. See articles.

i need to ask all these questions before i get stuck in because i dont want to start out with bad practices.


Good thinking.
[ March 23, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One further thought with regards to:

because i dont want to start out with bad practices.
Be sure to embrace good patterns from the start. Research the Model 2 and Front Controller patterns (yet again, see article) especially with regards to how JSP is relegated to being just "the view" with no on-page processing.

To that end, start right off the bat with using modern JSP practices, and avoid all sciptlets and scriptlet expressions on JSP pages. Embrace the JSTL and EL as the techniques of choice.

Oh, and I can't help but to bust your chops over the typo in your topic title! What's "confustion"? The state of being so befuddled that you spontaneously burst into flame?
[ March 23, 2007: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic