You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by vikas rao <vi...@gmail.com> on 2007/05/04 11:34:21 UTC

build.xml problem

Hi guys,

I am trying to build a sample struts application which verifies login
information.

Now the dilemma Ive run into is how to compile the "ActionBean" and
"Actionclass" inside the package?

So i decided to write a build.xml file for this purpose and it is like
below:
<?xml version="1.0"?>
<!-- Build file for our first application -->
<project name="MyStruts" default="build" basedir=".">
<target name="build" >
<javac srcdir="C:\apache-tomcat-6.0.10\webapps\MyStruts\WEB-INF\classes\log"

destdir="C:\apache-tomcat-6.0.10\webapps\MyStruts\WEB-INF\classes\log"
debug="true"
includes="**/*.java"/>
</target>
</project>

Now, I'm trying to build this file, but again, the problem comes up where
none of the "Action","ActionForm" or "httpServletRequest/Response" items in
these classes are being recognized.

Should i include something else with my build.xml? like the path to the
"lib" folder inside the "WEB-INF" folder or something?

Any help is highly appreciated.

Thanks.

VIkas.

Re: [OT] Re: build.xml problem

Posted by vikas rao <vi...@gmail.com>.
ok, i got it !
i added the "web-inf/lib" path to the build.xml file like this:


<property name="compileLibDir" value="C:\apache-
tomcat-6.0.10\webapps\MyStruts\WEB-INF\lib"/>

and it worked, the lib folder had the struts jar files in it..
thanx again for the help dave!

vikas.


On 5/4/07, Dave Newton <ne...@yahoo.com> wrote:
>
> --- vikas rao <vi...@gmail.com> wrote:
> > <target name="build" >
> >   <javac
> srcdir="[...]\webapps\MyStruts\WEB-INF\classes\log"
> >
> destdir="[...]\webapps\MyStruts\WEB-INF\classes\log"
> >          debug="true"
> >          includes="**/*.java"/>
> > </target>
> >
> > Should i include something else with my build.xml?
> > like the path to the "lib" folder inside the
> "WEB-INF"
> > folder or something?
>
> You should give javac a classpath or classpath ref.
>
> http://ant.apache.org/manual/CoreTasks/javac.html
> http://ant.apache.org/manual/using.html#path
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
> Don't get soaked.  Take a quick peak at the forecast
> with the Yahoo! Search weather shortcut.
> http://tools.search.yahoo.com/shortcuts/#loc_weather
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

[OT] Re: build.xml problem

Posted by Dave Newton <ne...@yahoo.com>.
--- vikas rao <vi...@gmail.com> wrote:
> <target name="build" >
>   <javac
srcdir="[...]\webapps\MyStruts\WEB-INF\classes\log"
>         
destdir="[...]\webapps\MyStruts\WEB-INF\classes\log"
>          debug="true"
>          includes="**/*.java"/>
> </target>
>
> Should i include something else with my build.xml?
> like the path to the "lib" folder inside the
"WEB-INF" 
> folder or something?

You should give javac a classpath or classpath ref.

http://ant.apache.org/manual/CoreTasks/javac.html
http://ant.apache.org/manual/using.html#path

d.



 
____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org