This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 174318 - [68cat] Issues in Getting Started with JavaEE 6 Applications tutorial
Summary: [68cat] Issues in Getting Started with JavaEE 6 Applications tutorial
Status: RESOLVED FIXED
Alias: None
Product: usersguide
Classification: Unclassified
Component: JavaEE (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 blocker (vote)
Assignee: Kenneth Ganfield
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-11 22:24 UTC by giorgio42
Modified: 2009-11-12 08:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description giorgio42 2009-10-11 22:24:07 UTC
[ JDK VERSION : 1.6.* ]


a) To create the web application:
   1. Choose File > New Project (Ctrl-Shift-N). Select Web from the
Java Web category and click Next. 

There is no Web project type in this dialog, only Web Application.

b) "If you open web.xml, you can see that Facelets is defined as the
view framework and that index.xhtml is specified as the welcome page
for the application." I did that and it is completely unclear to me
how the user can see that facelets is set as the view framework. The
word facelet does not appear in the web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
       
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

Only Faces Servlet is mentioned.


c) "Right-click the project node and choose New > Other
Select Entity Class from the Persistence category. Click Next."

At least on my installation of NB6.8m2 the submenu of New directly
contains an entry named "Entity Class...", therefore the above is
more involved than needed.

d) Maybe you should mention that when running the application for the
first time, a web browser window with the string "Hello from the
Facelets" will appear.

e) "Select Session Bean for Entity Class from the Persistence
category. Click Next." It is "Session Beans for Entity Classes".
Comment 1 giorgio42 2009-10-12 20:57:47 UTC
I continued with the tutorial and I found a more serious bug:
the index.xhtml generated by the web application wizard does not
declare the ui tags in the name space declarations.

Generated:
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
>

Should be:
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
>

Because of this I increased the priority to P3.
Comment 2 Petr Jiricka 2009-10-23 15:48:02 UTC
As for the first part, I am assigning to Ken as the tutorial owner. Regarding the second part - when you use ui tags in
code completion, it should be auto-imported, right? The page initially does not use ui tags, so it does not contain
errors. So is this an issue?
Comment 3 Kenneth Ganfield 2009-10-24 17:29:36 UTC
Thanks for the comments. I will update the tutorial to make things clearer before moving it from the wiki to netbeans.org.

Regarding comment c) below, in some cases the menu item for entity class may not appear as one of the first choices in
the New popup submenu, depending on their previous actions in the IDE, however the user can always access the wizard via
the Other menu item.
Comment 4 Kenneth Ganfield 2009-11-12 08:59:39 UTC
I have updated the tutorial and incorporated the comments. Some of the steps have changed slightly due to changes in the behavior of the IDE and wizards. The updated version of the tutorial will be available for the release of NetBeans 6.8.

Thanks for the comments. 
I am marking the issue as Fixed.