Struts gives you the option of planting a trap for that sort of thing (i.e.
missing resource files ) in the jsp itself, via the logic tag (present/not
present), or the ever useful ActionErrors object returned from the validate
method of a class that extends 'ActionForm'. You can do your resource file
validation there as well, so the code never executes past the form bean if
the file isn't in place.
Remember, and Application type resource files (like string resource files,
for eg) must be present in the class path in order to be used. Use ant to
copy any resource files into your WEB-INF/Classes dir to make sure you don't
get any errors.
Cheers!
Melissa
-----Original Message-----
From: David White [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 13, 2001 4:21 PM
To: [EMAIL PROTECTED]
Subject: What If Resources Are Not Found?
I am having difficulty running a struts web-app via JBuilder 5. I do not
seem to be getting my resource file loaded/found. However, this is not
really a JB question...
It seems that struts looks for the configured resource file (I see the
message in the log). However, it does NOT seem to do anything if that
file is not found. It seems to just march merrily on only to fail later
when the application asks for a resource and it is not found.
I have looked a bit at the source code for the action servlet and I
cannot see anywhere in the resource factory stuff where it will fail if
the configured file is not found.
Is this intended?
Thanks,
David