Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Deploying Struts app on Linux server

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

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic