Advertisement
dah01

My JSP/Hibernate/Derby Setup

Nov 26th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. +--------------------------------------------------------------------------------------------------+
  2. | JSP Setup |
  3. +--------------------------------------------------------------------------------------------------+
  4. This guide will walk you through my jsp setup.
  5.  
  6. http://www.tutorialspoint.com/jsp/jsp_quick_guide.htm
  7. +------------+
  8. | Tomcat |
  9. +------------+
  10. -- Useful Links
  11. -- Starting/Stopping
  12. -- https://docs.oracle.com/cd/E20593_01/doc.560/e23613/app_tomcat.htm
  13. -- A bit about tomcat here
  14. -- http://www.tutorialspoint.com/jsp/jsp_quick_guide.htm
  15. -- Stack overflow answer that helped me setup my path.
  16. -- http://stackoverflow.com/questions/9361623/catalina-home-environmental-variable-is-not-defined-correctly
  17. -- Instructions
  18. -- Download Tomcat Zip
  19. -- http://tomcat.apache.org/
  20. -- Extract somewhere
  21. -- I extracted mine C:\tomcat
  22. -- Setup the classpath environment variable.
  23. -- Define a variable called CATALINA_HOME that points to wherever you put your tomcat files.
  24. -- Add %CATALINA_HOME%\bin to the path variable.
  25. -- Each entry should be seperated by a semicolon.
  26. -- Make sure that the JDK is setup in the path variable.
  27. -- Add an entry if it isn't there for the JDK, mine was in C:\Program Files\Java\jdk1.8.0_25
  28. -- Make sure that you close any open command prompts, as only new windows will see your variable changes.
  29. -- Run Tomcat
  30. -- If you get CATALINA_HOME environmental variable is not defined correctly
  31. -- See this link: http://stackoverflow.com/questions/9361623/catalina-home-environmental-variable-is-not-defined-correctly
  32. -- Check the following
  33. -- JDK and %CATALINA_HOME%\bin in path.
  34. -- Close all command prompts or shells.
  35. -- CATALINA_HOME entry.
  36. -- Navigate to the directory and run startup.bat you should get output similar to this:
  37. -- c:\tomcat\bin>startup.bat
  38. Using CATALINA_BASE: "C:\tomcat"
  39. Using CATALINA_HOME: "C:\tomcat"
  40. Using CATALINA_TMPDIR: "C:\tomcat\temp"
  41. Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_25"
  42. Using CLASSPATH: "C:\tomcat\bin\bootstrap.jar;C:\tomcat\bin\tomcat-juli.jar"
  43. -- Open a browser tab and navigate to http://localhost:8080/
  44. -- Should get the tomcat homepage.
  45. -- http://imgur.com/a/LmkDT
  46. -- Adding pages
  47. -- Let's start by making a test page.
  48. -- Call this testpage.jsp and put it in the webapps\ROOT directory of your tomcat directory.
  49. -- <html>
  50. <head><title>Test Page</title></head>
  51. <body>
  52. <% out.println("Tomcat is best cat."); %>
  53. </body>
  54. </html>
  55. -- At this point your tomcat is setup!
  56.  
  57. +-----------+
  58. | Derby |
  59. +-----------+
  60. http://db.apache.org/derby/papers/DerbyTut/ns_intro.html#ns_sample
  61. -- Derby is a small footpring DB that I am going to use for any small projects.
  62. -- Download derby(just use the latest, this will be irrellevant.
  63. -- Here is a tutorial for setting up the networked derby, I used the embedded, however.
  64. -- http://www.vogella.com/tutorials/ApacheDerby/article.html
  65.  
  66. +-----------+
  67. | Hibernate |
  68. +-----------+
  69. https://kaanmutlu.wordpress.com/2011/07/30/hibernate-installationsetup-on-eclipse-ide/
  70. http://www.tutorialspoint.com/hibernate/hibernate_tutorial.pdf
  71. http://db.apache.org/derby/docs/10.2/tuning/rtunproper27355.html
  72. http://karussell.wordpress.com/2009/06/09/hibernate-cfg-xml-settings-for-derby-oracle-and-h2/
  73. -- Download hibernate(I used 3.6.10)
  74. -- Make a library in your IDE.
  75. -- Add the hibernate3.jar to the library.
  76. -- Add all of the jars in the lib/required directory to the hibernate library.
  77. -- Add the hibernate library to your IDE.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement