Author | Message |
---|---|
lbriggs
Posts: 57
|
Posted 00:30 Apr 09, 2014 |
I was having trouble uploading my project, and I found the description here: http://csns.calstatela.edu/wiki/content/cysun/course_materials/cs3 a bit vague. So if anyone else is having issues I hope this helps: The four things you need to upload are your Java classes, JSP files, your jstl.jar (if you are using it) and your web.xml. Your Java classes should be the ones from your eclipse build/classes not the src files you created. And you place them inside www/WEB-INF/classes. Your JSP files, jstl.jar, and web.xml files are all located in eclipse: WebContent/WEB-INF and they get moved to www/WEB-INF on CS3. (the jstl.jar is located in a lib folder within WEB-INF). If you update any of the Java files you need to re-upload web.xml to update its time stamp (linux touch command also works). If you used any CSS files they just live directly in the www directory on CS3. One last gotcha, locally you might have had to go to an address like: http://localhost:8099/TicTacToe/game Where TicTacToe is the name of the project, and game is the url the servlet is matching. On CS3 there arent multiple projects so the final URL will look like: http://cs3.calstatela.edu:8080/cs520stu00/game So if you have any internal links, make sure they reflect this url differences. The first time uploaded a project is the hardest, its easy after that. |
cysun
Posts: 2935
|
Posted 08:16 Apr 09, 2014 |
Didn't you take my CS320 before? And the key is not so much about memorizing which files go where, but to understand the directory structures used by application server, Eclipse, and Maven. For example, suppose I have a JavaScript file foobar.js and I want to access it locally in Eclipse at the URL http://localhost:8080/hw2/js/foobar.js, which folder should I put it under Eclipse (with or without Maven) and on CS3? |
lbriggs
Posts: 57
|
Posted 15:17 Apr 09, 2014 |
For public files (HTML,CSS,JS) in eclipse they go in WebContent, and on CS3 they go in www. My confusion was in where to put java classes (and originally I was uploading the SRC not build files) and JSP you don't want public. I did take 320 but it was over a year ago. |