wood burning stoves 2.0*
The moose likes Websphere and the fly likes JSPs and Servlets in WAS, without a web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Websphere
Bookmark "JSPs and Servlets in WAS, without a web application" Watch "JSPs and Servlets in WAS, without a web application" New topic
Author

JSPs and Servlets in WAS, without a web application

Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Hi all,
Is it possible to deploy JSPs and Servlets in WAS, without them being a part of any web application(even default web app). If yes, what is the document root, and how do we specify the URI and such properties for a servlet?
-Bala Krishna
Suneel Setlur
Ranch Hand

Joined: Nov 26, 2000
Posts: 202
Hi
Guess this question has been asked by you earlier and answered.
Any way, you could go to the WebSphere server console, create a virtual host and deploy your JSPs there.


Suneel
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1850
Hi,
Suneel you don't deploy your servlets/JSP's in a virtual host. You deploy them in either a servlet container.
Bala,
If you put your servlets in the <WAS_home>/appserver/servlets your servlets will work with http://localhost/servlet/HelloWorldServlet
Where HelloWorldServlet.class is available in the servlets Folder.
If you want to play around with your jsp's then you can put them in
<ibm http server root>/htdocs
Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Thanks for your answer. I have tried out what you told me about placing JSPs in htdocs. The url I am trying is : http://localhost/htdocs/test.jsp. When this didn't work, I've tried http://localhost/test.jsp. That didn't work either.
What should be the URL for accessing JSPs stored in this directory? We are using IHS 1.3.12 and WAS 3.5.2. What am I doing wrong here? Could you please help me?
Tony Chen
Ranch Hand

Joined: Jan 29, 2001
Posts: 286
To deploy JSPs, you need to put the JSP files into the "Document Root" of an "Web Application" which is in turn in a "Servlet Engine" of an "Application Server". The /htdocs directory of IHS just serve the static html pages and has nothing to do with WAS.
You MUST setup an "Web Application" to serve JSPs & Servlets.
Try it again! Good luck!
You can find more info about Administer applications here
------------------
Tony Chen
SCJP, ICS & ICSD (WebSphere)


SCJP Java 2 - IBM Certified Enterprise Developer - WebSphere V4.0 & V5.0 - IBM Certified System Administrator - WebSphere Network Deployment V6.0 - Canadian Securities Course (CSC) Certification
Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Tony,
Thanks for answering. That's exactly what I wanted to know - whether or not we can server JSPs without a web application. Looks like this is a short coming in Websphere(to not be able to server JSPs without defining a web app). I already have created web apps and been able to serve JSPs thru that, but wanted to know if I always have to go thru the pain of having a web app. Thanks once again.
-Bala.
 
GeeCON Prague 2014
 
subject: JSPs and Servlets in WAS, without a web application