Results 1 to 7 of 7

Thread: Jsp hello world program problem

  1. #1
    Join Date
    Mar 2010
    Posts
    360

    Jsp hello world program problem

    Hello,
    I test JBoss today and begins at the same time in JSP. I try to make a simple helloworld JSP. The page appears without problem, but my deployment descriptor is apparently not accepted by JBOSS. What disturbs me greatly.

    Here is the file hierarchy
    helloworld.war
    |
    -WEB_INF
    | |
    |---- Web.xml
    ---- Hi.jsp

    Web.xml
    Code:
    <Web-app> 
    <display-name>Hello World</ display-name> 
    </ web-app>
    I can not specify welcome-file-list or servlet. My vesrion of JBOSS is 5.1.0GA with jdk 1.6.0_14. If someone could tell me my mistake, that would be great.

  2. #2
    Join Date
    Dec 2009
    Posts
    296

    Re: Jsp hello world program problem

    I guess you have the following code in the correct position in your project

    Code:
    <html> <head> <title> JSP Test </ title> <%! String msg = "Hello, World.";%> </ head> <body> <h2> <% = msg%> </ h2> <% = new java.util.Date() %> </ body> </ html>

  3. #3
    Join Date
    Jan 2010
    Posts
    70

    Re: Jsp hello world program problem

    I just installed Tomcat (Linux) and I can not make my first hello world!
    I did the following in the webapps dir:
    Code:
    myapp /
    index.jsp
    WEB-INF /
    web.xml
    lib /
    classes /
    I reboot tomcat and error on the url:
    Code:
    http://localhost:8080/test/
    http://localhost:8080/test/index.jsp
    Can anyone tell me about the App web.xml (no class, just a little index.jsp). Should I change the serveur.xml? Thank you.

  4. #4
    Join Date
    Dec 2009
    Posts
    202

    Re: Jsp hello world program problem

    Refer to the example with Tomcat, copy the web.xml of the example and then modify. Think of using an IDE like eclipse c bcp is simpler. I think you are not using an integrated development environment and that is why you are facing such problems, you should definitely use one of them.

  5. #5
    Join Date
    Nov 2009
    Posts
    359

    Re: Jsp hello world program problem

    You can try the following code at the beginning of your code

    Code:
    <? Xml version ="1.0" encoding ="UTF-8" ?> <web-app> <description> 
    My first application </ description> <welcome-file-list> 
    <welcome-file> index.jsp</ welcome -queue> </ welcome-file-list> </ web-app>

  6. #6
    Join Date
    Mar 2010
    Posts
    330

    Re: Jsp hello world program problem

    This is what I do for a fortnight, I come from php. I just want to build JSP pages, servlets no, no calls to EJBs. Hence the simplicity of web.xml

  7. #7
    Join Date
    Mar 2010
    Posts
    383

    Re: Jsp hello world program problem

    passing php jsp is another debate (I will not mention here, but politics ...).
    So my web.xml looks to be good. Should I do something else, eg on the conf / server.xml? Small precision I'm not the server administrator, I just rights in a subdirectory of webapps /. The administrator should I create a tomcat user?

Similar Threads

  1. Blackberry Torch App world problem
    By Alfanumeric in forum Portable Devices
    Replies: 4
    Last Post: 08-10-2010, 06:19 PM
  2. Sign up Problem with NFS World Beta
    By Tyler34 in forum Video Games
    Replies: 5
    Last Post: 21-07-2010, 01:09 AM
  3. Problem with new patch for NFS World
    By Calebs in forum Video Games
    Replies: 5
    Last Post: 20-07-2010, 06:44 AM
  4. Problem in program of C++
    By Tajdar in forum Software Development
    Replies: 4
    Last Post: 23-06-2010, 05:44 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,241,208.80322 seconds with 17 queries