The easy fix for this is to add your Dynamic Web Project to an EAR project -
EDIT: you could also just update your eclipse, I just did this, and the patch is included in the WTP updates, after I found the solution with adding it to an EAR project, I installed the updates, and verified that it works with publishing a WAR file as well.

For me that works like a charm, I'm running eclipse 3.3.2 (j2ee distribution) and GlassFish v2ur1 and the GlassFish eclipse plugin on Ubuntu Linux 7.10. (eclipse and glassfish are totally fresh installs)

If you already have a Dynamic Web Projecct, then create a new EAR project (right click in project explorer and select "new -> project..." and under j2ee select "Enterprise Application Project" name it, and follow the wizard, then selecting your Dynamic Web Project.

Then under your server view, right click on your server and select "add and remove projects..." and add your EAR project.

I am using the current eclipse jee version and I installed the wst patch over the update manager.

I get still the NullpointerException when I want to deploy a simle webapp. Here the eclipse error log entry:

Could not publish to the server.

java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.getDeployUriOfComponent(ComponentUtilities.java:327)
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.getURI(J2EEFlexProjDeployable.java:429)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.guessModuleName(AntPublisher.java:259)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.getPublishProperties(AntPublisher.java:224)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.publish(AntPublisher.java:110)
at org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour.publishModule(GenericServerBehaviour.java:84)
at com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModule(SunAppServerBehaviour.java:106)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:749)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:835)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:669)
at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:887)
at org.eclipse.wst.server.core.internal.Server.publish(Server.java:874)
at org.eclipse.wst.server.core.internal.PublishServerJob.run(PublishServerJob.java:72)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

I'm seeing the same problem, Glassfish starts OK from Eclipse but when I try and publish a dynamic web app I get the NPE. The last thing to appear in the Eclipse log is:

!ENTRY org.eclipse.wst.server.core 4 0 2008-03-04 16:06:23.691
!MESSAGE Could not publish to the server.
!STACK 0
java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.getDeployUriOfComponent(ComponentUtilities.java:327)
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.getURI(J2EEFlexProjDeployable.java:429)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.guessModuleName(AntPublisher.java:259)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.getPublishProperties(AntPublisher.java:224)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.publish(AntPublisher.java:110)
at org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour.publishModule(GenericServerBehaviour.java:84)
at com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModule(SunAppServerBehaviour.java:95)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:749)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:835)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:669)
at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:887)
at org.eclipse.wst.server.core.internal.Server.publish(Server.java:874)
at org.eclipse.wst.server.core.internal.PublishServerJob.run(PublishServerJob.java:72)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)