Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML + Servlet + Oracle

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 671
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make Insert.java as a servlet, and onclick of the insert button, call that servlet..
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic