Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploying Struts app on Linux server

 
Nina Anderson
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to deploy my Struts application on our live Linux server and the pages are not coming up on the web and I don't know how to configure the server. I'm using Struts, Tomcat, Hibernate and jsp.

This is what I did:

I copied our *.war file in the "/var/www/html/" directory. However, when I re-start Tomcat, the contents of the war file are not made available in the web application.

Why is it that Tomcat is not automatically picking up and deploying our app after JVM restart? I tried doing the same in the "/home/webadmin/mydomain.com/html" as well with not luck.

The following are my questions:

1) Why won't my index.jsp come up? It is located in "/home/webadmin/mydomain.com/html"




2. Is my web.xml wrong?




3. What's the significance of "/var/lib/tomcat5/webapps"? Should I be using this too?

The name of our .war file is "PBWebApp.war". When I deploy to "/var/lib/tomcat5/webapps", a "PBWebApp" directory is automatically created by the system. This directory contains the jsp and java files. Here's the file structure:

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't really a Struts question, but: the webapps directory is the correct place to deploy a WAR file. How are you attempting to access the application? Are you including the webapp context in the URL?

Dave
 
Nina Anderson
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No...I'm NOT using the web context to access the page. I tried www.mydomain.com and www.mydomain.com/index.jsp, but neither options worked. I blank page is displayed and when I right-click to view source, I see the jsp code with my struts tag. So, it looks like the struts taglibs are not being recognized.

Also, where should I post this problem, if you don't think this is the right forum?
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nina Anderson:
So, it looks like the struts taglibs are not being recognized.


So If you have doubt about taglibs location , then first make sure that they are in directory \WEB-INF directory.. Usually my Netbeans IDE handles this, i.e it shows an error if he couldn't find TLDs..

Now try this highlighted changes on your index.jsp



I hoped there is proper mapping for "welcome" action


web.xml , looks fine.. Still If you are using any IDE, parse this XML for validness ..



Finally, I never deployed a webapp on Linux Server , nut basic setting is same everywhere..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic