This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Help needed in login page

 
Greenhorn
Posts: 20
  • 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.


 
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
Saloon Keeper
Posts: 21591
146
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • 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.
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • 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.
 
Ranch Hand
Posts: 59
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My advice is to begin from here: Head First Servlets and JSP
 
Greenhorn
Posts: 1
  • 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
  • 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
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
  • 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
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
Maybe he went home and went to bed. And took this tiny ad with him:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!