Results 1 to 7 of 7
  1. #1
    devin is offline Member
    Join Date
    Feb 2009
    Posts
    13
    Rep Power
    0

    Default struts 2 not working right

    Hello,

    I am trying to learn struts but I can't even get the blank application working. I am running tomcat5.5 on ubuntu with the latest version of java. I deploy the sample war file into the webapps directory but the URL won't work. And when I view all my webapps in the tomcat manager it is not started. So I start it but I get the "Fail' error message every time.

    Is there some dependency I am missing? I can't seem to find any documentation on how to install struts besides deploying the webapp. I even copied all the jar files from the the struts2 download to the $CATALINA_HOME/common/lib/ directory.

    I also can't seem to find any error message anywhere.

    Thanks for any help, I really want to learn struts but can't even get off the ground!

  2. #2
    piyu.sha is offline Member
    Join Date
    Oct 2008
    Posts
    31
    Rep Power
    0

    Default

    check the error messages in the log file, tomcat logs are located in <tomcat home>\logs\

    look for localhost*.log file it wil show the error messages on startup.

    to startwith struts 2 u can use the showcase application war file which should run if you have the right installation....

    ---------------------
    Music | HTS | Remix
    Live life king size
    [Lucene]

  3. #3
    mosesalph is offline Member
    Join Date
    Feb 2009
    Posts
    4
    Rep Power
    0

    Default

    Hi you can check the folder structure once

  4. #4
    devin is offline Member
    Join Date
    Feb 2009
    Posts
    13
    Rep Power
    0

    Default

    I think the problem is that I have struts 1.2.9-3 installed through a Ubuntu repository. The thing is, if I try to remove it, it will also remove tomcat-admin which requires this package.

    Does anyone know of any Ubuntu repositories that have the latest version of struts?

    Thanks.

  5. #5
    devin is offline Member
    Join Date
    Feb 2009
    Posts
    13
    Rep Power
    0

    Default

    So I figured out the problem. I had to add this to my tomcat5.5/conf/policy.d/10admin.policy file:

    grant codeBase "file:/var/www/struts/-" {
    permission java.security.AllPermission;
    };

    Where /var/www/struts is where I keep my struts jar files.

    I also added /var/www/struts/lib/struts2-core-2.1.6.jar to my classpath.

    Thanks for the help. Hope this helps someone else out.

  6. #6
    arseny is offline Member
    Join Date
    Mar 2009
    Posts
    25
    Rep Power
    0

    Default

    Did you look at the tomcat log?

  7. #7
    devin is offline Member
    Join Date
    Feb 2009
    Posts
    13
    Rep Power
    0

    Default Solved

    Yeah, none of the logging seemed to be working right. So, I completely removed every last bit of tomcat from my system. Even after un-installing there was stuff lying around and every time I re-installed the problem was never fixed. So I deleted those directories.

    At any rate, once I COMPLETELY removed tomcat and then did a fresh install, struts 2 worked.

    One lesson I learned form this was to not copy .jar files into the tomcat common/lib directory.

    Thanks for the help.

Similar Threads

  1. decorator.jsp problem building Struts Menu in JSP when Struts action is used
    By dkirvan in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 04-29-2010, 06:33 AM
  2. [SOLVED] Struts 2 Integer Validation not working
    By piyu.sha in forum Advanced Java
    Replies: 2
    Last Post: 10-15-2008, 02:54 AM
  3. Replies: 8
    Last Post: 05-28-2008, 08:00 AM
  4. log4j not working in struts
    By Manu in forum Web Frameworks
    Replies: 0
    Last Post: 03-19-2008, 03:54 PM
  5. Working With ANT
    By JavaForums in forum Eclipse
    Replies: 0
    Last Post: 04-26-2007, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •