• 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
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

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..
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic