Results 1 to 9 of 9
- 10-05-2009, 12:42 PM #1
Member
- Join Date
- Oct 2009
- Posts
- 5
- Rep Power
- 0
problem in deploying WAR file in server
Hi,
I want to deploy my website in the server. When I create WAR file and deploy in the localhost it works fine. But the same WAR file does not run in Tomcat server.
I try to access it like
in local server:
"...//localhost:8080/myApp/index.html"
it works fine
but in webhosting server:
"....mysite.com/myApp/index.html"
it gives me 404 error.
I deployed the WAR file inside 'www' folder.
The Tomcat version in 5.5.28 in local system and 5.5.20 in the server. JVM version is same in both.
Please help me out.
- 10-05-2009, 01:15 PM #2
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Ask the webhost provider for the instructions on how to deploy your app on their server.
- 10-05-2009, 01:30 PM #3
Member
- Join Date
- Oct 2009
- Posts
- 5
- Rep Power
- 0
Hi r035198x,
Thanks for the swift response.
I tried that option. I talked with them several times. They have restarted tomcat for multiple times. Now they are saying there is nothing to do from their side. The problem has to be sorted out by the developer. In their term the error is happening because of the "Servlet package is not resolving on the server". I did not quite understand this term.
Is there any particular difference between the deployment in localhost server and production server?
- 10-05-2009, 02:26 PM #4
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
What kind of server are they running? The servlet packages should already be available on tomcat.
- 10-05-2009, 02:37 PM #5
Member
- Join Date
- Oct 2009
- Posts
- 5
- Rep Power
- 0
They are running Apache Server with Tomcat 5.5.20. Though, I have put servlet-api.jar in my 'WEB-INF/lib'.
- 10-05-2009, 03:26 PM #6
just ask them the folder structure and check web.xml is properly placed.
Ramya:cool:
- 10-05-2009, 05:47 PM #7
Member
- Join Date
- Oct 2009
- Posts
- 5
- Rep Power
- 0
Hi Ramya,
Thanks for the response,
'www' is the default package provided by the web-hosting where i should put all my files.
I tried putting my 'index.html' just inside the 'www'. And accessed it successfully with the url '...//mysitename.com/index.html' not '...//mysitename.com/www/index.html' (accessing it this way does not solve my problem). If i put my 'index.html' outside 'www' folder, server can't identify that.
So it proves that 'www' is the root folder for me.
but if i create a WAR i.e. myApp.war and put inside 'www' folder, then server expand in such a manner that a folder named 'myApp' gets created inside 'www' folder, and all my files inside 'myApp' folder.
Now
'...//mysitename.com/index.html'
'...//mysitename.com/myApp/index.html'
'...//mysitename.com/www/index.html'
'...//mysitename.com/www/myApp/index.html'
none of them works.
Now if i place the 'myApp.war' outside 'www' folder, then after expansion by the server 'myApp' folder gets created outside 'www' and there is nothing inside 'www'. So nothing can be accessed.
in all the cases my 'web.xml' resides in 'myApp/WEB-INF/'.
- 10-05-2009, 07:00 PM #8
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Don't put any servlet api jars in your application's WEB-INF. As I said already, tomcat already has them.
- 10-12-2009, 12:17 PM #9
Member
- Join Date
- Oct 2009
- Posts
- 5
- Rep Power
- 0
Hi,
I got a solution of the problem. After expanding the WAR file, server creates folder 'myApp' and place my entire application inside it.
So I took out all the contents from 'myApp' folder and placed it out in the root (i.e. in my case 'www' folder).
Then
'...//mysitename.com/index.html'
worked fine.
Thanks for all the suggestions.
Similar Threads
-
Problem deploying applet to browser
By nfteodoro in forum Java AppletsReplies: 4Last Post: 09-25-2009, 10:03 AM -
problem: java.net.SocketException: Unexpected end of file from server
By mtyoung in forum Java AppletsReplies: 2Last Post: 02-21-2009, 03:36 AM -
Deploying a java application on an web or appp server.
By CharanZ in forum Advanced JavaReplies: 1Last Post: 10-29-2008, 10:45 PM -
(Server)Socket application deploying
By mdinant in forum NetworkingReplies: 0Last Post: 04-09-2008, 05:10 PM -
Having problem hot-deploying JSP's
By kurt_cobain in forum EclipseReplies: 0Last Post: 04-03-2008, 05:55 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks