You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stefano Tranquillini <st...@gmail.com> on 2009/11/27 20:36:35 UTC

Deploy a .class file when tomcat is running

Hi all.
i've a question for you.

i made a web project and i deployed it into tomcat. now, i've a ant script
that compile and put the .class file into the WEB-INF of the project (the
place where the .class must be).
How can i tell to tomcat that i've upload new files? becasue somethimes the
file that are present in the folder are not accessible via url?
is like that tomcat dosen't realize that new files are present.

idea about that?
thanks in advance.

-- 
Stefano

Re: Deploy a .class file when tomcat is running

Posted by Stefano Tranquillini <st...@gmail.com>.
I solved, or better the problem did not exists.

i've a .class that are rest in jsr311 (annotation for rest).

there's a Servlet that parse these class, so i've only to put the .class
into a floder and all is ok.

thanks

On Sat, Nov 28, 2009 at 13:22, Pid <pi...@pidster.com> wrote:

> On 28/11/2009 12:06, André Warnier wrote:
>
>> Stefano Tranquillini wrote:
>>
>>> the tomcat is 6.0 under linux (ubuntu) but the OS is not mandatory.
>>>
>>
>> It often is, such as for example when you want information about the
>> correct paths for things. Providing some minimal information together
>> with your question saves the time of people on this list to ask you for
>> it, which also helps you to get better and faster responses.
>>
>>
>>> the solution is to deploy and undploy the whole project?
>>>
>>> i'd to remove and copy the .war each time?
>>>
>>
>>
>> http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#Deploying%20on%20a%20running%20Tomcat%20server
>>
>>
>> What part of the above section do you not understand ?
>> What option have you tried ?
>>
>
> N.B.  Java != PHP
>
> You can't just drop files into a Servlet Container and expect them to run
> like a PHP script does.  A Servlet, for example, requires* an entry in
> web.xml for Tomcat to know what to do with it.
>
>
> p
>
>
> * Unless you're doing something very, very old school, risky security wise
> and much frowned upon.
>
>
>  ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Stefano

Re: Deploy a .class file when tomcat is running

Posted by Pid <pi...@pidster.com>.
On 28/11/2009 12:06, André Warnier wrote:
> Stefano Tranquillini wrote:
>> the tomcat is 6.0 under linux (ubuntu) but the OS is not mandatory.
>
> It often is, such as for example when you want information about the
> correct paths for things. Providing some minimal information together
> with your question saves the time of people on this list to ask you for
> it, which also helps you to get better and faster responses.
>
>>
>> the solution is to deploy and undploy the whole project?
>>
>> i'd to remove and copy the .war each time?
>
> http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#Deploying%20on%20a%20running%20Tomcat%20server
>
>
> What part of the above section do you not understand ?
> What option have you tried ?

N.B.  Java != PHP

You can't just drop files into a Servlet Container and expect them to 
run like a PHP script does.  A Servlet, for example, requires* an entry 
in web.xml for Tomcat to know what to do with it.


p


* Unless you're doing something very, very old school, risky security 
wise and much frowned upon.

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


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


Re: Deploy a .class file when tomcat is running

Posted by André Warnier <aw...@ice-sa.com>.
Stefano Tranquillini wrote:
> the tomcat is 6.0 under linux (ubuntu) but the OS is not mandatory.

It often is, such as for example when you want information about the 
correct paths for things. Providing some minimal information together 
with your question saves the time of people on this list to ask you for 
it, which also helps you to get better and faster responses.

> 
> the solution is to deploy and undploy the whole project?
> 
> i'd to remove and copy the .war each time?

http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#Deploying%20on%20a%20running%20Tomcat%20server

What part of the above section do you not understand ?
What option have you tried ?

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


Re: Deploy a .class file when tomcat is running

Posted by Stefano Tranquillini <st...@gmail.com>.
the tomcat is 6.0 under linux (ubuntu) but the OS is not mandatory.

the solution is to deploy and undploy the whole project?

i'd to remove and copy the .war each time?

thanks

On Fri, Nov 27, 2009 at 20:43, André Warnier <aw...@ice-sa.com> wrote:

> Stefano Tranquillini wrote:
>
>> Hi all.
>> i've a question for you.
>>
>> i made a web project and i deployed it into tomcat. now, i've a ant script
>> that compile and put the .class file into the WEB-INF of the project (the
>> place where the .class must be).
>>
>
> Did you try WEB-INF/classes/ ?
>
>
>  How can i tell to tomcat that i've upload new files? becasue somethimes
>> the
>> file that are present in the folder are not accessible via url?
>> is like that tomcat dosen't realize that new files are present.
>>
>>
> The on-line Tomcat documentation may provide some info about that, like at
> http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html
>
>
> It is also always a good idea to mention trivial info such as the version
> of Tomcat you are using, where you got it from, what platform you are
> running it under, that kind of thing.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Stefano

Re: Deploy a .class file when tomcat is running

Posted by André Warnier <aw...@ice-sa.com>.
Stefano Tranquillini wrote:
> Hi all.
> i've a question for you.
> 
> i made a web project and i deployed it into tomcat. now, i've a ant script
> that compile and put the .class file into the WEB-INF of the project (the
> place where the .class must be).

Did you try WEB-INF/classes/ ?

> How can i tell to tomcat that i've upload new files? becasue somethimes the
> file that are present in the folder are not accessible via url?
> is like that tomcat dosen't realize that new files are present.
> 

The on-line Tomcat documentation may provide some info about that, like at
http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html


It is also always a good idea to mention trivial info such as the 
version of Tomcat you are using, where you got it from, what platform 
you are running it under, that kind of thing.


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


Re: Deploy a .class file when tomcat is running

Posted by ramzi khlil <ra...@gmail.com>.
I suggest you to create a task that undeploy the and deploy it again.
Or from your manager reload the application.

On Fri, Nov 27, 2009 at 2:36 PM, Stefano Tranquillini <
stefano.tranquillini@gmail.com> wrote:

> Hi all.
> i've a question for you.
>
> i made a web project and i deployed it into tomcat. now, i've a ant script
> that compile and put the .class file into the WEB-INF of the project (the
> place where the .class must be).
> How can i tell to tomcat that i've upload new files? becasue somethimes the
> file that are present in the folder are not accessible via url?
> is like that tomcat dosen't realize that new files are present.
>
> idea about that?
> thanks in advance.
>
> --
> Stefano
>