You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Aydın Toprak <ay...@intengo.com> on 2005/12/01 15:47:50 UTC

Deploying Servlet Project from Windows to Fedora

Hii,

I have developed web based project that covers many servlets and uses 
Postgresql dataBase, on ;Windows platform...
But I want to deploy the software to the Linux (Fedora Core 4  64) .. 
However I havent been able to deploy the compleate project correctly 
under the linux enviroment..

Tomcat cant find my servlets and so do nothing...
Should I modify the web.xml file of my own .. or  do something different 
? ..

I am looking for some clear descriptions  or an accurate documentation 
to do it...

thanks....

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


Re: Deploying Servlet Project from Windows to Fedora

Posted by David Delbecq <de...@oma.be>.
Hi,

The main difference between windows and linux for you is at the filesystem 
level i think. Check twice the configuration of your servlets in web.xml and 
the files in your war for uppercase/lower case mistakes. I may be you renamed 
at some point myServlet.java to MyServlet.java but never cleared the .class 
so you end up with a myServlet.class in your war, which is extracted by 
tomcat (tomcat always extract .war, it does not access it directly) as 
myServlet.class and when it later tries to load the class MyServlet using 
file MyServlet.class, it's not a problem in windows (myServlet.class is 
opened and contains the MyServlet class) but it is on linux (Myservlet.class 
is not the same as myServlet.class).
The uppercase/lowercase problem might also be in having a directory named 
WEB-INF/CLASSES or web-inf/classes instead of WEB-INF/classes

This is just a suggestion, but it may be the most obvious problem.

Also, the error messages from tomcat might be usefull to find the problem :p

regards
Le Jeudi 1 Décembre 2005 15:47, Aydın Toprak a écrit :
> Hii,
> 
> I have developed web based project that covers many servlets and uses 
> Postgresql dataBase, on ;Windows platform...
> But I want to deploy the software to the Linux (Fedora Core 4  64) .. 
> However I havent been able to deploy the compleate project correctly 
> under the linux enviroment..
> 
> Tomcat cant find my servlets and so do nothing...
> Should I modify the web.xml file of my own .. or  do something different 
> ? ..
> 
> I am looking for some clear descriptions  or an accurate documentation 
> to do it...
> 
> thanks....
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Pingouins dans les champs, hiver méchant

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


Re: Deploying Servlet Project from Windows to Fedora

Posted by David Smith <dn...@cornell.edu>.
Check your webapp folder structure to be  sure it has the proper case.  
You should see this structure and exact naming including upper/lower case:

/WEB-INF
    /classes
        /manager
            /LoginManagerServletV2.class
    /lib
        ...jars here....

Windows may be forgiving on this point, but Linux isn't.  32 vs. 64 bit 
won't make a difference.  Also take a look at your catalina.out and 
other log files for exceptions during startup/deployment.  They can 
point you in the right direction.

--David

Aydın Toprak wrote:

> but The system works fine under Windows ... I mean as an example ...
> this is my servlet name : LoginManagerServletV2.java
> and the the web.xml lines for this servlet :
>
>  <servlet>
>        <servlet-name>LoginManagerServletV2</servlet-name>
>        <display-name>Login ManagerV2</display-name>
>        <description>Manager for the manager action</description>
>        <servlet-class>manager.LoginManagerServletV2</servlet-class>
>    </servlet>
>
> <servlet-mapping>
>        <servlet-name>LoginManagerServletV2</servlet-name>
>        <url-pattern>/login</url-pattern>
> </servlet-mapping>
>
>
> this tricky definiton of servlet runs fine under XP ... how ever the 
> same lines are not enough for to tell the linux-tomcat couple to find 
> & use it ...
>
>
> And there is another point that comes in my mind at the moment...
>
> The windows platform is 32 bit ... and of course the J2EE and Jre are 
> both 32bit...
> but the server side, Fedora is 64 bit... also the JRE ...
>
> dose it make a problem ... ?
>
>
>
>
> Richard Mixon wrote:
>
>> Aydin,
>>
>> I do not have reference for any such documentation. However in the 
>> past I
>> have been bit badly a number of times trying to move a web 
>> application from
>> Windows to Linux. The other way around works much more reliable.
>>
>> The two issues that resolved my problem always ended up being:
>>
>> 1) Case sensitivity of file names. Windows will treat "/myApp" the 
>> same as
>> "/myapp" the same - so if you have been inconsistent in how you 
>> referred to
>> a file/path name this could be an issue with a "servlet not found" 
>> problem.
>>
>> 2) Line endings of text files - in SOME situations. Sometimes it does 
>> not
>> seem to matter, but to be sure I would recomment either running the
>> "dos2unix" utility against all of your text files (XML, JSP, HTML, 
>> etc) or
>> you can use the equivalent Ant task in your build process, something 
>> like:
>>        <fixcrlf srcdir="src-gen/web/WEB-INF/classes"
>>                   includes="ApplicationResources_handCoded.properties"
>>                    eol="lf"
>>                    eof="remove"/>
>>
>> Hope this helps -Richard
>>
>>  
>>
>>> -----Original Message-----
>>> From: Aydın Toprak [mailto:aydin.toprak@intengo.com] Sent: Thursday, 
>>> December 01, 2005 7:48 AM
>>> To: users@tomcat.apache.org
>>> Subject: Deploying Servlet Project from Windows to Fedora
>>>
>>> Hii,
>>>
>>> I have developed web based project that covers many servlets and 
>>> uses Postgresql dataBase, on ;Windows platform...
>>> But I want to deploy the software to the Linux (Fedora Core 4  64) 
>>> .. However I havent been able to deploy the compleate project 
>>> correctly under the linux enviroment..
>>>
>>> Tomcat cant find my servlets and so do nothing...
>>> Should I modify the web.xml file of my own .. or  do something 
>>> different ? ..
>>>
>>> I am looking for some clear descriptions  or an accurate 
>>> documentation to do it...
>>>
>>> thanks....
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>>  
>>
>
>
> ---------------------------------------------------------------------
> 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: Deploying Servlet Project from Windows to Fedora

Posted by Aydın Toprak <ay...@intengo.com>.
hiii..
I have tried some different configuraitons but neither of them worked....

 I understand a tricky diffrence of the error mesaages that I have given 
from tomcat ..

the first one is

exception :
javax.servlet.servletexception : Error *instantiating servlet class*
                                                                         
                                                               //The 
Correct one (I belive the correct mapping  and tomcat fins it ..)....
root couse :
java.lang*.noclassdeffounderrror* : *while resolving class* : manager.lol


and the other one is :
exception :
javax.servlet.servletexception . Wrapper can not find class abc.manager.lol
                                                                                                                                            
//There is no possiblity of finding that class becouse itint exist 
(abc.manager.lol)
root couse:
java.lang.*ClassNotfoundException *: Class not found


as far as I understood tomcat can find the class (the first one), 
however cant really accept the class and use it...






Richard Mixon wrote:

