File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed in login page

 
pinga kanave
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I have just started learning JSP and implemented login model in my application.

Request all of you to kindly go through the code and suggest any recommendation if required.

Though there is no error while executing the code and getting the login page . I just wanted to know whether the code is written in proper manner or not.


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not even close. Modern JSP should have no Java code embedded within it. Java should be handled in servlet controllers or other classes.

Also, database access should be handled in a model layer that is completely separate from any UI.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17646
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And finally, writing your own login/security system is a BAD IDEA. Most people write security systems that are no more secure than a cardboard box, based on the apps I've encountered over these many long years.

Use the J2EE built-in security framework. Leave the DIY login stuff for the code samples in books.
 
Jelle Klap
Bartender
Posts: 1951
7
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Plus, there's a HUGE glaring security leak that renders the authentication mechanism basically pointless.
It has to do with the way you build up the SQL statement. Google "SQL injection" for a bit, and you'll see what I mean.
 
Danilo Dadonas
Ranch Hand
Posts: 59
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My advice is to begin from here: Head First Servlets and JSP
 
Guilherme Mendonca
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like Dadonas said, i think you are not in the right way, if you try to read Head First : Servlets and Jsps, this will teach you programming with better patterns and its easier than it looks.
 
pinga kanave
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guilherme Mendonca wrote:Like Dadonas said, i think you are not in the right way, if you try to read Head First : Servlets and Jsps, this will teach you programming with better patterns and its easier than it looks.


You are right friend .I had done JSP a long time back. I would like to learn Latest approach for doing JSP programming. Request you to please give me a useful link/material to start with.

Also above link is forbidden in my office due to shopping category.

Expecting positive reply.

I would also like to know the difference between jsp and jspx pages.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Modern JSP should use the JSTL (JSP Standard tag Library) and the EL (Expressions Language) and avoid scriptlets and scriptlet expressions.

jspx files are XML-formatted JSP documents that are used as intermediate formats or for JSPs auto-generated by code. It is not a suitable format for hand coding.
 
pinga kanave
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Modern JSP should use the JSTL (JSP Standard tag Library) and the EL (Expressions Language) and avoid scriptlets and scriptlet expressions.

jspx files are XML-formatted JSP documents that are used as intermediate formats or for JSPs auto-generated by code. It is not a suitable format for hand coding.


Being a novice to java I would like to begin JSP from scratch .I would like to know which technology should i prefer.
1) Developing web application using netbean.
2) Developing web applications using eclips.
3) Using any other technology.


Please suggest as i m so confused about my next step in building JSP.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Netbeans and eclipse are not technologies. They are just IDEs. It doesn't matter which one you use, or if you use an IDE at all. It has nothing to do with JSP.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic