First: where, exactly, did you install JBossAS? Full path, please. (I hope that your step 3 did not mean what I think it does - I would not install JBossAS into the Eclipse directory.)
I didnt put the files in the eclipse foler
A.1. This is the Jboss full path D:/softwares/jboss-4.2.3.GA. A.2. Eclipse is in C:\new software\eclipse
Second, when you configured the JBoss4.2 server entry in Eclipse, what were the settings that you used.
B.1. Windows --> preference --> server --> installed runtimes --> Add --> Jboss 4.2
B.2 in the New server Runtime window i choose,
JRE -->Default JRE (Another option is eclipse),
Application Server Directory --> D:/softwares/jboss-4.2.3.GA.
Third, after setting up the server, did you try running it without having any projects associated with it yet? If so, does it run?
C.1 YES i can run the Jboss without adding any projects. C.2 I created an enterprise application project, i can run it without any proble. C.3 But When i tried to run a dynamic web project, i am getting an alert message saying "Cuold Not publish to the server, Java.lang.NulpointerException " C.4 But No stack trace messages in console
Fourth, was there a stack trace provided with the null pointer exception? Could you post it. If none was shown to you, look in the workspace/.metadata/.log file - the full stack trace might be there.
Based on the stack trace, my guess is that the dynamic web project is not correctly configured, and thus cannot be deployed. I base this on the assumption that the URI it is attempting to get it the URI of the deploy directory.
But I have one other thought. I googled dynamic web project and in every case saw that Tomcat was used as the server. I have a hunch that Eclipse modifies the Tomcat configuration (or supplies extra configuration information) so that the web app runs from the WebContent directory within the project. With JBossAS, this would be problematic. Try using a Static Web Project (make a quick hello world project) and see if that works.
I created a dynamic web project, added a hello jsp, and ran it. Worked fine - no null pointer exceptions. In addition, the project was packaged into a WAR file and copied to the deploy directory, as expected. So having the project be a "dynamic web project" is not the problem.
The only other thing I can think of is that there is some incompatibility within Eclipse somewhere. I have found that if I get into such a situation, the only remedy is to reinstall Eclipse. You could either go with Eclipse 3.4 for Java EE Developers, or you could use Eclipse 3.3 for Java EE Developers and update it with JBoss Tools. (There is also a version of JBoss Tools for Eclipse 3.4, but it is a beta.) I used Eclipse 3.4 without JBoss Tools to test out the dynamic web project.
I also same problem and these works for me may be its help you.
There are few solution for this
1. you can try your application with eclipse another version may me updated version.
2. you can go eclipse help >software update and update your eclipse from there
3. or you can download jboss tool zip file from the jboss site unzip it .
it will cantain two folders features and plugin .Copy the files in these two folder to Your eclipse folders names features and plugin
than restart your eclpise and your jboss will work