Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 22-07-2010
Member
 
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.
Reply With Quote
  #2  
Old 22-07-2010
Member
 
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>
Reply With Quote
  #3  
Old 22-07-2010
Member
 
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.
Reply With Quote
  #4  
Old 22-07-2010
Member
 
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.
Reply With Quote
  #5  
Old 22-07-2010
Member
 
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>
Reply With Quote
  #6  
Old 29-07-2010
Member
 
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
Reply With Quote
  #7  
Old 02-08-2010
Member
 
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?
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Jsp hello world program problem"
Thread Thread Starter Forum Replies Last Post
Blackberry Torch App world problem Alfanumeric Portable Devices 4 08-10-2010 06:19 PM
Sign up Problem with NFS World Beta Tyler34 Video Games 5 21-07-2010 01:09 AM
Problem with new patch for NFS World Calebs Video Games 5 20-07-2010 06:44 AM
Problem in program of C++ Tajdar Software Development 4 23-06-2010 05:44 AM


All times are GMT +5.5. The time now is 08:43 PM.