reset password
Author Message
cysun
Posts: 2935
Posted 16:58 Feb 21, 2014 |

Recently many students experienced problems deploying projects on CS3: sometimes a project works fine in Eclipse but not on CS3, and sometimes a project used to work on CS3 stops working after another project is deployed. There are several possible causes for the problem, and here is a list of things you should check:

First, make sure that the project itself is properly coded and deployed, and this includes:

  • Every class should be in a package (not the default package).
  • URL patterns in @WebServlet should start with a "/", e.g. @WebServlet("/HelloServlet"), not @WebServlet("HelloServlet").
  • All files are uploaded to the right folders.
  • The timestamp of web.xml is updated (by using a touch command or simply uploading the file again).

Secondly, because each account on CS3 only has one application context, multiple projects under the same account are considered the same application, and Tomcat won't be able to run them if there are conflicts among the deployed projects. In particular:

  • Conflicting URL patterns, e.g. two servlets are mapped to the same URL pattern "/Edit".

To avoid this problem, use more descriptive URL patterns like "/EditCourse" and "/EditComment" instead of just "/Edit".

  • Conflicting application and session scope variables (especially application scope variables), e.g. "entries" of List<GuestBookEntry> in one servlet and "entries" of List<Course> in another servlet.

Again, use more descriptive variable names like "courses", "instructors", "songs", "tasks" and so on instead of naming everything "entries".

If one of your recent assignments (including the miderm) is not working due to some conflicts with other assignments, please do NOT changes anything on CS3 - inform the TAs or me about the possible cause and wait for further instructions.

 

 

Last edited by cysun at 17:00 Feb 21, 2014.
hhuang30
Posts: 40
Posted 17:11 Feb 21, 2014 |

Thank you.

So in order to try to avoid this "conflict", is that possible to delete the applications which are already graded from cs3?

cysun
Posts: 2935
Posted 17:12 Feb 21, 2014 |
hhuang30 wrote:

Thank you.

So in order to try to avoid this "conflict", is that possible to delete the applications which are already graded from cs3?

Yes, feel free to delete assignments that are already graded.

nahmed5
Posts: 57
Posted 20:32 Feb 21, 2014 |

Hi, 

In Midterm1, we were supposed to submit a html file. I modified my lab5.html file for Mid1 but I forgot to change its name. So, the file for my Mid1 was actually named lab5.html. I was in a rush while uploading it to CSNS & CS3 & I did not notice it. After a few minutes (still inside the exam room), I noticed it but by that time the uploading time was over in CSNS. & my lab5.html was overwritten in CS3. The TA also left the class. So I again made a html file called lab05.html (for Lab 5) & uploaded it on CS3 server. You can check that it happened within 2-3 minutes after the midterm was over. (My Mid was on Thursday 02/20 till 4.10pm) I did not know that it may create any problem. It was an honest mistake. Please, kindly solve this problem.

cysun
Posts: 2935
Posted 20:59 Feb 21, 2014 |
nahmed5 wrote:

Hi, 

In Midterm1, we were supposed to submit a html file. I modified my lab5.html file for Mid1 but I forgot to change its name. So, the file for my Mid1 was actually named lab5.html. I was in a rush while uploading it to CSNS & CS3 & I did not notice it. After a few minutes (still inside the exam room), I noticed it but by that time the uploading time was over in CSNS. & my lab5.html was overwritten in CS3. The TA also left the class. So I again made a html file called lab05.html (for Lab 5) & uploaded it on CS3 server. You can check that it happened within 2-3 minutes after the midterm was over. (My Mid was on Thursday 02/20 till 4.10pm) I did not know that it may create any problem. It was an honest mistake. Please, kindly solve this problem.

Please inform the TA about this. If it's just the link html file, it shouldn't be a problem.

se1k1h1mawar1
Posts: 121
Posted 19:26 Oct 07, 2014 |
cysun wrote:

Recently many students experienced problems deploying projects on CS3: sometimes a project works fine in Eclipse but not on CS3, and sometimes a project used to work on CS3 stops working after another project is deployed. There are several possible causes for the problem, and here is a list of things you should check:

First, make sure that the project itself is properly coded and deployed, and this includes:

  • Every class should be in a package (not the default package).
  • URL patterns in @WebServlet should start with a "/", e.g. @WebServlet("/HelloServlet"), not @WebServlet("HelloServlet").
  • All files are uploaded to the right folders.
  • The timestamp of web.xml is updated (by using a touch command or simply uploading the file again).

Secondly, because each account on CS3 only has one application context, multiple projects under the same account are considered the same application, and Tomcat won't be able to run them if there are conflicts among the deployed projects. In particular:

  • Conflicting URL patterns, e.g. two servlets are mapped to the same URL pattern "/Edit".

To avoid this problem, use more descriptive URL patterns like "/EditCourse" and "/EditComment" instead of just "/Edit".

  • Conflicting application and session scope variables (especially application scope variables), e.g. "entries" of List<GuestBookEntry> in one servlet and "entries" of List<Course> in another servlet.

Again, use more descriptive variable names like "courses", "instructors", "songs", "tasks" and so on instead of naming everything "entries".

If one of your recent assignments (including the miderm) is not working due to some conflicts with other assignments, please do NOT changes anything on CS3 - inform the TAs or me about the possible cause and wait for further instructions.

 

 

Are we going to be required to deploy servlets that we'll be creating during the lab tomorrow?  I am assuming no because it can possibly break our HW0 on CS3.

I have had difficulty deploying servlets that I created in a different package from the one in which I created my HW0 servlet. 
 
My HW0 worked fine before I added another package of class files into my cs3 class folder, and it's still working fine after adding the new package. (I broke it once yesterday, but I re-uploaded the entire directory and now it is working fine. )
 
However, the servlets in the newly uploaded package would not work as I have not updated the web.xml file because I am afraid of breaking my HW0 which I created using a different OS. I do not know how to use the touch command to update the time stamp of web.xml (I am assuming the result of the operation is the same as updating web.xml).
 
I am afraid that my HW0 will not work if I update the web.xml file, using a touch command, or move files and folders on cs3 too much, but I wanted to make sure I know how to create a servlet and deploy it to cs3 before the lab tomorrow. 
 
Please advise. 
Thank you,
cysun
Posts: 2935
Posted 19:53 Oct 07, 2014 |

You'll be required to deploy your code to CS3 for every single assignment, and that includes the lab tomorrow.

I'll try to grade as quickly as possible. After you receive your grade and if you don't plan to contest it, you can remove your code from CS3 before deploying a new project.

Sometimes you may have to deploy multiple projects on CS3 at the same time. By following some good programming practice as described in the first post, you should be fine. If problems arise, we'll figure them out and deal with them in a fair way.

And finally, about re-uploading web.xml from different projects. If those web.xml were generated by Eclipse and you didn't change them, they are interchangeable, so feel free to re-upload the file regardless of where it came from.

se1k1h1mawar1
Posts: 121
Posted 20:13 Oct 07, 2014 |

Thank you for your quick response!
I appreciate it very much.
 

ajoshi6
Posts: 46
Posted 22:51 Oct 20, 2014 |

having problem in uploading the files on cs3,

my project is running successfully but when i run the URL it shows 404 error, today is the last date of my upload ,

 so what should i do now ,

 

i am under professor albert cervantes.

 

my name is abhijeet joshi,

CIN-304397735

srohani3
Posts: 7
Posted 22:11 Mar 13, 2020 |

Hi Sir. I was wondering if we can delete the code for our previous lab on the server so it doesn't conflict with our homework code? thanks

cysun
Posts: 2935
Posted 08:25 Mar 14, 2020 |
srohani3 wrote:

Hi Sir. I was wondering if we can delete the code for our previous lab on the server so it doesn't conflict with our homework code? thanks

If an assignment is graded and you don't plan to contest the grade, you can remove it from CS3.

Currently Lab 14 is not graded yet so you should leave it there. It shouldn't conflict with HW1.