- This topic has 6 replies, 2 voices, and was last updated 14 years, 9 months ago by
davout.
-
AuthorPosts
-
davoutParticipantAs 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.
support-joyMemberdavout,
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.
davoutParticipantSorry, but I don’t see anything in the two tutorials you suggested that covers the problem I have described.
support-joyMemberdavout,
What is the test server you are referring to? Is it configured within MyEclipse or outside MyEclipse?
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?
davoutParticipantMy ‘environ.properties’ file includes a number of machine specific settings like..
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…
<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?
davoutParticipantWell???
davoutParticipantI 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 serverWhether 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.
-
AuthorPosts