reset password
Author Message
rsavani
Posts: 21
Posted 19:15 Oct 12, 2015 |

Hi

I already create login page in Lab2 package now i want to create login page for homework1 but its showing error that "The Servlet name already exists". Please give me solution for this error.

vluu2
Posts: 64
Posted 19:23 Oct 12, 2015 |

If you created a Servlet named "Login" under Lab2 Package. It would effect your entire CS320 Web Development project. 

Since Homework1 is still under the same project, you cannot create the same Servlet named "Login". But if you delete the one under Lab2 then you can have it under Homework1. 

Basically, avoid same Servlet names under same web development project. 

spanchal93
Posts: 5
Posted 19:54 Oct 12, 2015 |

Servlet names are case-sensitive, so you can have servlet 1 with name "Login" and servlet 2 with name "login" 

rsavani
Posts: 21
Posted 20:07 Oct 12, 2015 |

kk....thank you guys

dhaval0704
Posts: 14
Posted 20:57 Oct 12, 2015 |

You can put Same login page in different package.  It works because directory has been changed. jut you need to take care of

@webservlet("/hw1/login") and @webservlet("/Lab1/login") .

 

krishsb2405
Posts: 8
Posted 20:59 Oct 12, 2015 |
dhaval0704 wrote:

You can put Same login page in different package.  It works because directory has been changed. jut you need to take care of

@webservlet("/hw1/login") and @webservlet("/Lab1/login") .

@dhaval0704 this cannot be done because the build path will be the same and the classes generated will have the same name.

 

cgaldam2
Posts: 9
Posted 06:47 Oct 13, 2015 |

So I am assuming there are no instructions for what we have to do in the HW all we have to do if validate the fields for user input?