Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 10 of 10

Thread: :confused: Suggestion for creating JSP's

  1. #1
    Member Ganeprog's Avatar
    Join Date
    Jan 2014
    Location
    Chennai,India
    Posts
    80
    My Mood
    Love
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Angry :confused: Suggestion for creating JSP's

    Hi friends,



    i have a requirement to create 15 Jsp pages with some controls but each screens has similar changes only. Instead of creating 15 jsp pages anybody having idea to create simply to achieve the requirement.

    If i need to do any database related things please explain???


  2. #2
    Member
    Join Date
    Oct 2013
    Location
    United Kingdom
    Posts
    62
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default Re: :confused: Suggestion for creating JSP's

    Hi,

    There are below few things which I need to understand to help you out:
    1. Are you willing to do this only using JSP?
    2. What does these 15 screens do and do they represent different entity?

    If you want to perfom database operations, then there are many ways to do that. Go for servlets, use JSTL, etc. You can try out an approach and let us know if you encounter any issues.

    Thanks,
    Thanks and regards,
    Sambit Swain

  3. #3
    Member Ganeprog's Avatar
    Join Date
    Jan 2014
    Location
    Chennai,India
    Posts
    80
    My Mood
    Love
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Default Re: :confused: Suggestion for creating JSP's

    Hi,

    Actually i plan to follow the below structure

    html, javascript, css(Frontend design) + ajax(showing messages) + jsp(calling jdbc classes) + jdbc files(.java files) +mysql

    is it correct?

    Screens are input forms having text boxes,select,radio. For Example:capturing employee details,stock enteries

    Note: Aim of the application is to capture the inputs and view the records in grids and do modifications,deletions.

    Please guide and suggest me to achieve my requirements.

    thanks in advance

  4. #4
    Member Ganeprog's Avatar
    Join Date
    Jan 2014
    Location
    Chennai,India
    Posts
    80
    My Mood
    Love
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Lightbulb Want to perform Dyanmic JSP's?????

    Hi

    i have a requirement to create 15 Jsp pages with some controls but each screens has similar changes only. Instead of creating 15 jsp pages anybody having idea to create simply to achieve the requirement.

    If i need to do any database related things please explain???

    Actually i plan to follow the below structure

    html, javascript, css(Frontend design) + ajax(showing messages) + jsp(calling jdbc classes) + jdbc files(.java files) +mysql

    is the technical flow is correct?

    Screens are input forms having text boxes,select,radio. For Example:capturing employee details,stock enteries

    Note: Aim of the application is to capture the inputs and view the records in grids and do modifications,deletions.

    Please guide and suggest me to achieve my requirements.

    thanks in advance

  5. #5
    Member
    Join Date
    Oct 2013
    Location
    United Kingdom
    Posts
    62
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default Re: :confused: Suggestion for creating JSP's

    Yes, thats fine.

    Create a dynamic web project using a IDE (ex: Eclipse or Netbeans). HTML and CSS would be completely for frontend designs. JavaScript can be used for validation and other required operations. AJAX can be included as required in JSP. User servlets or JSTL to call database operations. Download mySql client and get the driver name. Now you have everything to get started.

    If you are completly new to JSP and Servlets, then best approach would be to follow HEAD FIRST JSP AND SERVLETS.pdf.

    Please try to create a project and connect to database. If you face any problem, then please put it here, we are happy to help.

    Thanks,
    Thanks and regards,
    Sambit Swain

  6. #6
    Member Ganeprog's Avatar
    Join Date
    Jan 2014
    Location
    Chennai,India
    Posts
    80
    My Mood
    Love
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Default Re: :confused: Suggestion for creating JSP's

    Hi Sambit,

    Thanks but, is there any possibility to reduce the html pages instead of creating 15 pages. More or less all html forms are similar, some of the controls may differ.

    reply pls.

    thanks in advance.

  7. #7
    Member
    Join Date
    Oct 2013
    Location
    United Kingdom
    Posts
    62
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default Re: :confused: Suggestion for creating JSP's

    Hi,

    If the look and feel of most of the pages are same, then YES we can reduce them to single JSP. But pure HTML pages are basically static pages, which can't be reduced.

    Please make sure that controls and validations should be handled properly as per requirement. You can render certain section of a page on the same JSP.

    I dont know how you are preparing your project and what are you planning to do in those 15 pages. But you can give a try and let me know if you have any questions.

    Thanks,
    Thanks and regards,
    Sambit Swain

  8. #8
    Member Ganeprog's Avatar
    Join Date
    Jan 2014
    Location
    Chennai,India
    Posts
    80
    My Mood
    Love
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Default Re: :confused: Suggestion for creating JSP's

    Sure i will ask questions. Ok not pure html, i am using jsp's only. As you said is correct, look and feel are same but some of the controls may vary in each page. Give some idea to reduce the jsp's.

    Thanks in advance

  9. #9
    Member
    Join Date
    Oct 2013
    Location
    United Kingdom
    Posts
    62
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default Re: :confused: Suggestion for creating JSP's

    Well, that would be bit complicate if I dont have the scenario for what you exactly trying.

    So, here is something as a clue how to do it.

    1. Check for the requirement and see, which pages can be combined together in 1 JSP file.
    2. Set flag in JSP files using attribute VISIBILITY = "YES/NO". Based on the need, this flag can be switched ON or OFF.

    Ex:- JSP page is having 4 sections, set with 4 flags switched ON/OFF based on conditions. If you want to insert some data into database, set visibility of section 1 by enabling flag ON, and hide all other sections by disabling the flag as OFF.

    In this way, same JSP can be used to show different information for different operations. You can also include one JSP into another JSP page using JSTL (search in net, how to do it). In such programming servlets can make your work easier as business logic can be separated from presentation logic. While using same JSP, be careful with the settings and code in deployment descriptor. Servlet mapping should be take care off appropriately.

    Good luck in this approach. If you need further assistance, please post

    Thanks,
    Thanks and regards,
    Sambit Swain

  10. #10
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: :confused: Suggestion for creating JSP's

    Please don't start duplicate topics. You can add new details or thoughts to an existing thread, but having multiple threads on the same topic is confusing and unproductive.

Similar Threads

  1. Algorithm suggestion
    By BlackOwl37 in forum Algorithms & Recursion
    Replies: 4
    Last Post: August 19th, 2013, 12:59 AM
  2. i/o from jsp to a file (via creating an object)
    By Panoksa in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: September 26th, 2012, 02:19 PM
  3. Possible new forum suggestion
    By ppme in forum Forum Updates & Feedback
    Replies: 14
    Last Post: December 8th, 2011, 11:49 PM
  4. Need suggestion in project
    By DanBrown in forum Java Servlet
    Replies: 0
    Last Post: February 4th, 2011, 07:22 AM
  5. Confused about setting up JSP
    By mjpam in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: September 17th, 2010, 05:14 AM