This discussion is archived
1 2 Previous Next 23 Replies Latest reply: Jun 28, 2011 3:06 PM by 872014 RSS

First Cup Problem

843833 Newbie
Currently Being Moderated
Hi Guys,

I'm moving to a J2EE team soon so thought I would give myself a bit of a headstart by taking the first cup tutorial. I downloaded the Netbeans 6.8 IDE with Glassfish 3 on my mac, which will use Safari as the browser.

I've followed all the steps and got the final part, But when I deploy I get a blank page in my browser, it seems to understand the title bar as that displays correctly. But all of the content within the form is totally ignored.

Below is a copy of my greeting.xhtml:-

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:fc="http://java.sun.com/jsf/composite/components">
<head>
<title>Firstcup Greeting Page</title>
</head>
<body>
<h:form>
<h2>
<h:outputText value="#{bundle.Welcome}"/>
</h2>
<h:outputText value="#{bundle.DukeIs} "/>
<h:outputText value="#{DukesBDay.age} #{bundle.YearsOldToday}"/>
<p/>
<h:outputText value="#{bundle.Instructions}"/>
<p/>
<h:outputText value="#{bundle.YourBD} "/>
<fc:inputDate id="userBirthday" date="#{DukesBDay.yourBD}" />
<h:outputText value=" #{bundle.Pattern}"/>
<p/>
<h:commandButton value="#{bundle.Submit}" action="#{DukesBDay.processBirthday}"/>
<p/>
<h:message for="userBirthday" style="color:red"/>
</h:form>
</body>
</html>

It seems to me that Safari is having trouble with the xhtml I am serving? Any ideas on how to combat this issue or anything I have done incorrectly? Although there are no errors on build, just the xhtml code doesn't display

