This is all I really needed to know:
javax.el.PropertyNotFoundException: /index.xhtml @30,79 action="#{Link.Lname}": Target Unreachable, identifier 'Link' resolved to null
It tells me that you don't know JavaBeans. JavaBeans are a very important part of the
Java universe, and are employed by many Java products, not just JSF, so it's essential that
you should learn their rules.
I recommend that you find some good learning resources, but here are some starting points.
JavaBeans are very much sensitive to capitalization. The best-practice rule for JavaBeans, and in fact for Java in general is that class names should start with an uppercase letter. Instance names, property names and other second-class names must not.
So right off, you've committed a double offence. Your bean instance name is "Link", with a capital L and its Lname property name does too.
While JSF
can allow a bean instance name to start with an uppercase letter (even though it is discouraged), you didn't put a @Named attribute on your class, and therefore the default name rule applies, which is to name the bean instance the same name as the class [b]except that the first letter is folded down to lower-case[/i]. So your View Template requested a bean named "Link", but JSF would have defined it with a name of "link". When it went to resolve, it would find nothing and silently return a null pointer.
Were that not so, JSF
might have figured out that the way to reference the "Lname" property on the Link bean was via the getLname and setLname methods, although that could vary. Nevertheless, since the bean pointer itself is null, attempting to reference ANY property of the Link bean would result in the resolver's throwing a PropertyNotFound exception, because there's no bean to examine.
I could go into detail about the fact that your database code is both poor for performance and reliability reasons, but you need to study up on JavaBeans first. Until you get that right, nothing else matters.