my dog learned polymorphism*
The moose likes JSP and the fly likes Newbie in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Newbie in JSP" Watch "Newbie in JSP" New topic
Author

Newbie in JSP

Lilyana Saputra
Greenhorn

Joined: Feb 03, 2006
Posts: 20
Hi...

i'm newbie in JSP...i need help from you guys..
i try to run JSP in netbeans 4.1... it work, but just only for simple JSP script..

i want to create a database project using JSP...
any installer that i must download??
i need your opinions...

thx,
Lily
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
You don't require any installer. You should know how to make a connection and should have the Jars made available to the JSP to make a DB connection.

But it would be a bad design for a JSP to connect to a DB. It should be done by Java classes.
Lilyana Saputra
Greenhorn

Joined: Feb 03, 2006
Posts: 20
i want to create a application that using database manipulation...
and i want it to be work in multi platform...

is i must using browser??
do you think what is more simply??
jsp or applet or there is other option??

and if i want to make database connection... can i use simply java??
how about not with jdbc (odbc) but with some like ADO in Delphi..
using connection string???

thx
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Lilyana Saputra:
i want to create a application that using database manipulation...
and i want it to be work in multi platform...

is i must using browser??
do you think what is more simply??
jsp or applet or there is other option??

and if i want to make database connection... can i use simply java??
how about not with jdbc (odbc) but with some like ADO in Delphi..
using connection string???


I think first you need to decide how would you like to go. Because

- We can not use ADO with JSP
- Applet and JSP are two different things. Applet runs on client whereas JSP runs at server
- JDBC is a must if you want to use DB with Java
- You can't make a web application using simple java. You need to go for soe web tier J2EE tehcnology
- Java web application most likely runs in browser
Lilyana Saputra
Greenhorn

Joined: Feb 03, 2006
Posts: 20
thanks you very much....

i think i will use jsp and using mysql....
but why i can't connect database using mysql, but if i connect to access, it has been success...

1. is that because i must install mysql-connecting, driver to connect mysql with java?? i has been download it from
dev.mysql.com/downloads/connector/j/3.1.html
but i still don't know how to intall it!!
2. to access mysql directly, i use EMS mysql...where i can get i username and password database that has been created??

thx
Lilyana Saputra
Greenhorn

Joined: Feb 03, 2006
Posts: 20
sory, i think i wrong forum to ask about thats questions above... i will ask it in jdbc forum...

thx
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
Hi

Yeah, as for the JDBC code its better you ask in the JDBC forum. As for the design thing, here is may take on it.

1. Create a JSP that should take the parameters. When the form is submitted the the target should be a servlet(Controller).
2. The servlet upon analysing the request should forward it to the correct Java class that should do the validation and/or make the DB connection etc.
2.1 You can also make a different class for making and DB connection.
3. The response from the Java class should be to the servlet. The servlet should send back the response to the JSP.

This basically the MVC model. Read more on it. Search for Model View controller design pattern.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Newbie in JSP