aspose file tools*
The moose likes Servlets and the fly likes HTML + Servlet + Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTML + Servlet + Oracle" Watch "HTML + Servlet + Oracle" New topic
Author

HTML + Servlet + Oracle

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
I have to make a project on FIR management. I want first form to be a LOGIN form. If user is authorized, then he can use the application.
I have to accept the data from user from front end, has to update it in database. Apart from updating, my front end should have a button for INSERT,DELETE,& EXIT for inserting new records, , deleting old records & exiting the application respectively.

Instead of using Swing for GUI, can i use HTML? Can this project be a combination of Html,Servlet & oracle?

kunal
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Yes.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
Thanks for your reply.
So, i need to create two HTML forms, 1st for login, & 2nd for form filling. 1st Html will check the authentication . For this authentication i will create a program, which in turn checks the Username & Password from a database , say AUTHENTICATE.

If he is authorized, that will direct to another Html, asking details for inserting/updating. A servlet for this, having JDBC connections, & business logic.

Or should i go for Separate programs for Inserting, Updating, Deleting. (In that case , there is no use for Servlet)?

Please provide some guidance.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Or should i go for Separate programs for Inserting, Updating, Deleting. (In that case , there is no use for Servlet)?

I don't understand this question. If you are writing a web application, and you are using Java, what alternative technology where you considering using other than Servlets (or one of the technologies that sit on top of Servlets)?

It's worth reading the documentation for whatever Servlet Container you l=plan to use. Container managed authentication is a key topic so this should have an explanation plus probably examples.
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
I have decided that i will go for two HTML forms. I want first form to be a LOGIN form. If user is authorized, then he can use the application.
I have to accept the data from user from front end, has to update it in database. Apart from updating, my front end should have a button for INSERT,DELETE,& EXIT for inserting new records, , deleting old records & exiting the application respectively.
For this i will create separate files for Insert, Delete, Update, & exit.

Now the problem is that , how can i link up HTML buttons with their Respective java files (Insert Button to Insert.java)?
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

make Insert.java as a servlet, and onclick of the insert button, call that servlet..


Regards, Prasad
SCJP 5 (93%)
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
"on click of insert button"? I am having 4 buttons, Insert, update, delete & exit, each one has to invoke a java file.

So, how to do that?
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 365
Hi,

Instead of having separate servlet for each action (insert, delete....) you can use only one & while calling that from your button click pass one parameter to differntiate which action to perform.

Instad of HTML you can use JSP for showing records.


Thanks,
Shailesh
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
you can use only one & while calling that from your button click pass one parameter to differentiate which action to perform.


Can you please provide those 2 lines of code?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML + Servlet + Oracle
 
Similar Threads
uploading records
Servlets that send email via HTML
Jr. & Sr. Java Developers needed in FL!!!!!!
New to J2EE: Is browser only option as the front end tool in J2EE
HTML + Java File + Oracle