>Aydin,
>
>The snipped from your web.xml does not prove anything. You need to carefully
>compre the web.xml entries versus the actual filename of the class file and
>to any references to the servlet from a JSP/HTML page.
>
>And you also need to make sure the CRLF line endings are properly adjusted.
>
>When you have done that, report back and maybe we can help some more.
>
>- Richard
>
>  
>
>>-----Original Message-----
>>From: Aydın Toprak [mailto:aydin.toprak@intengo.com] 
>>Sent: Thursday, December 01, 2005 8:29 AM
>>To: Tomcat Users List
>>Subject: Re: Deploying Servlet Project from Windows to Fedora
>>
>>but The system works fine under Windows ... I mean as an example ...
>>this is my servlet name : LoginManagerServletV2.java and the 
>>the web.xml lines for this servlet :
>>
>>  <servlet>
>>        <servlet-name>LoginManagerServletV2</servlet-name>
>>        <display-name>Login ManagerV2</display-name>
>>        <description>Manager for the manager action</description>
>>        <servlet-class>manager.LoginManagerServletV2</servlet-class>
>>    </servlet>
>>
>><servlet-mapping>
>>        <servlet-name>LoginManagerServletV2</servlet-name>
>>        <url-pattern>/login</url-pattern>  </servlet-mapping>
>>
>>
>>this tricky definiton of servlet runs fine under XP ... how 
>>ever the same lines are not enough for to tell the 
>>linux-tomcat couple to find & use it ...
>>
>>
>>And there is another point that comes in my mind at the moment...
>>
>>The windows platform is 32 bit ... and of course the J2EE and 
>>Jre are both 32bit...
>>but the server side, Fedora is 64 bit... also the JRE ...
>>
>>dose it make a problem ... ?
>>
>>
>>
>>
>>Richard Mixon wrote:
>>
>>    
>>
>>>Aydin,
>>>
>>>I do not have reference for any such documentation. However 
>>>      
>>>
>>in the past 
>>    
>>
>>>I have been bit badly a number of times trying to move a web 
>>>application from Windows to Linux. The other way around 
>>>      
>>>
>>works much more reliable.
>>    
>>
>>>The two issues that resolved my problem always ended up being:
>>>
>>>1) Case sensitivity of file names. Windows will treat 
>>>      
>>>
>>"/myApp" the same 
>>    
>>
>>>as "/myapp" the same - so if you have been inconsistent in how you 
>>>referred to a file/path name this could be an issue with a 
>>>      
>>>
>>"servlet not found" problem.
>>    
>>
>>>2) Line endings of text files - in SOME situations. 
>>>      
>>>
>>Sometimes it does 
>>    
>>
>>>not seem to matter, but to be sure I would recomment either 
>>>      
>>>
>>running the 
>>    
>>
>>>"dos2unix" utility against all of your text files (XML, JSP, 
>>>      
>>>
>>HTML, etc) 
>>    
>>
>>>or you can use the equivalent Ant task in your build 
>>>      
>>>
>>process, something like:
>>    
>>
>>>       <fixcrlf srcdir="src-gen/web/WEB-INF/classes"
>>>	              
>>>      
>>>
>>includes="ApplicationResources_handCoded.properties"
>>    
>>
>>>                   eol="lf"
>>>                   eof="remove"/>
>>>
>>>Hope this helps -Richard
>>>
>>> 
>>>
>>>      
>>>
>>>>-----Original Message-----
>>>>From: Aydın Toprak [mailto:aydin.toprak@intengo.com]
>>>>Sent: Thursday, December 01, 2005 7:48 AM
>>>>To: users@tomcat.apache.org
>>>>Subject: Deploying Servlet Project from Windows to Fedora
>>>>
>>>>Hii,
>>>>
>>>>I have developed web based project that covers many 
>>>>        
>>>>
>>servlets and uses 
>>    
>>
>>>>Postgresql dataBase, on ;Windows platform...
>>>>But I want to deploy the software to the Linux (Fedora Core 
>>>>        
>>>>
>>4  64) .. 
>>    
>>
>>>>However I havent been able to deploy the compleate project 
>>>>        
>>>>
>>correctly 
>>    
>>
>>>>under the linux enviroment..
>>>>
>>>>Tomcat cant find my servlets and so do nothing...
>>>>Should I modify the web.xml file of my own .. or  do something 
>>>>different ? ..
>>>>
>>>>I am looking for some clear descriptions  or an accurate 
>>>>        
>>>>
>>documentation 
>>    
>>
>>>>to do it...
>>>>
>>>>thanks....
>>>>
>>>>------------------------------------------------------------
>>>>        
>>>>
>>---------
>>    
>>
>>>>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
>>>
>>>
>>>
>>> 
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>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
>
>
>
>  
>


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


RE: Deploying Servlet Project from Windows to Fedora

Posted by Richard Mixon <rn...@qwest.net>.
Aydin,

The snipped from your web.xml does not prove anything. You need to carefully
compre the web.xml entries versus the actual filename of the class file and
to any references to the servlet from a JSP/HTML page.

And you also need to make sure the CRLF line endings are properly adjusted.

When you have done that, report back and maybe we can help some more.

- Richard

> -----Original Message-----
> From: Aydın Toprak [mailto:aydin.toprak@intengo.com] 
> Sent: Thursday, December 01, 2005 8:29 AM
> To: Tomcat Users List
> Subject: Re: Deploying Servlet Project from Windows to Fedora
> 
> but The system works fine under Windows ... I mean as an example ...
> this is my servlet name : LoginManagerServletV2.java and the 
> the web.xml lines for this servlet :
> 
>   <servlet>
>         <servlet-name>LoginManagerServletV2</servlet-name>
>         <display-name>Login ManagerV2</display-name>
>         <description>Manager for the manager action</description>
>         <servlet-class>manager.LoginManagerServletV2</servlet-class>
>     </servlet>
> 
> <servlet-mapping>
>         <servlet-name>LoginManagerServletV2</servlet-name>
>         <url-pattern>/login</url-pattern>  </servlet-mapping>
> 
> 
> this tricky definiton of servlet runs fine under XP ... how 
> ever the same lines are not enough for to tell the 
> linux-tomcat couple to find & use it ...
> 
> 
> And there is another point that comes in my mind at the moment...
> 
> The windows platform is 32 bit ... and of course the J2EE and 
> Jre are both 32bit...
> but the server side, Fedora is 64 bit... also the JRE ...
> 
> dose it make a problem ... ?
> 
> 
> 
> 
> Richard Mixon wrote:
> 
> >Aydin,
> >
> >I do not have reference for any such documentation. However 
> in the past 
> >I have been bit badly a number of times trying to move a web 
> >application from Windows to Linux. The other way around 
> works much more reliable.
> >
> >The two issues that resolved my problem always ended up being:
> >
> >1) Case sensitivity of file names. Windows will treat 
> "/myApp" the same 
> >as "/myapp" the same - so if you have been inconsistent in how you 
> >referred to a file/path name this could be an issue with a 
> "servlet not found" problem.
> >
> >2) Line endings of text files - in SOME situations. 
> Sometimes it does 
> >not seem to matter, but to be sure I would recomment either 
> running the 
> >"dos2unix" utility against all of your text files (XML, JSP, 
> HTML, etc) 
> >or you can use the equivalent Ant task in your build 
> process, something like:
> >        <fixcrlf srcdir="src-gen/web/WEB-INF/classes"
> >	              
> includes="ApplicationResources_handCoded.properties"
> >                    eol="lf"
> >                    eof="remove"/>
> >
> >Hope this helps -Richard
> >
> >  
> >
> >>-----Original Message-----
> >>From: Aydın Toprak [mailto:aydin.toprak@intengo.com]
> >>Sent: Thursday, December 01, 2005 7:48 AM
> >>To: users@tomcat.apache.org
> >>Subject: Deploying Servlet Project from Windows to Fedora
> >>
> >>Hii,
> >>
> >>I have developed web based project that covers many 
> servlets and uses 
> >>Postgresql dataBase, on ;Windows platform...
> >>But I want to deploy the software to the Linux (Fedora Core 
> 4  64) .. 
> >>However I havent been able to deploy the compleate project 
> correctly 
> >>under the linux enviroment..
> >>
> >>Tomcat cant find my servlets and so do nothing...
> >>Should I modify the web.xml file of my own .. or  do something 
> >>different ? ..
> >>
> >>I am looking for some clear descriptions  or an accurate 
> documentation 
> >>to do it...
> >>
> >>thanks....
> >>
> >>------------------------------------------------------------
> ---------
> >>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
> >
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> 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: Deploying Servlet Project from Windows to Fedora

Posted by Aydın Toprak <ay...@intengo.com>.
but The system works fine under Windows ... I mean as an example ...
this is my servlet name : LoginManagerServletV2.java
and the the web.xml lines for this servlet :

  <servlet>
        <servlet-name>LoginManagerServletV2</servlet-name>
        <display-name>Login ManagerV2</display-name>
        <description>Manager for the manager action</description>
        <servlet-class>manager.LoginManagerServletV2</servlet-class>
    </servlet>

<servlet-mapping>
        <servlet-name>LoginManagerServletV2</servlet-name>
        <url-pattern>/login</url-pattern>
 </servlet-mapping>


this tricky definiton of servlet runs fine under XP ... how ever the 
same lines are not enough for to tell the linux-tomcat couple to find & 
use it ...


And there is another point that comes in my mind at the moment...

The windows platform is 32 bit ... and of course the J2EE and Jre are 
both 32bit...
but the server side, Fedora is 64 bit... also the JRE ...

dose it make a problem ... ?




Richard Mixon wrote:

>Aydin,
>
>I do not have reference for any such documentation. However in the past I
>have been bit badly a number of times trying to move a web application from
>Windows to Linux. The other way around works much more reliable.
>
>The two issues that resolved my problem always ended up being:
>
>1) Case sensitivity of file names. Windows will treat "/myApp" the same as
>"/myapp" the same - so if you have been inconsistent in how you referred to
>a file/path name this could be an issue with a "servlet not found" problem.
>
>2) Line endings of text files - in SOME situations. Sometimes it does not
>seem to matter, but to be sure I would recomment either running the
>"dos2unix" utility against all of your text files (XML, JSP, HTML, etc) or
>you can use the equivalent Ant task in your build process, something like:
>        <fixcrlf srcdir="src-gen/web/WEB-INF/classes"
>	              includes="ApplicationResources_handCoded.properties"
>                    eol="lf"
>                    eof="remove"/>
>
>Hope this helps -Richard
>
>  
>
>>-----Original Message-----
>>From: Aydın Toprak [mailto:aydin.toprak@intengo.com] 
>>Sent: Thursday, December 01, 2005 7:48 AM
>>To: users@tomcat.apache.org
>>Subject: Deploying Servlet Project from Windows to Fedora
>>
>>Hii,
>>
>>I have developed web based project that covers many servlets 
>>and uses Postgresql dataBase, on ;Windows platform...
>>But I want to deploy the software to the Linux (Fedora Core 4  64) .. 
>>However I havent been able to deploy the compleate project 
>>correctly under the linux enviroment..
>>
>>Tomcat cant find my servlets and so do nothing...
>>Should I modify the web.xml file of my own .. or  do 
>>something different ? ..
>>
>>I am looking for some clear descriptions  or an accurate 
>>documentation to do it...
>>
>>thanks....
>>
>>---------------------------------------------------------------------
>>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
>
>
>
>  
>


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


RE: Deploying Servlet Project from Windows to Fedora

Posted by Richard Mixon <rn...@qwest.net>.
Aydin,

I do not have reference for any such documentation. However in the past I
have been bit badly a number of times trying to move a web application from
Windows to Linux. The other way around works much more reliable.

The two issues that resolved my problem always ended up being:

1) Case sensitivity of file names. Windows will treat "/myApp" the same as
"/myapp" the same - so if you have been inconsistent in how you referred to
a file/path name this could be an issue with a "servlet not found" problem.

2) Line endings of text files - in SOME situations. Sometimes it does not
seem to matter, but to be sure I would recomment either running the
"dos2unix" utility against all of your text files (XML, JSP, HTML, etc) or
you can use the equivalent Ant task in your build process, something like:
        <fixcrlf srcdir="src-gen/web/WEB-INF/classes"
	              includes="ApplicationResources_handCoded.properties"
                    eol="lf"
                    eof="remove"/>

Hope this helps -Richard

> -----Original Message-----
> From: Aydın Toprak [mailto:aydin.toprak@intengo.com] 
> Sent: Thursday, December 01, 2005 7:48 AM
> To: users@tomcat.apache.org
> Subject: Deploying Servlet Project from Windows to Fedora
> 
> Hii,
> 
> I have developed web based project that covers many servlets 
> and uses Postgresql dataBase, on ;Windows platform...
> But I want to deploy the software to the Linux (Fedora Core 4  64) .. 
> However I havent been able to deploy the compleate project 
> correctly under the linux enviroment..
> 
> Tomcat cant find my servlets and so do nothing...
> Should I modify the web.xml file of my own .. or  do 
> something different ? ..
> 
> I am looking for some clear descriptions  or an accurate 
> documentation to do it...
> 
> thanks....
> 
> ---------------------------------------------------------------------
> 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