發表文章

目前顯示的是 8月, 2022的文章

Eclipse export WAR

  1. In Eclipse, stop Tomcat 2. Right-click your project and select Export > WAR File 3. In the Destination field, enter: <any-directory>/mycoolapp.war 4. Outside of Eclipse, start Tomcat - If you are using MS Windows, then you should find it on the Start menu 5. Make sure Tomcat is up and running by visiting: http://localhost:8080 6. Deploy your new WAR file by copying it to <tomcat-install-directory>\webapps Give it about 10-15 seconds to make the deployment. You'll know the deployment is over because you'll see a new folder created in webapps ... with your WAR file name. 7. Visit your new app. If your war file was: mycoolapp.war then you can access it with:  http://localhost:8080/mycoolapp/

MAC + Eclipse + Spring MVC Project

圖片
  This article shows how to create a spring MVC project. Environment: macOS(Monterey) + eclipse 2022 1. create a dynamic web project 2. convert to a maven project 3. setup spring MVC dependency 4. setup web.xml and spring.xml 5. write a controller 6. run on tomcat project structure shown below

Install Tomcat 10 on MacOS (Monterey)

Make sure you already install java on your machine. I'm using jenv to manage my java version. Installing Tomcat Here are the easy to follow steps to get it up and running on your Mac Download a binary distribution of the core module: apache-tomcat-10.0.21 from  here . I picked the  tar.gz  in Binary Distributions  Core  section. Opening/unarchiving the archive will create a new folder structure in your  Downloads  folder: (btw, this free  Unarchiver app  is perfect for all kinds of compressed files and superior to the built-in Archive Utility.app) ~/Downloads/apache-tomcat-10.0.21 Open the Terminal app to move the unarchived distribution to /usr/local like so: sudo mkdir -p /usr/local sudo mv ~/Downloads/apache-tomcat-10.0.21 /usr/local To make it easy to replace this release with future releases, we are going to create a symbolic link that we are going to use when referring to Tomcat (after removing the old link, you might have from installi...

Angular Form 沒有正常運作?

 !!!重要 在Angular中的Form  不需要使用Form標籤 否則會無法正常呼叫event 範例: <div class ="form-header" > <input # myInput class ="au-input au-input-xl" type ="text" placeholder ="keyword..." (keyup.enter) =" doSearch ( myInput . value ) " /> <button class ="au-btn-submit" type ="submit" (click) =" doSearch ( myInput . value ) " > Search </button> </div>