reset password
Author Message
fyang15
Posts: 35
Posted 15:50 Mar 05, 2020 |

For CS 3220 labs, this is the third time I followed the exact instruction and uploaded all needed files and at the very last, web.xml. Yet, It still stubbornly gives me a 404.

Any fix for this? It's really irritating to fix under the lab's tight time constraint and I'm losing a lot of points for it. I don't even know why getting it to work on CS3 should be such a huge portion of the grade when the code is clearly working, but CS3 isn't.

Last edited by fyang15 at 15:51 Mar 05, 2020.
arthur.naullet
Posts: 3
Posted 15:57 Mar 05, 2020 |

You should check your version of eclipse maybe it's to recent.

cysun
Posts: 2935
Posted 16:02 Mar 05, 2020 |

You code doesn't work on CS3 because you have multiple classes on the server mapped to the same URL. See the screenshot below:

Read the lecture notes on deployment, especially slide 6-8.

fyang15
Posts: 35
Posted 16:19 Mar 05, 2020 |
cysun wrote:

You code doesn't work on CS3 because you have multiple classes on the server mapped to the same URL. See the screenshot below:

Read the lecture notes on deployment, especially slide 6-8.

I just tried deleting all old assignments, still can't get it to show up.

I am using WinSCP, still don't know how to use the "touch" command yet, but I'll try to figure it out. Thanks for the help.

Last edited by fyang15 at 16:22 Mar 05, 2020.
fyang15
Posts: 35
Posted 16:45 Mar 05, 2020 |

I was able to get it to work by ditching the www folder altogether. I placed WEB-INF and web.xml directly under my personal folder, and now the URL is working.

cysun
Posts: 2935
Posted 17:50 Mar 05, 2020 |
fyang15 wrote:

I was able to get it to work by ditching the www folder altogether. I placed WEB-INF and web.xml directly under my personal folder, and now the URL is working.

I don't think that's what you did. Here's your home folder:

and here's what's under www:

BTW you are missing Logout

fyang15
Posts: 35
Posted 18:34 Mar 05, 2020 |
cysun wrote:
fyang15 wrote:

I was able to get it to work by ditching the www folder altogether. I placed WEB-INF and web.xml directly under my personal folder, and now the URL is working.

I don't think that's what you did. Here's your home folder:

and here's what's under www:

BTW you are missing Logout

Oops, I missed part 3 in the lab. I hope the two servlets are doing what they're supposed to. I did include invalidate() in Members' doPost.

Last edited by fyang15 at 18:35 Mar 05, 2020.
qbriola
Posts: 4
Posted 20:30 Mar 05, 2020 |

Hello.

To simplify the deployment of a project under eclipse on the CSULA server, you can use this script that I coded.

https://github.com/gastbob40/cs3_lab_deploy

fyang15
Posts: 35
Posted 20:36 Mar 05, 2020 |
qbriola wrote:

Hello.

To simplify the deployment of a project under eclipse on the CSULA server, you can use this script that I coded.

https://github.com/gastbob40/cs3_lab_deploy

Thanks, I will check it out.

cysun
Posts: 2935
Posted 21:17 Mar 05, 2020 |
qbriola wrote:

Hello.

To simplify the deployment of a project under eclipse on the CSULA server, you can use this script that I coded.

https://github.com/gastbob40/cs3_lab_deploy

Looks like a nice script. It may remove code that is not graded though.

qbriola
Posts: 4
Posted 21:28 Mar 05, 2020 |
cysun wrote:

Looks like a nice script. It may remove code that is not graded though.

I chose to delete the contents of the folder because I don't think you can put several web.xml on cs3 (unless I'm wrong). So you can't 'mix' 2 projects, only code the 2 servlets in the same project.

cysun
Posts: 2935
Posted 11:44 Mar 06, 2020 |
qbriola wrote:
cysun wrote:

Looks like a nice script. It may remove code that is not graded though.

I chose to delete the contents of the folder because I don't think you can put several web.xml on cs3 (unless I'm wrong). So you can't 'mix' 2 projects, only code the 2 servlets in the same project.

For us web.xml doesn't really matter because all the projects have pretty much the same web.xml (unless you manually add additional settings in web.xml). There can only be one web.xml on the server for each account because the server treats all the projects in an account as one project. With that said, if you want to deploy two projects, it's perfectly fine that the web.xml of the second project overwrites the first one.

qbriola
Posts: 4
Posted 11:58 Mar 06, 2020 |
cysun wrote:
qbriola wrote:
cysun wrote:

Looks like a nice script. It may remove code that is not graded though.

I chose to delete the contents of the folder because I don't think you can put several web.xml on cs3 (unless I'm wrong). So you can't 'mix' 2 projects, only code the 2 servlets in the same project.

For us web.xml doesn't really matter because all the projects have pretty much the same web.xml (unless you manually add additional settings in web.xml). There can only be one web.xml on the server for each account because the server treats all the projects in an account as one project. With that said, if you want to deploy two projects, it's perfectly fine that the web.xml of the second project overwrites the first one.

Ho, I didn't know this.

So I remove the lab 11 when I put the lab 12.

Can I put the lab 11 again?

cysun
Posts: 2935
Posted 11:59 Mar 06, 2020 |
qbriola wrote:
cysun wrote:
qbriola wrote:
cysun wrote:

Looks like a nice script. It may remove code that is not graded though.

I chose to delete the contents of the folder because I don't think you can put several web.xml on cs3 (unless I'm wrong). So you can't 'mix' 2 projects, only code the 2 servlets in the same project.

For us web.xml doesn't really matter because all the projects have pretty much the same web.xml (unless you manually add additional settings in web.xml). There can only be one web.xml on the server for each account because the server treats all the projects in an account as one project. With that said, if you want to deploy two projects, it's perfectly fine that the web.xml of the second project overwrites the first one.

Ho, I didn't know this.

So I remove the lab 11 when I put the lab 12.

Can I put the lab 11 again?

Please do as Lab 11 is not graded yet.

qbriola
Posts: 4
Posted 12:34 Mar 06, 2020 |

OK, so I added an issue to choose the deployment method (with / without deleting data). I will fix it soon

https://github.com/gastbob40/cs3_lab_deploy/issues/1

EDIT

The issue has been realized, and the script now takes an option to choose the method of deployment.

Last edited by qbriola at 17:20 Mar 06, 2020.