• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Problem in Creating WAR file

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
Ivaturi Srinivas
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I have WEB.xml and I am getting that error...
How to stop directory listing in JBoss and Tomact..
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic