aspose file tools*
The moose likes JBoss/WildFly and the fly likes Problem in Creating WAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Problem in Creating WAR file" Watch "Problem in Creating WAR file" New topic
Author

Problem in Creating WAR file

Ivaturi Srinivas
Ranch Hand

Joined: Jun 03, 2003
Posts: 42
Hi
I have a webapplication with JSPs and Servlets. Now I want that to be working in JBoss app server. I made it as WAR file but the problem is in address bar I am getting that two times for getting index.jsp file. Here is the exmple scenario.
1. I have test as test as webapplication and I want to make it as WAR file so that it can be deployed in Jboss Deploy folder.
2. I am using this command to make WAR file. (test is in D drive.
d:\ jar -cvf test.war test/
3. Now I am keeping that test.war in JBoss/server\default\deploy folder.
4. In server console it is giving following error
10:29:19,452 INFO [Engine] Internal Error: File /WEB-INF/web.xml not found
10:29:19,452 INFO [MainDeployer] Successfully completed deployment of package
file:/D:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/test.war
5. I typed http://localhost:8080/test. It is giving direcory listing of test folder access. When I click on test again then it is displaying index.jsp like this in address bar http://localhost:8080/test/test/index.jsp

Can any one help to avoid this repetetion... It is very urgent for me.
Thanks for your help and time in advance
Srinivas Ivaturi
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Originally posted by Ivaturi Srinivas:

10:29:19,452 INFO [Engine] Internal Error: File /WEB-INF/web.xml not found
...

How about this error? do you have a web.xml?


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Ivaturi Srinivas
Ranch Hand

Joined: Jun 03, 2003
Posts: 42
Yes, I have WEB.xml and I am getting that error...
How to stop directory listing in JBoss and Tomact..
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Originally posted by Ivaturi Srinivas:
Yes, I have WEB.xml and I am getting that error...
How to stop directory listing in JBoss and Tomact..

well.. I think you should solve your web.xml problem first and once it is deployed *correctly* (with no erros) then you should move forward (My $0.02) .
If you open your generated war file with, say, winzip, do you have your web.xml under the web-inf path?
Andrew Perepelytsya
Ranch Hand

Joined: Aug 21, 2002
Posts: 93

2. I am using this command to make WAR file. (test is in D drive.
d:\ jar -cvf test.war test/

cd test
jar -cvf test.war *
The way you do it now, all your files are under test directory in the WAR and web.xml is located in test/WEB-INF/web.xml, not WEB-INF/web.xml
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Originally posted by Andrew Perepelytsya:

cd test
jar -cvf test.war *
The way you do it now, all your files are under test directory in the WAR and web.xml is located in test/WEB-INF/web.xml, not WEB-INF/web.xml

So I was right then... your web.xml is not where is suppossed to be..
Ivaturi Srinivas
Ranch Hand

Joined: Jun 03, 2003
Posts: 42
Hey
I solved the problem with your help. I am very happy for your help. Any how now I am not getting that directory listing anymore. But still curious on how to stop this directory listing..
 
wood burning stoves
 
subject: Problem in Creating WAR file