-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To whom it may concern,

On 2/26/16 2:07 PM, gmc filter wrote:
> Chris, I am specifically trying to avoid rebuilding the project
> each time I make small changes in jsp/html/whatever files, if that
> is what you are suggesting. Now that you mention this, I doubt any
> maven plugin can achieve what I'm trying to do either.

This is one of my big problems with Maven: it doesn't seem to really
be geared towards /development/. I'm sure it's great for end-to-end
builds, but for a simple "update my local deployment with that
2-character change I just did" doesn't seem to be on the menu.

> That did give me an idea though. I suppose I could write a script
> which simply overwrites the deployed file with a copy from my
> workspace... I would have to run this script each time I want to
> review my changes, which is disappointing, but I guess it will work
> for now.

For me, ant is integrated into my IDE. When I want to publish changes
to my locally-running dev environment, I just click a button and it's
done in a few ms. Tomcat reloads the resource and I'm good to go.

- -chris

> On Fri, Feb 26, 2016 at 12:38 PM, Christopher Schultz < 
> ch...@christopherschultz.net> wrote:
> 
>> To whom it may concern,
>> 
>> On 2/26/16 11:53 AM, gmc filter wrote:
>>> I am currently using Maven to build my project and compile it
>>> into a WAR file.
>>> 
>>> Does Maven have some plugin that can help me achieve what I am
>>> trying to
>> do?
>> 
>> If Maven doesn't know how to copy one file from one place to
>> another, I'm still comfortable with my decision to completely
>> ignore its existence as a build tool.
>> 
>> With ant, it's as simple as (paraphrasing):
>> 
>> <copy toDir="${deploy.dir}"> <fileset dir="${jsp.source.dir}"
>> includes="**/*.jsp" /> </copy>
>> 
>> -chris
>> 
>>> On Fri, Feb 26, 2016 at 10:34 AM, Christopher Schultz < 
>>> ch...@christopherschultz.net> wrote:
>>> 
>>>> To whom it may concern,
>>>> 
>>>> On 2/25/16 4:08 PM, gmc filter wrote:
>>>>> Hi all, I'm having some trouble with tomcat and symbolic
>>>>> links. I am working
>> with
>>>>> OSX and I use a local instance of Tomcat to do some testing
>>>>> before deploying my site elsewhere.
>>>>> 
>>>>> What I want to do: I'd like to create a small script which
>>>>> will stop tomcat, clear out old deployment folders, rebuild
>>>>> my project, copy the resulting WAR file to the webapps
>>>>> folder, restart tomcat, wait for deployment to finish, and
>>>>> finally replace a JSP file with a symbolic
>> link
>>>>> to the corresponding file that is in my workspace.
>>>>> 
>>>>> Why I want to do this: I'd like to be able to quickly
>>>>> rebuild and
>>>> redeploy
>>>>> my WAR and also edit my JSP files and see those changes by
>>>>> simply refreshing the already-open page.
>>>>> 
>>>>> My problem: I have all of the above steps working so far.
>>>>> However, as
>>>> soon
>>>>> as I swap out the real index.JSP with a link to the one in
>>>>> my
>> workspace,
>>>> I
>>>>> can no longer load the page, I get a 404 error instead.
>>>>> 
>>>>> What I have tried: I have found questions like mine asked
>>>>> many times
>> and
>>>>> usually the solution is to hunt down a "context.xml" file
>>>>> and add a tag into that file, 'allowLinking="true"'. I have
>>>>> tried to add this tag
>> into
>>>>> "<tomcat home>/libexec/conf/context.xml", "<tomcat 
>>>>> home>/libexec/conf/Catalina/localhost/context.xml" (created
>>>>> this one)
>> and
>>>>> also "<tomcat
>>>>> home>/libexec/webapps/appname/META-INF/context.xml".
>> After
>>>>> multiple restarts, none of those seem to change any
>>>>> functionality that
>> I
>>>>> can see.
>>>>> 
>>>>> By trial and error, I have eventually found that if I
>>>>> follow these
>>>> steps, I
>>>>> can get the link to work for a little while... Deploy the
>>>>> WAR Load the page (It works) Move index_bs.jsp to
>>>>> index_bs.jsp.bak (in the webapp directory) Load the page
>>>>> (404, as expected) Create a symbolic link from index_bs.jsp
>>>>> to index_bs.jsp.bak Load the page (It works!) Edit
>>>>> index_bs.jsp.bak, save Load the page (404 again)
>>>>> 
>>>>> This seems very strange to me. Obviously I've reached a
>>>>> point where symbolic linking works somewhat, but as soon as
>>>>> I edit the original
>> file
>>>>> (my main goal here) the link stops working as expected.
>>>>> Does anyone
>> know
>>>>> what I'm doing wrong here? I must be missing something...
>>>>> 
>>>>> 
>>>>> Some information about my setup: OSX 10.10.5 Tomcat 8.0.28
>>>>> installed with my username running brew brew to 
>>>>> "/usr/local/Cellar/tomcat/8.0.28/"
>>>>> 
>>>> 
>> "/usr/local/Cellar/tomcat/8.0.28/libexec/webapps/hue-web-1.0-SNAPSHOT
.war"
>>>>>
>> 
deployed successfully to
>>>>> "/usr/local/Cellar/tomcat/8.0.28/libexec/webapps/hue-web-1.0-SNAPS
HOT/"
>>>>>
>>>>> 
Target file is
>>>>> "/Users/uid/mygithub/hue-stuff/hue-web/src/main/webapp/index_bs.js
p"
>>>>
>>>>
>>>>> 
If you need an IDE-independent build process (which I highly recommend),
>>>> consider something like Apache ant (similar to UNIX "make"
>>>> but way better for the Java world) or even Maven, if you
>>>> don't mind the
>> overhead.
>>>> 
>>>> Using symlinks with Tomcat is sometimes problematic, though I
>>>> can't explain why it's actually failing for your specific
>>>> case... I would have expected that to work.
>>>> 
>>>> -chris
>>>> 
>>>> -------------------------------------------------------------------
- --
>>>>
>>>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>>> For additional commands, e-mail:
>>>> users-h...@tomcat.apache.org
>>>> 
>>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlbQtzkACgkQ9CaO5/Lv0PCCZwCdFLAC/5LgaWT2wt3pzArTBzuf
lCgAnitsl8PjRb8r6Ey+2PBSqhXiNooE
=I1cv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to