Question

I have successfully installed Broadleaf Demo site with the help of ecllipse,Now i want to install it in tomcat standalone,so any body cant tell me the steps or any link will be helpful.

Thanks

Was it helpful?

Solution

bulid the war file of the project using eclipse . then deploy that war file in that tomcat webapps folder. now start the tomcat service.

OTHER TIPS

You need to do followings;

(a)In the site and admin directory of the pom.xml fileAdding region:

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.0</version>
    <configuration>
        <warSourceDirectory>${webappDirectory}</warSourceDirectory>
        <path>/</path>
        <port>${httpPort}</port>
        <httpsPort>${httpsPort}</httpsPort>
        <keystoreFile>${webappDirectory}/WEB-INF/blc-example.keystore</keystoreFile>
        <keystorePass>broadleaf</keystorePass>
        <password>broadleaf</password>
    </configuration>
</plugin>

(b)Right click DemoSite project in eclipse, Go to run -> Run As and execute the Maven clean and Maven install, After successful execution WAR files will be generated in the corresponding target folders inside the Demosite admin and site folders accordingly. We generated two war package named admin.war and mycompany.war.

(c)If Your environment is Ubuntu, the path to the webapps Tomcat server for /var/lib/tomcat7/webapps, admin and mycompany.war will be copied to the folder, and then restart the Tomcat server:

sudo /etc/init.d/tomcat7 restart

See the /var/log/tomcat7/catalina.out file error:

Caused by: java.lang.OutOfMemoryError: Java heap space
        at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:268)
        at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:128)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2105)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1981)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1947)
        at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1932)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1326)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        ... 4 more

For the memory overflow problem, the following specific solutions: Catalina.sh files in Ubuntu (path for the file is /usr/share/tomcat7/bin/catalina.sh), add the following content in the first line in the document:

JAVA_OPTS='-server -Xms256m -Xmx512m -XX:PermSize=128M -XX:MaxPermSize=256M' #Note: single quotation marks can not be omitted

Catalina.bat files in windows, in the first row, add the following content:

set JAVA_OPTS=-server -Xms256m -Xmx512m -XX:PermSize=128M -XX:MaxPermSize=256M #Note: no single quotation marks

(d)According to (c) in the modified after the restart the Tomcat server:

sudo /etc/init.d/tomcat7 restart

You can normal open electric page in the browser: localhost:8080/mycompany and background management page: localhost:8080/admin, to transfer Tomcat server also be accomplished.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top