You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nandorov <na...@gmail.com> on 2008/10/29 18:46:27 UTC

Apache + Tomcat + Struts

Hello,
i'm newbie working with apache. i have configured the httpd.conf, added a
worker.properties to make it work with tomcat. I have the following
structure:

WebServerExtensions (this is mapguide folder)
  Apache2
  Tomcat
  www
    appfolder1
    appfolder2
    WEB-INF
       lib (here are my jars)
       web.xml

i have my app code inside www folder. (let's say appfolder1).
i wanted to add some jar configuration and struts. i have modify web.xml
mapping the tlds. I made a test with jstl and it works fine.  then i add a
struts-config.xml. my question is, in which folder should i put the .java
classes?? how do i map them? and the ApplicationResources.properties? where
should i put it? i place it in WEB-INF but the <bean:message> tag can't find
the file.

    <action-mappings>
		<action path="/sample"
			type="action.SampleAction" ( i don't know where its location )
			parameter="sample"
			name="formSample">
			<forward name="redirect" path="sample.jsp"/>
		</action>
    </action-mappings>
    
    <message-resources parameter="ApplicationResources" />
   ( where should i put the ApplicationResources.properties file? )

i'm confused because is the first time i used apache + tomcat.
help, please (:

thanks in advance
-- 
View this message in context: http://www.nabble.com/Apache-%2B-Tomcat-%2B-Struts-tp20232252p20232252.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache + Tomcat + Struts

Posted by Nandorov <na...@gmail.com>.
hi David,
thank you! it works now 

Regards,


David Smith-2 wrote:
> 
> The .java files should be compiled to .class files and either placed in
> WEB-INF/classes or put together in a jar file and placed in
> WEB-INF/lib.  If you place the compiled .class files in the class
> folder, you'll also have to create the directory structure that follows
> the package naming.  For example, if you have a class
> com.mycompany.myproject.MyClass, it would be placed like this:
> 
> WEB-INF
>     classes
>        com
>           mycompany
>              myproject
>                 MyClass.class
> 
> Tomcat will find the class automatically without any further mappings or
> other configuration.
> 
> --David
> 
> 
> Nandorov wrote:
>> Hello,
>> i'm newbie working with apache. i have configured the httpd.conf, added a
>> worker.properties to make it work with tomcat. I have the following
>> structure:
>>
>> WebServerExtensions (this is mapguide folder)
>>   Apache2
>>   Tomcat
>>   www
>>     appfolder1
>>     appfolder2
>>     WEB-INF
>>        lib (here are my jars)
>>        web.xml
>>
>> i have my app code inside www folder. (let's say appfolder1).
>> i wanted to add some jar configuration and struts. i have modify web.xml
>> mapping the tlds. I made a test with jstl and it works fine.  then i add
>> a
>> struts-config.xml. my question is, in which folder should i put the .java
>> classes?? how do i map them? and the ApplicationResources.properties?
>> where
>> should i put it? i place it in WEB-INF but the <bean:message> tag can't
>> find
>> the file.
>>
>>     <action-mappings>
>> 		<action path="/sample"
>> 			type="action.SampleAction" ( i don't know where its location )
>> 			parameter="sample"
>> 			name="formSample">
>> 			<forward name="redirect" path="sample.jsp"/>
>> 		</action>
>>     </action-mappings>
>>     
>>     <message-resources parameter="ApplicationResources" />
>>    ( where should i put the ApplicationResources.properties file? )
>>
>> i'm confused because is the first time i used apache + tomcat.
>> help, please (:
>>
>> thanks in advance
>>   
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Apache-%2B-Tomcat-%2B-Struts-tp20232252p20235888.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache + Tomcat + Struts

Posted by David Smith <dn...@cornell.edu>.
The .java files should be compiled to .class files and either placed in
WEB-INF/classes or put together in a jar file and placed in
WEB-INF/lib.  If you place the compiled .class files in the class
folder, you'll also have to create the directory structure that follows
the package naming.  For example, if you have a class
com.mycompany.myproject.MyClass, it would be placed like this:

WEB-INF
    classes
       com
          mycompany
             myproject
                MyClass.class

Tomcat will find the class automatically without any further mappings or
other configuration.

--David


Nandorov wrote:
> Hello,
> i'm newbie working with apache. i have configured the httpd.conf, added a
> worker.properties to make it work with tomcat. I have the following
> structure:
>
> WebServerExtensions (this is mapguide folder)
>   Apache2
>   Tomcat
>   www
>     appfolder1
>     appfolder2
>     WEB-INF
>        lib (here are my jars)
>        web.xml
>
> i have my app code inside www folder. (let's say appfolder1).
> i wanted to add some jar configuration and struts. i have modify web.xml
> mapping the tlds. I made a test with jstl and it works fine.  then i add a
> struts-config.xml. my question is, in which folder should i put the .java
> classes?? how do i map them? and the ApplicationResources.properties? where
> should i put it? i place it in WEB-INF but the <bean:message> tag can't find
> the file.
>
>     <action-mappings>
> 		<action path="/sample"
> 			type="action.SampleAction" ( i don't know where its location )
> 			parameter="sample"
> 			name="formSample">
> 			<forward name="redirect" path="sample.jsp"/>
> 		</action>
>     </action-mappings>
>     
>     <message-resources parameter="ApplicationResources" />
>    ( where should i put the ApplicationResources.properties file? )
>
> i'm confused because is the first time i used apache + tomcat.
> help, please (:
>
> thanks in advance
>   


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