Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts example trouble

 
Gail Schlentz
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to get an idea of what Struts is by running Thomas Paul's examples. I thought I'd followed the instructions properly, but after 2 installation attempts I can't even get a test index page to appear from the struts directory, much less the example, which makes me think I've set up the environment wrong (plus the fact that I'm environment-impaired). I've obviously either missed something, or just don't understand. Here's my directory structure & struts-config.xml. Where have I gone horribly wrong?






Many Thanks!
 
Kedar Dravid
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What error message are u getting?
 
Gail Schlentz
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry 'bout that. I don't get any message in the console window, but the browser gives me "The requested resource (/struts/jsp/index.jsp) is not available", or "The requested resource (/struts/jsp/LoginView.jsp) is not available."

Any help?
Thanks!
[ October 18, 2004: Message edited by: Elaine Micheals ]
 
Gail Schlentz
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok - I just noticed that I do get an error in my log file...



Does anyone know what this means? I have not been able to hunt it down.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your ActionServlet isn't loading. My guess is that there may be a problem with your web.xml.
 
Gail Schlentz
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmmm... I noticed that my web.xml has a tablib entry for struts-template, but I don't have a file by that name. I tried taking out the entry, but got the same error on restarting the server. It's not in my download package... do you know what that's all about?

Here's my web.xml... Many Thanks
 
Kedar Dravid
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If nothing else works, try reinstalling Tomcat. It is a fairly non-intrusive procedure.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Elaine Micheals:
Hmmmm... I noticed that my web.xml has a tablib entry for struts-template, but I don't have a file by that name.


The struts template taglib was in version 1.0 of Struts. It has been deprecated (and removed maybe?) and replaced by Tiles.
 
Gail Schlentz
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AH - HA!!!

In the first part of the 1.0 tutorial, it suggests copying struts.jar & servlet.jar into your java directory's jre\lib\ext directory. Apparently this is a no-no. Remove them, & it runs fine!! :-)

Yay!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic