aspose file tools*
The moose likes Cattle Drive and the fly likes Questions about Servlets-3b Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Questions about Servlets-3b" Watch "Questions about Servlets-3b" New topic
Author

Questions about Servlets-3b

Susan Brown
Greenhorn

Joined: Jan 26, 2005
Posts: 11
After a month off doing non-java things, I'm trying to get back to the javaranch assignments. My next one is Servlets-3b which is to do an Ant file that will set up and deploy a war file, and I have some questions:

1: A month ago I typed in the build.xml file on the web page. Last night I compared the current build.xml file with the one I typed in a month ago. They are different in that they use different directory structures for the java, jsp, web.xml, etc. files. I have yet a different directory structure for my servlet stuff. What are you looking for in the Ant file? My preference is to use my current directory structure.

2: The assignment instructions say to modify the Orion default application so that default application is the class assignment. I'm working with Tomcat and I can temporarily modify the default application to be the class assignment but I'm wondering if it's okay to do the assignment so that the war file sets up another servlet application that can be accessed through the servlet container. Also, I'm pretty sure I can figure out how to do this with Tomcat. I'm guessing, but I'm not sure, that a war file set up for Tomcat should work with Orion? Do you know?

Thanks.

Susan
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
Arggh. You got me! I just updated the servlets assignment page a day or two ago. The current one is the preferred directory structure. In fact, ..., well, I'd better not say anything just yet.

Re: modifying the default application; it's only temporary. Assignment Servlets 4a introduces the concept of putting each application into its own root (context).

a war file set up for Tomcat should work with Orion?
yes. War files are standardized so they should work with all the app servers.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Susan Brown
Greenhorn

Joined: Jan 26, 2005
Posts: 11
It turns out to be easier to deploy a war file that is not the default servlet in Tomcat. To be specific I'm having problems getting Tomcat to expand a war file into the default servlet. At the same time it's easy to get Tomcat to expand a war file that is not a default servlet. Do you have a problem if I do the assignment by creating a war file that creates a non-default servlet?
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
It'll be ok as long as I can still run your code in Orion.
Susan Brown
Greenhorn

Joined: Jan 26, 2005
Posts: 11
Thanks. While trying to deploy the war file as the default servlet, I managed to delete a number of files in the webapp\ROOT directory and I also apparently did something to some configuration files because my Tomcat no longer works. What fun. Now I'm trying to reload and configure Tomcat so I can use it again. I guess you can call this a good learning experience.
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1187
Yeah. You gotta love those learning experiences!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Questions about Servlets-3b
 
Similar Threads
servlet caching under Oracle OC4J/Orion
Need Servlets 4a Help
JSP and Servelet
Ant and Assignment 3b
I am looking for a little help setting up Tomcat for Ant build/deploy