aspose file tools*
The moose likes JSP and the fly likes JSP, tomcat, database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP, tomcat, database" Watch "JSP, tomcat, database" New topic
Author

JSP, tomcat, database

chure abcede
Greenhorn

Joined: May 31, 2013
Posts: 14

Hi folks,

I'm new to JSP and I just started learning this for a week and I still don't have a wide overview of how JSP works.
I'm aware that JSP is the same with PHP only that JSP uses java technology. My question is,if php uses myphpadmin for the database, so what is it in JSP and what really are the functions of this server like tomcat which the one I used.

I would really appreciate all of your comments.

Thanks you.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

JSP is for views only. Database access is not done in a JSP, but in Java class, preferably in the Model layer of an application using the MVC pattern.

Java classes use JDBC to access database.

For an overview of what JSP is all about, see this article.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
deepak veyan
Greenhorn

Joined: May 02, 2012
Posts: 10

Hi,

JSP forms the view part of your MVC architecture.You could be using any database as per your preference. PHPMyAdmin is just a tool to access your database (MySQL). Probably you must have installed a WAMP package where in all the required materials came bundled.Coming to JSP , you can still continue using MySQL database if you prefer to.

Tomcat is an application server and acts as your JSP container.It compiles your JSP files into class (servlets) files and make them available to accept requests and serve responses.

Hope that helped !
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12821
    
    5
You really should get a strong grounding in servlets, the servlet life cycle, and the servlet API before even touching a JSP page. Otherwise you will just flounder around with mysterious errors.

Bill
chure abcede
Greenhorn

Joined: May 31, 2013
Posts: 14
Thanks everyone for the help.Somehow it gives me a little overview on how this things work.

@deepack- Are there any good database available other than MySql that is best suited for big websites(i really mean a huge website). You mentioned that PhpMyAdmin is just a tool which great because atleast now I know, I'm still a little bit of confuse if what tool should be use to access the database in JSP.

@William Brogden- thanks for the tips anyways,it would really help me, and this servlets also is new programming term to me same with jsp.

@bear-thanks for the link.it really helped me.
margaret gillon
Ranch Hand

Joined: Nov 12, 2008
Posts: 318
    
    6

Postgresql is a great database for large web sites. It is open source, runs on most platforms, is ACID compliant, and scales well. There is a large support maillist for Postgresql and J2EE on the Postgresql site and you can get support for Postgresql here in the Javaranch JDBC forum. Javaranch runs on the Postgresql database.
deepak veyan
Greenhorn

Joined: May 02, 2012
Posts: 10

If you have the budget to go for Oracle , I guess that should be the best.You can leverage the power of PL SQL code to house your business logic within the database as well.This helps you build a really robust MVC application.Otherwise you will find lot many like even MySQL should be a good choice according to me.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

deepak veyan wrote:I guess that should be the best.

You guess? Could you outline while you feel that Oracle would be a better choice than PostgreSQL or even MySQL/MariaDB?
deepak veyan
Greenhorn

Joined: May 02, 2012
Posts: 10

Moreover , do you have any special reasons to not use MySQL.? (just out of curiosity) . To connect the database you could use a JDBC driver and make a connection within the page , but that would be the last thing I would suggest. You can write a servlet class and write the code there too.

The only tool you would require is jdbc drivers , which can be easily found as JARs.
chure abcede
Greenhorn

Joined: May 31, 2013
Posts: 14
MYSql is not a problem to me, its that i'm just curios if there's another good database other than MySql which is good for web. Ill consider Postgresql in the list and I'm still learning JSP now.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

PostgreSQL is the Oracle DB in the open source realm and doesn't shines only for large system. You can use it from small systems to very large, sharded ones.
I'm not -of course- advocating against MySQL or any other RDBMS but PostgreSQL is really a vital option. The documentation is extensive and detailed; I never find a need to buy a book. And the knowledge pool is massive.
deepak veyan
Greenhorn

Joined: May 02, 2012
Posts: 10

Bear Bibeault wrote:
deepak veyan wrote:I guess that should be the best.

You guess? Could you outline while you feel that Oracle would be a better choice than PostgreSQL or even MySQL/MariaDB?


In the little experience I had , I could see awesome capabilities of PL SQL in Oracle making it support a robust MVC architecture. Meanwhile , I have just started working with MySQL database and found that it does not support returning UDTs from database stored procedures(Kindly correct me if I am wrong).I haven't really worked on PostgresSQL yet.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP, tomcat, database