Lew wrote:
>> Did you deploy the servlet to a web container, such as Tomcat?
> glassfishV2
You didn't answer my question.
Did you deploy the servlet to Glassfish?
Lew:
>> Is the web server running on localhost, and listening to port 8001?
>> What do you see if you just browse http://localhost:8001/?
gert:
> yep
Please answer the second question.
>> Navigating right directly to a ".do" URL is a bit rare; usually that is done
>> under the hood by Struts for you.
> I jus use plain xhtml with javascript doing a xhtml request to the
> glassfish server ? I dont use struts i think ?
Then why are you calling the URL "appointment.do"?
To put that another way, how exactly did you come up with that URL?
> I dont like jsp [sic], i always sent xml back and forward to the server with
> httprequest so i can strictly split up layout and data handling later
> on.
JSP generates XHTML if that's what you want, and its purpose is to separate
"layout" from "data handling" and other logic.
>> Where is the application context in your URL? "appointment.do" is not the
>> name of your application, which name is absent from the URL you posted. What
>> happens if you open your browser to the raw application (which I'll call "foo"
>> for pedagogical purposes): http://localhost:8001/foo/?
> static files are located at
>
> http://localhost:8001/w3c/appointment/appointment.htm
You didn't answer the questions. I asked where you mounted the application,
and what happens if you navigate to its URL.
Please answer the questions.
>> If that works OK, and you've set up your app's deployment descriptor
>> correctly, then tryhttp://localhost:8001/foo/appointment.do.
>
> I think it has something to do with the descriptor i think , because i
> have no idea what a descriptor is :)
Then you need first to study how to deploy applications to Glassfish. Use the
product documentation.
Then come back and report what happens when you follow directions.
>> I'd try this without Struts first, though, and just mount the servlet
>> someplace reasonable, likehttp://localhost:8001/foo/appointmentfor example.
[quoted text clipped - 3 lines]
> I dont now struts either only xhtml and javascript :) Only want a
> response from the servlet without using anything else.
Then deploy your application in accordance with Glassfish's instructions.

Signature
Lew
gert - 20 Sep 2007 15:52 GMT
> Lew wrote:
> You didn't answer my question.
> Did you deploy the servlet to Glassfish?
No so that means i have to edit web.xml like this ?
<servlet>
<package-name>response<package-name>
<servlet-name>appointment</servlet-name>
<servlet-class>appointment</servlet-class>
</servlet>
Ps one thing i really like about this enterprise stuff is that
everything is in xml :)
> >> Is the web server running on localhost, and listening to port 8001?
> >> What do you see if you just browsehttp://localhost:8001/?
I see
"Sun Java System Application Server 9.1 (build b58g-fcs)
Your server is up and running"
> Then why are you calling the URL "appointment.do"?
> To put that another way, how exactly did you come up with that URL?
http://www.ibm.com/developerworks/library/j-ajax1/
> JSP generates XHTML if that's what you want, and its purpose is to separate
> "layout" from "data handling" and other logic.
I like to write my own xhtml , css , javascript by hand. Really don't
like entering <jsp specifix xml tags>. I agree it makes life easier
but apache doesn't know jsp tags. And if you want ever static file to
be served by apache you need to stick with xhtml css and javascript.
> You didn't answer the questions. I asked where you mounted the application,
> and what happens if you navigate to its URL.
NetBeansProjects/w3c/src/java/response/appointment.java
Can't navigate to it with browser is not in the web folder ?
> Then you need first to study how to deploy applications to Glassfish. Use the
> product documentation.
>
> Then come back and report what happens when you follow directions.
Lew - 20 Sep 2007 16:55 GMT
> I like to write my own xhtml , [sic] css , [sic] javascript [sic] by hand. Really don't
> like entering <jsp specifix xml [sic] tags>. I agree it makes life easier
> but apache [sic] doesn't know jsp [sic] tags. And if you want ever static file to
> be served by apache [sic] you need to stick with xhtml css and javascript.
If by "apache" you mean their Web Server (httpd), then it doesn't know
servlets either. Anything that can deliver a servlet can deliver a JSP.
Don't compare writing JSPs to writing static pages, compare writing JSPs to
writing servlets in .java files.
Lew wrote:
>> You didn't answer the questions. I asked where you mounted the application,
>> and what happens if you navigate to its URL.
gert:
> NetBeansProjects/w3c/src/java/response/appointment.java
> Can't navigate to it with browser is not in the web folder ?
That isn't where you mounted the application, that's where you developed it.
You apparently did not deploy the application to Glassfish. The Glassfish
manager application has the means for you to deploy your WAR file. NetBeans
also knows how to deploy an application to a Glassfish server.
(Right-click on the project and select "Deploy" or "Run". You have to have
set up the project properties to have Glassfish as the server.)
>> Then you need first to study how to deploy applications to Glassfish. Use the
>> product documentation.
>>
>> Then come back and report what happens when you follow directions.
Others have directed you to other links. I add,
<http://java.sun.com/javaee/5/docs/tutorial/doc/>
Measure twice, cut once.

Signature
Lew