Results 1 to 7 of 7
  1. #1
    orhie is offline Member
    Join Date
    Aug 2010
    Posts
    3
    Rep Power
    0

    Default need advice on a web based project development

    hi all,

    First things first, I am quite new to java and related stuff war, ejb, jsp etc.

    Im trying to design an application which will
    -be accessed by a web browser
    -will store all the data on a DB (mysql is what im thinking)
    -will have user login (each user will have different access levels)
    -min 500 people will be online at all times
    -the DB will host more than 5million records
    -the db will be like cars, licenses, drivers, penalties (not mentioning user, user groups, etc)

    how will the software work:
    user logs in using: username pass accountid
    according to user-rights(access level) the thing he/she can to will be shown in first screen
    user will chose an option and the next page will be shown with options again according to users access-level
    when editing updating inserting a record the user will enter a secondary password to confirm the action


    and dont know why but i have a thing for security so i want the system to be as safe and stable as possible
    by the way i dont have hardware problems so if using the method you advised requires alot of cpu power no problem

    well i hope the car driver example brought an image to you guys

    well my problem is i dont know what to use when coding:
    ex: login page can be html(login page)-->jsp(user-pass verification) or jsp(login page)-->jsp(will check login true javaclass)--> java class

    i want to use java and java based systems, please help me i dont know what to choose war, ejb, jsp-java, jsp-html, etcc

    thanks a bunch in advance

    yours,
    orhie

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,856
    Rep Power
    19

    Default

    HTML (or JSP, depending on how complicated your front page is, ie other information that might be drawn in from elsewhere) to a Servlet (or Action/Controller if using Struts/Spring), which will do the checks and forward to either a login failed jsp or the "normal" success jsp.

    Start out correctly...do not put business logic in JSPs. They are for displaying data.

  3. #3
    orhie is offline Member
    Join Date
    Aug 2010
    Posts
    3
    Rep Power
    0

    Default

    thanks for the reply tolls
    well the design is important but i believe jsp can be enough but other than that u r saying use jsp to deliver the data from and to client like jsp--->java( he work is done here)--->jsp(result) ??

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,856
    Rep Power
    19

    Default

    Look at almost any question on here or the Sun/Oracle forums where someone has put non-display code into a JSP page and you'll see them being told to move that code out.

    It also makes it possible to test in isolation, which is very important.

    HTML is fine if the page is static. Otherwise a JSP page is probably needed. So if the login page is static then HTML will be fine.

    That givew the flow:

    request from login.html --> login servlet (calls authentication code) --> forwards to relevant JSP --> back to client

  5. #5
    orhie is offline Member
    Join Date
    Aug 2010
    Posts
    3
    Rep Power
    0

    Default

    there is one more thing i wanna ask
    if i create the app like
    html--->jsp-->> java class-->jsp-->html
    im usiing html for the ease of design :) layz me :D will it have any negative effects on my security and is it possible to do it in 5 steps as i wrote or shorterr

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,856
    Rep Power
    19

    Default

    No problem with an plain html login form.
    You can do the login logic straight in a JSP page, avoiding both a servlet and any java beans, but that's even worse than your plan to avoid a Servlet.

    Avoiding using a Servlet is not being lazy. You will discover the "joys" of debugging a JSP with your current plan, which will take you far longer to resolve any bugs than writing a simple servlet.

  7. #7
    Armadillo is offline Member
    Join Date
    Jul 2010
    Posts
    15
    Rep Power
    0

    Default

    Actually, depending on how complicated your user interaction is, you may want to use a framework to deliever the data to the user. For example Apache Wicket - Welcome to Apache Wicket.
    Your stuff will still all be in java, and your business logic will bein plain, testable, java classes but it makes it easier to write the front end components because you can use and extend the components from the framework.

Similar Threads

  1. i need an example of JSR179 ((Location based Ser)implementation for CDC based device
    By talk_to_vivekmishra in forum CDC and Personal Profile
    Replies: 3
    Last Post: 12-30-2010, 10:07 AM
  2. Replies: 5
    Last Post: 04-23-2010, 06:08 PM
  3. Replies: 2
    Last Post: 12-19-2008, 03:03 PM
  4. COM based component Project
    By jazz2k8 in forum New To Java
    Replies: 0
    Last Post: 07-17-2008, 09:03 AM
  5. Replies: 1
    Last Post: 07-23-2007, 11:59 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •