java - New .xhtml pages won't render any jsf tags but previously created ones still work fine in same project -


i have weird , stupid problem has stopped dead. have numerous xhtml pages use forms , work fine. created new xhtml page called registeruser.xhtml. created right clicking on "web pages" folder , selecting new > xhtml page have done other half dozen pages. put in code , when go view page in web browser, shows nothing. if view source, shows jsf tags, not html. if put code or plain text outside of form tags, displays form tag. if take working page , copy/past new page, still not work.

here's 1 thing noticed,

typically when create c:, h: or f: tag first time in page, error saying not bound, single click on , hit alt-enter , gives me option add something, adds xlmns:h html tag. don't understand how works namespaces...anyway, whatever reason option doesnt show up...the option shows "remove surrounding tag" not fix problem if click it.

so no big deal doesnt auto-add xmlns, can add myself, copying have on page...but nope, still nothing. why doesnt work?

i've tried creating numerous new xhtml files in project , result same on form elements, nothing inside rendered , shows error.

all previous pages work fine. i've read on internet changing web-inf files doesnt make sense should have since already-existing pages work, new pages , nothing has changed i'm aware of.

i should point out did right click copy/paste within projects window of index.xhtml file works totally fine , when run project, index.xhtml loads fine when manually navigate index_1.xhtml (which pasted version), none of jsf rendered.

registeruser.xhtml

<?xml version="1.0" encoding="utf-8"?>  <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"       xmlns:h="http://xmlns.jcp.org/jsf/html">     <head>         <title>jadestar's pc solutions</title>     </head>     <body>         <h:form>             <h:panelgrid>             <h:outputlabel value="username: " style="font-weight:bold" />             <h:inputtext value="#{custombuild.username}" />             <br></br>             <h:outputlabel value="password: " style="font-weight:bold" />             <h:inputsecret value="#{custombuild.password}" />             <br></br>             <h:outputlabel value="name: " style="font-weight:bold" />             <h:inputtext value="#{custombuild.name}" />             <br></br>             <h:outputlabel value="address " style="font-weight:bold" />             <h:inputtext value="#{custombuild.address}" />             <br></br>             <h:outputlabel value="phone number: " style="font-weight:bold" />             <h:inputtext value="#{custombuild.phone}" />             <br></br>             <h:outputlabel value="email address: " style="font-weight:bold" />             <h:inputtext value="#{custombuild.email}" />             <br></br>             </h:panelgrid>             <h:commandbutton id="register" value="reigster" action="#{custombuild.registeruser()}"/>         </h:form>         <br></br>         <h:form>             <h:commandbutton id="cancel" value="cancel" action="index" />         </h:form>     </body> </html> 

so after copying , creating ton of new projects , doing lot of research, found out if made new web project, index.xhtml page work fine new pages created in project fail render jsf tags. found out issue. in web.xml in web-inf directory, missing following line.

    <url-pattern>*.xhtml</url-pattern> 

which inside tag.

so adding this, new jsf pages working...but question remains, how current pages working without tag , not new ones? doesnt make sense.

cache issue? enabled console in chrome , "empty cache , hard reload" , still same result can't cache, can it?

i should mention half way through project, updated netbeans 7.x.x, java 7.x , glassfish 3.x netbeans 8, java 8 , glassfish 4. since still working current pages after upgrade, assumed wasn't cause perhaps in there broke?

would nice hear either has explanation or had similar problem


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -