Thanks again for all these good pratices. And I'm using JSTL v. 1.1.


Regards,


Pierre




2006/12/2, Rashmi Rubdi <[EMAIL PROTECTED]>:

>>For me, I must give the project root to the docBase attribute.
Otherwise, it
>>throws exceptions saying my taglibs are not found. Maybe it's because my
>>sourceFolder is in a sub-folder of my project root while my libFolder is
>>under /WEB-INF/libs (WEB-INF itself being under the root).


Assuming your project directory is something like this
C:\dev\projects\YourProjectName\__source for example (it can be anything).

You shouldn't get an exception for TLD if you have lib and tld folders
under WEB-INF like this:

C:\dev\projects\YourProjectName\__source\WEB-INF\lib\
jstl.jar (assuming you are using JSTL1.1 or higher)

C:\dev\projects\YourProjectName\__source\WEB-INF\tld\
(If you are using JSTL version lower than 1.1 then you need to explicitly
place the tld files here, otherwise there's no need to specify tld files
here)

C:\dev\projects\YourProjectName\__source\WEB-INF\classes\
(Your compiled class files)

And hence your project root folder is where all source files are present:
C:/dev/projects/YourProjectName/__source

<Context docBase="C:/dev/projects/YourProjectName/__source"
         privileged="false" antiResourceLocking="false"
antiJARLocking="false" crossContext="false" reloadable="true"
cachingAllowed="false">
</Context>

Note that this kind of setup is ideal for the development environment
only.

~~~~~~~~~~~~~~~

>>Yes, all is fine, except that if I undeploy my webapp for a reason or
>>another, the webapp.xml gets erased by Tomcat. Not a real concern !

You will no longer need to deploy or undeploy your application as long as
you are working on the development environment.
Manually remove projects and WAR files that are under C:\dev\apache-
tomcat-5.5.12\webapps\  (just one time)
The only time you'll need to use ANT in development environment is when
you want to compile your Java files.

Deploying and undeploying should only be reserved when deploying to
staging or production environments.

For example you can have something like for staging and production:
C:\dev\projects\YourProjectName\__source\   - This is also your project
root folder

C:\dev\projects\YourProjectName\01build\  (Optional intermediate build
files with JSPC precompile, extra white space compression etc)

C:\dev\projects\YourProjectName\02build\ (Preview of files that will be
packaged into the WAR file)

C:\dev\projects\YourProjectName\dist\YourProjectName.war (to be uploaded
to qa, staging or production environments)

Be careful not to undeploy your projects source folder, there's no need.
~~~~~~~~~~~~~~~

If you were originally deploying to Tomcat's webapps folder to see changes
in your JSPs etc, you'll need to modify your ANT script to not do this
anymore.


----- Original Message ----
From: Pierre Goupil <[EMAIL PROTECTED]>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Saturday, December 2, 2006 5:04:09 PM
Subject: Re: Quick webapp reloading [was : Is jsp designed for use by
large websites]


Hi !

Yes, it does work !! This plus my discovery of yesterday (Eclipse's
working
sets) et voila ! My productivity increases. But just three things to add :



2006/12/2, Rashmi Rubdi <[EMAIL PROTECTED]>:

Then inside the above context XML file define your context for example:
<Context docBase="C:/dev/projects/YourProjectName/__source"
        privileged="false" antiResourceLocking="false"
antiJARLocking="false" crossContext="false" reloadable="true"
cachingAllowed="false">
</Context>


For me, I must give the project root to the docBase attribute. Otherwise,
it
throws exceptions saying my taglibs are not found. Maybe it's because my
sourceFolder is in a sub-folder of my project root while my libFolder is
under /WEB-INF/libs (WEB-INF itself being under the root).


***
Now re-start Tomcat and make some changes to your JSP file and you can
simply refresh your browser to see the changes, no need to perform ANT or
other deploy to webapps to see your changes.
***

Yes, all is fine, except that if I undeploy my webapp for a reason or
another, the webapp.xml gets erased by Tomcat. Not a real concern !





***
The simplest thing to do, if all you're after is to be able to see
changes to JSPs quickly, without any compiling, redeploying, etc, is
just to put the JSP files directly in a folder in $TOMCAT_HOME/
webapps, and edit them there.

Timothy Collett
***

That's not so easy when you use Eclipse. Because of its workspaces and
all...

Anyway, thank you two from a new Tomcat / JSP user !


Regards,


Pierre Goupil






It's even simpler to simply keep your source files in your original
project
> directory independent of Tomcat
>
and simply change the Context file's docBase attribute to point to where
> your project is located.
>
> This way your project is independent of Tomcat upgrades etc, and all
> project files are outside Tomcat.
>
> ----- Original Message ----
> From: Timothy Collett <[EMAIL PROTECTED]>
> To: Tomcat Users List <users@tomcat.apache.org>
> Sent: Saturday, December 2, 2006 4:09:48 PM
> Subject: Re: Quick webapp reloading [was : Is jsp designed for use by
> large websites]
>
>
> The simplest thing to do, if all you're after is to be able to see
> changes to JSPs quickly, without any compiling, redeploying, etc, is
> just to put the JSP files directly in a folder in $TOMCAT_HOME/
> webapps, and edit them there.
>
> Timothy Collett
>
> --
>
> No man is justified in doing evil on the ground of expediency.
>   - Theodore Roosevelt
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
"L'une des raisons pour lesquelles la vie est complexe
C'est qu'elle a une partie réelle et une partie imaginaire."




____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
"L'une des raisons pour lesquelles la vie est complexe
C'est qu'elle a une partie réelle et une partie imaginaire."

Reply via email to