-
running servlets ?
Hi,
I have just started learning servlets. I have J2EE installed on my
machine. Will it be enough to run Servlets or do I need to install
Servlet development kit and stuff like that..
Any help is greatly appreciated.
Thanks
Satya
-
Re: running servlets ?
Satya Atluri <vatluri@in.ibm.com> wrote:
>Hi,
>
>I have just started learning servlets. I have J2EE installed on my
>machine. Will it be enough to run Servlets or do I need to install
>Servlet development kit and stuff like that..
>
>Any help is greatly appreciated.
>
>Thanks
>Satya
>
I've also just started learning servlets. I also installed J2EE along with
JDK 1.2.2.
Here is what I've learned by using the included stuff from Sun:
TO RUN(compile) A JSP PAGE, you have to have run a batch file located in:
C:\j2sdkee1.2\bin\j2ee.bat
You'll see the following message appear in the command prompt, "J2EE server
startup complete."
When you create new JSPs, simply put them in the C:\j2sdkee1.2\public_html\
directory, then open up any web browser and type: http://localhost:8000/<jsp
filename>, it'll take a few seconds to compile the JSP page into a Servlet,
then voila, you get your results.
TO RUN A SERVLET, you have to run a different batch file that comes with
the JSDK (don't confuse this with the J2SDK - two completely different installs)
which is located at C:\jsdk2.1\startserver.bat
You should then see the following message appear in another command prompt:
"JSDK WebServer Version
Loaded configuration fr
endpoint created: :8080"
Any servlets (class files) that you compile and create, you want to place
them in the following directory - C:\jsdk2.1\webpages\Web-inf\servlets\ directory.
After doing that, you can then open your browser and type the following
URL in: http://localhost:8080/servlet/<servlet name - AKA class file name>
I hope this is helpful to somebody. Is it just me, or does it seem like
quite a bit of hoops to jump through to test "simple" stuff? It was a trial
and error process to learn how to do the above stuff.
Herbie Wilson
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