Results 1 to 16 of 16

Thread: Need Help Plz!

  1. #1
    flower is offline Member
    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    Default Need Help Plz!

    Need help in creating a webpage application as follows:
    home.jsp which calls
    *navigation.jsp
    *contact.jsp

    navigation.jsp displays as a header on each page
    *The current date and time
    *The company logo

    Links displaying
    *Home
    *Products
    *Order

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Are you looking for a programmer or what?
    What have you done so far?

  3. #3
    flower is offline Member
    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    Default

    i need an html code.
    i have written this so far..

    <%@ page language = "java" %>

    <html>
    <head>
    <title>My first JSP Home page
    </title>
    </head>
    <body>
    <%@ page language="java" %>
    <% out.println("Home page"); %>
    </body>
    </html>

  4. #4
    flower is offline Member
    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    Default

    thats what i have to do for my project..

    Create a webpage application as follows:

    home.jsp which call
    navigation.jsp
    contact.jsp

    navigation.jsp displays as a header on each page
    The current date and time
    The company logo

    Links displaying
    Home
    Products
    Order

    contact.jsp displays as a footer on each page
    counter e.g. You are customer number: xxx
    Organisation’s web address
    Email address for enquiries

    Write a general introduction – a few lines – on the company in home.jsp and display a few images of the products in products.jsp.

    order.jsp should allow the user to enter their:
    name
    address (as a textArea box or several input boxes)
    password
    password confirmation

    The user can also:
    Select a product from a drop down menu.
    Enter a quantity in an input box.
    Select their preferred method of payment from a set of radio buttons e.g. VISA, Mastercard, etc.

    Select their preferred time of delivery (a.m. or p.m.) from radio buttons.
    Tick 2 checkboxes to choose a free gift from 4/5 items listed.
    Complete a textArea box called, Special Delivery Instructions.


    order.jsp contains a Submit and a Reset button.

    order.jsp should call display.jsp.

    display.jsp should display the user’s order details and have a return button which calls allows the user to return to order.jsp to change their order and a link which the user presses to comfirm their order. If the user presses the link to confirm their order, confirm.jsp is displayed

    confirm.jsp should thank the user, by name, for placing their order. You may need to use sessions in order to display the user’s name on this page.

    display.jsp also checks for BLANK entries (name and address only) and incorrect PASSWORD confirmation. If any of these entries are invalid, you should forward the user to another page called invalid.jsp and inform the user of the incorrect entries and ask them to return to order.jsp to re-enter their order correctly again. This check for invalid entries should be done at the start of display.jsp. (Hint: Use Java statement .equals(“ ‘)).

    Every jsp page that you generate should call:
    navigate.jsp and contact.jsp
    an error page for detailing any runtime errors

    Your web pages must all be formatted neatly, preferably using tables.

    Your website can be based on any product you like e.g. books, flowers, home heating oil, computer products, dvds, videos,

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Please choose the correct sub-forum when you ask a question again. This sub-forum for XML related questions. But the your one is much related to JSP.

    I'll move this thread to the correct place this time. Please pay your attention on that next time. :)

  6. #6
    flower is offline Member
    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    Default

    Hi Eranga,

    Just like to ask you that where did u move my thread..I checked under jsp title..but it is not there.

    Let me know soon plz.

    Thanks

  7. #7
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Do you know how to work with HttpRequests and HttpResponse ?Any knowledge about Servlets?

  8. #8
    flower is offline Member
    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    Default

    i say i know a bit of it..sorry i m just new to that.

    for my code..i have just written this..

    <%@ page language = "java" %>

    <html>
    <head>
    <title>My first JSP Home page
    </title>
    </head>
    <body>
    <%@ page language="java" %>
    <% out.println("Home page"); %>
    </body>
    </html>

  9. #9
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    JSP FUNDAMENTALS

    This a pretty good site for learning JSP,learn and in a week you will know what is going on.
    If you want to create components,you should create them from html code in the form tags,and to declare what is going on when you submit the form,if you use Servlets,so it will execute the servlet,then don't forget to point wich action is that-get or post.Each component should have its name so that you can then to know what was chosen or written in the component as a request parameter .

  10. #10
    flower is offline Member
    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    Default

    thanks for that.

    I just registered to java forums yesterday..so new to that as well..can u plzz tell me from where i can learn about jsp..I knw there is too much stuff about that on internet.

    And for now can u tell me how can I start this project..as I only have few days to give that..so really need help in this..

    Thanks in advance

  11. #11
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Default

    You will not get this project built in a few days with skills displayed, go ahead and ask for you old job back flipping burgers.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  12. #12
    flower is offline Member
    Join Date
    Nov 2008
    Posts
    7
    Rep Power
    0

    Default

    i know but can u plzz give me some sort of code or link from where i can learn and start this..

  13. #13
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Ok,man create in Eclipse Dynmic Web Project,then create index.jsp file in Web-content folder:
    Java Code:
    <html>
    
    <head>
    <title>New Page 1</title>
    </head>
    
    <body>
    
    <h2>Login</h2>
    <p>Please enter your username and password</p>
    <form method="GET" action="LoginServlet">
      <p> Username  <input type="text" name="username" size="20"></p>
      <p> Password  <input type="text" name="password" size="20"></p>
      <p><input type="submit" value="Submit" name="B1"></p>
    </form>
    <p>&nbsp;</p>
    
    </body>
    
    </html>
    Then create a servlet with name LoginServlet:

    Java Code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    
    public class LoginServlet extends HttpServlet{
      public void doGet(HttpServletRequest request, HttpServletResponse response)
                                       throws ServletException, IOException {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        String name = request.getParameter("username");
        String pass = request.getParameter("password");
        out.println("<html>");
        out.println("<body>");
        out.println("Thanks  Mr." + "  " + name + "  " + "for visiting roseindia<br>" );
        out.println("Now you can see your password : " + "  " + pass + "<br>");
        out.println("</body></html>");
    Open the web.xml file in Web-Content and check if it has the following lines:

    Java Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--<!DOCTYPE web-app
     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
     "http://java.sun.com/dtd/web-app_2_3.dtd"> -->
    
    <web-app>
     <servlet>
      <servlet-name>Hello</servlet-name>
      <servlet-class>LoginServlet</servlet-class>
     </servlet>
     <servlet-mapping>
     <servlet-name>Hello</servlet-name>
     <url-pattern>/LoginServlet</url-pattern>
     </servlet-mapping>
    </web-app>
    Then run it on server,but before configure the server in eclipse.

    So as you see the our parameters are username and password and they are the names of the fields in html file.The input fields are between the form tags,the form gets the action for calling LoginServlet servlet and the "GET" method will be executed

  14. #14
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by flower View Post
    Hi Eranga,

    Just like to ask you that where did u move my thread..I checked under jsp title..but it is not there.

    Let me know soon plz.

    Thanks
    Sorry about that seems to me it didn't move your thread correctly. Still in the XML forum. Anyway you can find all your posts in subscribed folder. I'll move this thread.

  15. #15
    57414 is offline Member
    Join Date
    Nov 2008
    Posts
    1
    Rep Power
    0

    Default HI

    HI
    Enjoy the java community......................................

  16. #16
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Welcome to our community. :)

    We have a separate sub-forum for introduction. Actually we have well organized set of sub-forums for different Java technologies. You must select the best next time, to ask your questions. Please read our FAQ page. For this time I'll move this thread into the correct sub-forum.

Posting Permissions

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