• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Depolyment on WAS 4.0

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where should I put a single servlet or JSP in WAS instead of converting them into WAR or EAR?
Thanks
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"kkyim"
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
About your query WAS 4.0 does not have a folder structure similar to that of Weblogic server and other server where you can drop the servlet, edit the web.xml file and vo it starts. You will need to create the ear file to test your servlet.. I know it is cumbersome. But I think the basic strategy is to use something like VAJ for writing your code and testing it out and using WAS 4.0 only in the deployment scenario
Thanks.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by kkyim:
Where should I put a single servlet or JSP in WAS instead of converting them into WAR or EAR?
Thanks


The short answer is you can't, at least not in Websphere 4.0. WAR files are the only J2EE-compliant way to package JSP or servlet files.
Having said that, though, there IS a way that you can "sneak" a new Servlet or JSP into an existing web application (like, for example, the default server's example application) without having to put it inside the WAR. Read the section in the InfoCenter on "hot deployment" of servlets and JSP's and the section on the "EAR Expander" tool, and that should show you how it's done.
If you still have questions after that, leave a new message here.
Kyle

------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
kkyim
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your advice!
I've another question about the AA tool.
I've created an EAR and installed in the WAS (using admin console). If I update the servlet and regenrated the EAR in the AA tool, how can I update the EAR in WAS? Should I re-install the EAR again?
Thanks
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the accepted way to handle this is to delete and then reinstall the EAR file. However, the section on Hot Deployment mentioned above shows how you can avoid doing this for quick tests or deployments.
However, I think that for sanity's sake (and good SCM practices) that deleting and re-installing is probably your best bet.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
Rahul Mahindrakar
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"kkyim"
Please reregister following the registration rules failing which I will be forced to block your account.
Thanks.

------------------

Mahindrakar
IBM/Websphere Forum Moderator

Consultant - Zensar Technologies ,Pune India.
SCJP2, SCJD2 & SCJEA (Part I)
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Noway..... There is no way in WAS 4.0 to test your single servlet without creating a war/ear file. Your best bet will be VAJ. If you are using Visual Age for Java, you can test that in WAS Test envrionment, which comes with VAJ. Or you can download some other servlet engine ie. Tomcat's Jakarta. This is a freeware and very easy to configure for this kind of testings...
Regards,
Yogesh Gautam
WebSphere Architect
IBM Canada
yogesh_gautam@hotmail.com
 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Yogesh Gautam:
Noway..... There is no way in WAS 4.0 to test your single servlet without creating a war/ear file. Your best bet will be VAJ. If you are using Visual Age for Java, you can test that in WAS Test envrionment, which comes with VAJ. Or you can download some other servlet engine ie. Tomcat's Jakarta. This is a freeware and very easy to configure for this kind of testings...


Well, if you did create an .ear once, you can copy each new servlet in the Web-INf/classes/... modify the web.xml accordingly, and then test the servlet.
Yogesh, WTE is not always (should I say never ?) a good solution because it is a WAS 3.5, not a WAS 4...
 
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!