Thanks in advance,
Mitch
  • 1. Re: First Cup Problem
    843833 Newbie
    Currently Being Moderated
    same problem here - using firefox.
  • 2. Re: First Cup Problem
    843833 Newbie
    Currently Being Moderated
    So it seems following the J2EE guide is leading to this problem, as both myself, you and other users on another forum have the problem. I have deleted and retried the First Cup guide and still get the same error.

    But it seems the xhtml and faces_config files are correct, Can someone with a better knowledge of J2EE and JSF explain which component(class,bean, etc) control the rendering of the xhtml pages as it seems that this must be causing the problem. If they can I'll take a look at this and try to work out which part of the code is causing the problem?

    Could somebody from Sun take a look at the guide "http://java.sun.com/javaee/6/docs/firstcup/doc/firstcup.pdf" as it seems to be leading to the same problem for a view users.
  • 3. Re: First Cup Problem
    843833 Newbie
    Currently Being Moderated
    Also from taking a brief look at the documentation for EE5 there seems to be a substantial section on deploying via ant and asadmin. In EE6 this doesn't take place but maybe this is improved functionality.
  • 4. Re: First Cup Problem
    782681 Newbie
    Currently Being Moderated
    Have you tried to do firstcup without Netbeans? I mean, with ant and asadmin?

    --------------------------

    (it was rather long ago and I don't recall much details) I somehow managed to make EE5 firstcup (pdf) work with Netbeans +6.7.something+ version and with some Glassfish 2.something version but the experience was really ugly - I learned nothing useful then.

    Per my recollection, what I did was a random mix of looking into error logs in occasional places and compulsive changes based on uneducated guesses here and there. After few days of trials and errors I made it work - without knowing or understanding what was missing / wrong there.

    Suming up, to me doing JEE5 firstcup with Netbeans was a total waste of time

    Edited by: gnat on Jan 22, 2010 8:52 AM
  • 5. Re: First Cup Problem
    843833 Newbie
    Currently Being Moderated
    I have the same problem. I also use NetBeans 6.8 and GlassFish v3.

    The strange thing is that if I open the original project from the "example" directory, and run it, it works.

    I have not found the difference between the projects. I guess that the original project was created by NetBeans 6.7, that generated some configuration file in an other way.
  • 6. Re: First Cup Problem
    843833 Newbie
    Currently Being Moderated
    Gnat,

    Thanks for the heads up, any suggestions on what to try first? Just trying to get an understanding and any tutorial for beginners that you can recommend would be great?

    Thanks
  • 7. Re: First Cup Problem
    782681 Newbie
    Currently Being Moderated
    well I would suggest the same firstcup, just with ant/asadmin instead of Netbeans
  • 8. Re: First Cup Problem
    843833 Newbie
    Currently Being Moderated
    if the delivered example app. work with netbeans 6.8 and you suggest to try the own one with asadmin/ant. lets assume the own app. works with ant in which file(s) could be the difference between the own and the delivered app? which files/parts of the app. become obsolete if i use ant?
  • 9. Re: First Cup Problem
    782681 Newbie
    Currently Being Moderated
    I don't quite follow sorry. Do you have a specific problem?
  • 10. Re: First Cup Problem
    843833 Newbie
    Currently Being Moderated
    gnat wrote:I don't quite follow sorry. Do you have a specific problem?
    you say we should try ant/asadmin. the problem is: if this works we are where we are now: we know it works some how (we also know the delivered app. works without ant). but we want to know what could be the difference(in which file/part of the app) between the app delivered with glassfish and our app (the outcome of the tutorial).
    the only way we see at the moment is to overwrite each single file of our app with the files of example app and at the moment our app works we know the last file overwritten was wrong. The purpose of this thread is to get help for this process: which files we should overwrite first or which files have definitely nothing to with our problem.

    by the way: the first post states the "specific problem"

    Edited by: dermoritz1 on Jan 26, 2010 5:02 AM
  • 11. Re: First Cup Problem
    843833 Newbie
    Currently Being Moderated
    Yeah, I'm with the OP here, I mean how much more specific do you need to be. The tutorial doesn't work.
    I starting working with EE 6 and spent a wasted day trying to get this to work. For a start it doesn't work on
    IE8 because of the xhtml+xml MIME support problem and neither does it work on Chrome. From the look
    of it various other people have tried it on just about every other browser and it doesn't work on them either.

    All we're missing here is someone who has managed to get it working. You need to understand that for
    people taking their tentative first steps with EE 6 this tutorial is like the shop window. When you can't even
    get the hello world app to work the only conclusion that can be reached is that the technology is a pile of
    junk.

    As for the suggestion to ditch NetBeans and use Ant, I mean really, why don't we just ditch the high level
    languages and go back to machine code and command lines.
  • 12. Re: First Cup Problem
    782681 Newbie
    Currently Being Moderated
    you say we should try ant/asadmin
    I didn't say that.
    we want to know what could be the difference(in which file/part of the app)
    Sounds like you want someone to spoonfeed you with explanation for every little detail you're curious about. If that's the case, hire a tutor.
  • 13. Re: First Cup Problem
    843833 Newbie
    Currently Being Moderated
    for those that want a working example: https://glassfishplugins.dev.java.net/eclipse34/

    i tried it till "hello world" - it works and its eclipse. but i will do some additional research (overwriting all files, one by one).
  • 14. Re: First Cup Problem
    782681 Newbie
    Currently Being Moderated
    ...As for the suggestion to ditch NetBeans and use Ant, I mean really, why don't we just ditch the high level
    languages and go back to machine code and command lines.
    well if you're going to professionally work with Java EE, you may eventually have to reconsider that attitude. Thing is, sometimes there's simply no other choice but using command line tools. I mean, in commercial development not in toy projects from tutorials.

    ---------------

    Oh and sticking with IDE can certainly lower chances to get an answer at forums like these. Just think of it...
      Hello I am using Netlipse IDE version 6.6.6. I have Habracadabra setting selected in Mumbo-Jumbo config dialog...
    Do you expect reader to install your version of your IDE and learn about your settings - just to answer your question?

    Now, read another question (like yours) from another guy (like you)...
      ...using Ecbeans IDE version 7.7.7 with Humpty-Dumpty setting selected in Ooby-Dooby config dialog...
    Would you (yes, you) install his version of his IDE and learn about his settings - just to answer his question?
1 2 Previous Next