Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
davout
Post subject: Newbie - deploying to test server with different config file  PostPosted: Jun 10, 2010 - 02:06 PM
Registered Member
Registered Member


Joined: Feb 09, 2004
Posts: 81

As a relative newcomer to Java web app development I'm hoping that somebody can help me with some idiot level instructions on how to deploy a web app from my development PC to a test server.

This is a Spring based web app, and I've extracted all the machine specific settings into a discrete 'environ.properties' file. Currently I'm running this web app against the MyEclipse Tomcat server.

When I deploy my web app to the test server I want to have a different version of the 'environ.properties' file that holds settings specific to the test server. How can I achieve this?

TIA.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-joy
Post subject: RE: Newbie - deploying to test server with different config  PostPosted: Jun 11, 2010 - 05:29 AM
Registered Member
Registered Member


Joined: Feb 03, 2009
Posts: 3242

davout,

I would recommend you go through sample tutorials and whitepapers here - http://www.myeclipseide.com/module-htmlpages-display-pid-7.html
Also take a look at http://www.myeclipseide.com/documentation/quickstarts/webprojects/ - An introduction to creating, editing, deploying, running and testing web applications in MyEclipse.

MyEclipse also comes with Examples on Demand - these are sample projects created for new users. To access open MyElipse IDE, from menu options click on MyEclipse > Examples on Demand. This will open the Examples on Demand browser. Click on [install project] to checkout any EOD to your project explorer. Please refer README.txt which includes information on the sample EOD and steps to run.

_________________
Joy
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
davout
Post subject: RE: Newbie - deploying to test server with different config  PostPosted: Jun 18, 2010 - 04:07 PM
Registered Member
Registered Member


Joined: Feb 09, 2004
Posts: 81

Sorry, but I don't see anything in the two tutorials you suggested that covers the problem I have described.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-joy
Post subject: RE: Newbie - deploying to test server with different config  PostPosted: Jun 21, 2010 - 09:20 AM
Registered Member
Registered Member


Joined: Feb 03, 2009
Posts: 3242

davout,

What is the test server you are referring to? Is it configured within MyEclipse or outside MyEclipse?
Quote:

This is a Spring based web app, and I've extracted all the machine specific settings into a discrete 'environ.properties' file. Currently I'm running this web app against the MyEclipse Tomcat server.

When I deploy my web app to the test server I want to have a different version of the 'environ.properties' file that holds settings specific to the test server. How can I achieve this?

Can you elaborate on what this environ.properties contain? And where have you included it? Can you attach either a screenshot or copy-paste the contents here?

_________________
Joy
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
davout
Post subject:   PostPosted: Aug 06, 2010 - 06:39 PM
Registered Member
Registered Member


Joined: Feb 09, 2004
Posts: 81

My 'environ.properties' file includes a number of machine specific settings like..

Code:

site.url=http://localhost:8080/skap/
mail.sender.host=smtp.dsl.pipex.com
mail.sender.port=25
mail.sender.username=davout@dsl.pipex.com
mail.sender.from=davout@dsl.pipex.com
database.url=jdbc:mysql://localhost:3306/skap
database.uid=root
database.pwd=root


In my Spring context file I use the property place holder configurer bean to push these machine specific settings into various bean properties, like...

Code:

   <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      <property name="locations">
         <value>classpath:environ.properties</value>
      </property>
   </bean>

   <bean id="EnvironManager" class="com.eis.environ.EnvironManager">
      <property name="siteURL" value="${site.url}" />
      <property name="mailSenderFrom" value="${mail.sender.from}" />
   </bean>

   <bean id="MailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
      <property name="host" value="${mail.sender.host}"/>
      <property name="port" value="${mail.sender.port}"/>
      <property name="username" value="${mail.sender.username}"/>
      <property name="password" value="${mail.sender.password}"/>
   </bean>



In order to deploy my test app from my local development test machine to a test server I want to deploy the code with a different 'environ.properties' file that reflects the settings for th e test server. Want I like to do is have another WAR I can build that uses all the development project resources but with its own local environ.properties' file version.

Geddit?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
davout
Post subject: Re: RE: Newbie - deploying to test server with different con  PostPosted: Aug 12, 2010 - 06:30 AM
Registered Member
Registered Member


Joined: Feb 09, 2004
Posts: 81

Well???
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
davout
Post subject: RE: Re: RE: Newbie - deploying to test server with different  PostPosted: Aug 24, 2010 - 12:53 PM
Registered Member
Registered Member


Joined: Feb 09, 2004
Posts: 81

I posted the same question on the SpringSource support forums, and received a reply that suggested that I exlude my properties file from the build process, and instead include this as a separate deliverable.

It's a clever idea but I'm not sure if this will work when running my app inside the MyEclipse IDE and have the source/binaries copied to the MyEclipse Tomcat server at run time. How would I...
* Exclude the environ.properties file from the build process
* Separately copy the environ.properties file to the MyEclipse Tomcat server

Whether this works or not, I think your product still has a functional limitation in not offering the deployment of web apps to other remote servers.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits