• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Questions about Servlets-3b

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Susan Brown
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It'll be ok as long as I can still run your code in Orion.
 
Susan Brown
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah. You gotta love those learning experiences!
 
reply
    Bookmark Topic Watch Topic
  • New Topic