-
Servlets.......
Hi all,
Can we run a servlet without the servletrunner provided alongwith jsdk. i.e;
if we have a web server running can we access a servlet thru an html code
by placing the servlet in the server side ?
Since I am new to Java, can you also suggest me a good site/book for servlets
?
Thanks in advance,
Janet.
-
Re: Servlets.......
Janet,
If the web server which you are running supports Servlets, then you can access
the servlet from the browser too. For example, you have a form in the HTML
page, after user enters his/her data in the fields, you would like that info
to be passed to a servlet using the action=<servlet_name> attribute of the
form. You can then utilize objects of type HttpServletRequest and HttpServletResponse
in the servlet. That way, a servlet can be called from the browser.
As far as books are concerned, there are 2 books I'll recommend (1) Professional
Java Server Programming - Wrox Publications (2) Java Servlets - Jason Hunter
O'Reilly.
Feel free to write to my email address or post in the discussion group.
Sharad
"Janet" <janetsth@hotmail.com> wrote:
>
>Hi all,
>
>Can we run a servlet without the servletrunner provided alongwith jsdk.
i.e;
>if we have a web server running can we access a servlet thru an html code
>by placing the servlet in the server side ?
>Since I am new to Java, can you also suggest me a good site/book for servlets
>?
>
>Thanks in advance,
>Janet.
-
Re: Servlets.......
Thanks a million Sharad,
I had compiled my java pgm and placed the class file in root directory of
the web server. I then tried accessing the class file by including action="Firstservlet"
in the form tag ... but in vain , since it gave me an error.
Can you tell me , that if I have Microsoft Personal Web Server( or any other
server as for that matter ) how will I know whether it does support servlets?
Thanks again,
Janet.
"Sharad Joshi" <hisharad@hotmail.com> wrote:
>
>Janet,
>
>If the web server which you are running supports Servlets, then you can
access
>the servlet from the browser too. For example, you have a form in the HTML
>page, after user enters his/her data in the fields, you would like that
info
>to be passed to a servlet using the action=<servlet_name> attribute of the
>form. You can then utilize objects of type HttpServletRequest and HttpServletResponse
>in the servlet. That way, a servlet can be called from the browser.
>As far as books are concerned, there are 2 books I'll recommend (1) Professional
>Java Server Programming - Wrox Publications (2) Java Servlets - Jason Hunter
>O'Reilly.
>Feel free to write to my email address or post in the discussion group.
>
>Sharad
>
>"Janet" <janetsth@hotmail.com> wrote:
>>
>>Hi all,
>>
>>Can we run a servlet without the servletrunner provided alongwith jsdk.
>i.e;
>>if we have a web server running can we access a servlet thru an html code
>>by placing the servlet in the server side ?
>>Since I am new to Java, can you also suggest me a good site/book for servlets
>>?
>>
>>Thanks in advance,
>>Janet.
>
-
Re: Servlets.......
You are welcome Janet!!
First of all, a complete list of web servers and application servers is located
on the website
http://serverwatch.internet.com/webservers.html and
http://serverwatch.internet.com/appservers.html
respectively.
If you are using Microsoft's PWS or IIS, they do not support JSP and Servlets
directly. To know which web server supports servlets, you have to see its
product spec which is normally specified on the company's website which makes
that web server. I know jswdk / jsdk from Sun support Servlets, Apache does
too and so does BEA Weblogic. For PWS/IIS, you need a plugin app server like
JRun (www.allaire.com). Even on PWS/IIS, you can run JSP and servlets using
JRun.
The error you are getting is because your web server possibly does not support
Servlets.
Hope it helps.
Sharad
"Janet" <janetsth@hotmail.com> wrote:
>
>Thanks a million Sharad,
>I had compiled my java pgm and placed the class file in root directory of
>the web server. I then tried accessing the class file by including action="Firstservlet"
>in the form tag ... but in vain , since it gave me an error.
>
>Can you tell me , that if I have Microsoft Personal Web Server( or any other
>server as for that matter ) how will I know whether it does support servlets?
>
>
>Thanks again,
>Janet.
>
>
>"Sharad Joshi" <hisharad@hotmail.com> wrote:
>>
>>Janet,
>>
>>If the web server which you are running supports Servlets, then you can
>access
>>the servlet from the browser too. For example, you have a form in the HTML
>>page, after user enters his/her data in the fields, you would like that
>info
>>to be passed to a servlet using the action=<servlet_name> attribute of
the
>>form. You can then utilize objects of type HttpServletRequest and HttpServletResponse
>>in the servlet. That way, a servlet can be called from the browser.
>>As far as books are concerned, there are 2 books I'll recommend (1) Professional
>>Java Server Programming - Wrox Publications (2) Java Servlets - Jason Hunter
>>O'Reilly.
>>Feel free to write to my email address or post in the discussion group.
>>
>>Sharad
>>
>>"Janet" <janetsth@hotmail.com> wrote:
>>>
>>>Hi all,
>>>
>>>Can we run a servlet without the servletrunner provided alongwith jsdk.
>>i.e;
>>>if we have a web server running can we access a servlet thru an html code
>>>by placing the servlet in the server side ?
>>>Since I am new to Java, can you also suggest me a good site/book for servlets
>>>?
>>>
>>>Thanks in advance,
>>>Janet.
>>
>
-
Re: Servlets.......
Yes you can visit various good sites on Java like ITWorld.com,Java-zone,Netscape,Rediff,Amazon.com
etc.
Mukund.
"Janet" <janetsth@hotmail.com> wrote:
>
>Hi all,
>
>Can we run a servlet without the servletrunner provided alongwith jsdk.
i.e;
>if we have a web server running can we access a servlet thru an html code
>by placing the servlet in the server side ?
>Since I am new to Java, can you also suggest me a good site/book for servlets
>?
>
>Thanks in advance,
>Janet.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks