-
1. Re: problem with struts
yoyodyne May 13, 2003 2:04 PM (in response to substring)put struts.jar under WEB-INF/lib
-
2. Re: problem with struts
substring May 13, 2003 2:14 PM (in response to substring)Thanks for the reply.
However, I have already done that. As a matter of fact, I have:
1. Copy the lib/struts.jar to WEB-INF/lib
2. Copy lib/struts-*.tld to WEB-INF
3. Check and verify the WEB-INF/web.xml is including the element and the <servlet mapping> element. (the web.xml file is included in the tutorial).
4. Then stop and restart JBoss.
Still get same error message when I do "ant all". By the way, I do not have any problem when running JSP program in JBoss. So I know my JBoss installation is fine.
By the way, does copying the struts.jar file will take care of my question #2 in my original post?
Please help. Thank you very much. -
3. Re: problem with struts
yoyodyne May 13, 2003 3:21 PM (in response to substring)<<Still get same error message when I do "ant all". >>
u will need to check what the ant "all" target does. "all" may be depending on some compile target and this target is probably unable to find struts.jar. so u will have to edit build.xml to add the struts.jar location to the compilation classpath.
<<By the way, does copying the struts.jar file will take care of my question #2 in my original post?>>
it shud. -
4. Re: problem with struts
substring May 13, 2003 3:51 PM (in response to substring)Yes, I have already checked that. In the build.xml file, there is a line as stated below:
and I have added a system variable called STRUTS_HOME to point to the folder path where I store the struts program.
Also, when I restart JBoss, I saw JBoss was calling and registering struts. The messages in the console scrolled up too fast for me to read it. But I found the following scripts:
//scripts begin--------------------------------------------
16:34:23,015 INFO [STDOUT] New org.apache.struts.action.ActionForward
16:34:23,015 INFO [STDOUT] Set org.apache.struts.action.ActionForward propertie
s
16:34:23,031 INFO [STDOUT] Call org.apache.struts.action.ActionMapping.addForwa
rd(ActionForward[display])
16:34:23,031 INFO [STDOUT] Pop org.apache.struts.action.ActionForward
16:34:23,046 INFO [STDOUT] Call org.apache.struts.action.ActionServlet.addMappi
ng(ActionMapping[path=/upload, type=org.apache.struts.webapp.upload.UploadAction
])
16:34:23,046 INFO [STDOUT] Pop org.apache.struts.action.ActionMapping
16:34:23,046 INFO [STDOUT] register('-//Apache Software Foundation//DTD Struts
Configuration 1.0//EN', 'jar:file:/C:/jboss-3.2.1_tomcat-4.1.24/server/default/t
mp/deploy/server/default/deploy/work/MainEngine/localhost/struts-upload/WEB-INF/
lib/struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd'
//scripts end--------------------------------------------
So if the startup program can "see" org.apache.struts.action.*, why can't my import statement? I don't understand why I keep getting the error message of:
package org.apache.struts.action does not exist
Thank you very much. -
5. Re: problem with struts
substring May 13, 2003 3:53 PM (in response to substring)Oops, typo. The line in build.xml should be:
Thanks. -
6. Re: problem with struts
substring May 13, 2003 3:55 PM (in response to substring)Well, I guess the dollar sign do not show up here. Let me try again with word instead of the symbol. So replace the word with the corresponding symbol will get the actual code.
-
7. Re: problem with struts
yoyodyne May 13, 2003 4:47 PM (in response to substring)ok, can u post what u see on the console when u do 'ant all'. Also can u attach the build.xml.
-
8. Re: problem with struts
yoyodyne May 13, 2003 4:48 PM (in response to substring)<<So if the startup program can "see" org.apache.struts.action.*, why can't my import statement? I don't understand why I keep getting the error message of:
package org.apache.struts.action does not exist
>>
cuz they get their paths from different places. -
9. Re: problem with struts
substring May 13, 2003 8:45 PM (in response to substring)Hmmm, so am I correct that the following is the line of code where the program "knows" the location of the file:
and since I have already created the system variable of STRUTS_HOME to point to the program location, say, C:\struts , shouldn't the <dollar sign>{env.STRUTS_HOME} be translated to C:\struts ?
I have attached the build.xml and the messages I got from running "ant all".
Thank you very much. -
10. Re: problem with struts
yoyodyne May 13, 2003 11:17 PM (in response to substring)<<shouldn't the <dollar sign>{env.STRUTS_HOME} be translated to C:\struts ?>>
Yes, it shud.
I saw the following line in ur build.xml.
Try replacing the ":"s in the classpath with ";" (assuming that u r running the build on a windows platform).
If that doesnt work, replace the line with the following:
<javac srcdir="${top}/${src}" destdir="${build}"
scaffold.jar"/> -
11. Re: problem with struts
yoyodyne May 13, 2003 11:22 PM (in response to substring)Yikes the dollars get eaten away :(
I saw the following line in ur build.xml.
Try replacing the ":"s in the classpath with ";" (assuming that u r running the build on a windows platform).
If that doesnt work, replace the line with the following: -
12. Re: problem with struts
substring May 14, 2003 7:55 AM (in response to substring)First of all, I like to thank yoyodyne for the continuous help.
However, I modified the code as suggested and got the same result. Then, I got suspicious about the system variable translation and investigated a little more on this. Then I realized that I forgot to close the command prompt after I created the system variable. It was a stupid oversight, good grief! Now it compiled successfully.
Thanks for all the help. -