Reposting Question about WAR files because...

... because I am truly at my wits end and almost out of time for this project. My apologies. Can someone please help? Thanks.
+=====================
I know this should be trivial but it is just not working for me...
I have a (Tomcat 3.2.3) application consisting of various html and jsp and tld files currently under \webapps\alan\app1. The tags refer to handlers and tei files in \webapps\WEB-INF\classes\alan\app1. The web.xml file in \webapps\WEB-INF does not refer to any of these elements at the moment. Everything works just fine.
I want to create an app1.war file for all the above which can be deployed somewhere else entirely, say c:\bob. According to what I read in various places, all I need to do is create a web.xml file that adds a <servlet> tag for the jsp files (using <jsp-file> rather than <servlet-class>), create an app1.war file using the jar utility, and add a <context> block to server.xml to define a virtual path to c:\bob\app1.war. I did all these but Tomcat (after restart) cannot find my jsp files.
I believe I must be specifying something incorrectly. Would the context block be something like:
<context path="/whatever" docBase="c:\bob\app1.war" crossContext="false" debug="0" reloadable="true" trusted="false">
Also, in the original location I pointed my browser at alan1/app1/fu.jsp and Tomcat found the files easily (since they were under webapps). Is it enough to just add to the web.xml file blocks like
<servlet><servlet-name>fu</servlet-name><jsp-file>fu.jsp</jsp-file>
or must I add something else to web.xml?
Perhaps the problem is in the URL I type into the browser address?? Should it be
http://host/whatever/fu
or
http://host/whatever/fu.jsp
or
http://host/whatever/alan/app1/fu.jsp
where "/whatever" is the virtual path to c:\bob\app1.war defined in server.xml?
Actually I tried all these (and other combinations) but without luck...
Please excuse the simplicity of this question but I just cannot seem to get the war file working

Your context is incorrect. The docBase parameter is relative to the Tomcat install directory. The following should work, provided tomcat is installed on the same drive as the jsp files etc:
<context path="/whatever" docBase="../bob/app1"
crossContext="false" debug="0" reloadable="true"
trusted="false">
The above works for the directory c:\bob\app1 with jsp & html in it, but I couldn't get it to work for a war file.
The idea of war files is that you upload them to a server, which unpacks them wherever it wants, and automatically adds the context to its list (so you really don't need to worry about context settings in server.xml, unless you want to define a custom url that maps to your files)
You can see this in action if you just put your war file in %TOMCAT_HOME%\webapps and start the server (don't make any other changes) - it will expand the war file automatically and add the context.
In fact, this would be a good first step to make sure your war works and you can access the jsps after you've changed the web.xml file
Incidentally, you wouldn't need to change the web.xml file, either, unless you specifically want to map an "alias" name to your jsps/servlets. If you're happy with just typin their actual names in your urls, then don't touch web.xml. If, however, you want the user to type "http://host/whatever/fu" instead of "http://host/whatever/fu.jsp", then you'd need to mess with web.xml
I'd advise doing one minimalist step at a time, since Tomcat will bite & scratch you otherwise ;-)

Similar Messages

  • Question about download file in OAS4

    Question about download file in OAS4:
    I use Oracle Application Server 4.0.7 on my Windows NT 4.0 SP6;
    I use PL/Sql Cartridge developer a document system; It's use the
    upload/download in PL/Sql Cartridge;
    I read the document , the Upload/download in Pl/Sql Base on the
    Oracle Application Server's Content Service. the Problem is when I
    download a document, If I upload a Html or MsWord file, It will store in a LongRaw column, when me download ; It's tell me can't
    find a application to open this file; I will select a application
    from list to open the download file;
    As normal, It will open MsWord Automatic when download a "doc" file ; also It will open a new window of Browser to view a Html file;
    I check the download process on client Browser; when download
    file, The content-type always return "application/octet-stream";
    Also the download File will lost the postfix of the file,
    So Browser don't open the File Automatic;
    I think If I set the correct Content-Type , Browser can know how open the file; So I use owa_content.set_content_type procedure
    set the Doc file to "application/msword" , but the WEb Server always
    return "application/octet-stream";
    I didn't know how to do this problem, Plese help me.
    null

    I have a Tecra M2 and rely on your email update to ensure I have the latest drivers on my machine.
    When I received a Toshiba support email on 14 April 2005 giving reference to a QFE from Microsoft I assumed it would be necessary for my Tecra.
    I was very confused when I found that this QFE and subsequent ones posted on the 16 April 2005 relate to Pre SP2 critical updates no9t required if one has already taken earlier advice of updating to Service Pack, at the very least your narrative should make mention of this. I find it very difficult to believe that your updates are two+ years out of date.

  • I have a question about DWG files.  Can I open them on my MacBook Pro with OX 10.9.5 system?What app do I need to view and print them?

    I have a question about DWG files.  What app will allow me to open DWG files to view them on my Macbook Pro?

    Perform this Google search: ".dwg files on mac." The results should provide answers for you.

  • Question about openning files using SDK 10.

    I have written a Plug-In for SDK 9 that works wonderfully. One of the functions is for the user to be able to page (Next/Previous) between PDF files on our server. This functionality now longer works without crashing Acrobat 10. All I am doing is creating the URL path to the next/previous PDF, creating a CustomFileSys with the path and calling AVDocOpenFromFile.
    Does this no longer work with Acrobat 10 SDK?
    Thanks!

    Should work fine, AFAIK.
    For this level of issue, I would open a formal support request with developer support.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 10 Oct 2011 08:51:08 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Question about openning files using SDK 10.
    Question about openning files using SDK 10.
    created by Greggars<http://forums.adobe.com/people/Greggars> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3963065#3963065

  • Questions about properties files

    Hello,
    I have two questions about properties files.
    1. Is it possible to import a properties file from another properties file?
    2. Is it possible to have variables in a properties file as described below in code snippet.
    Thanks in advance,
    Julien.
    Code snippet:
    var_one=foo
    var_two=$var_one bar
    The second line would then read "foo bar"

    Hello,
    I have two questions about properties files.
    1. Is it possible to import a properties file from
    another properties file?If you write your own code to parse whatever import statement you decide to put in the properties file, yes. But there's no provision to do so in the core APIs or in the standard usage of these files.
    2. Is it possible to have variables in a properties
    file as described below in code snippet.Same as the answer to your first question. Though this kind of thing is more common, so there might be a library at jakarta or sourceforge or mindprod or something that does this.

  • Questions about converting files in order to import to iMovie '09?

    I was able to import the videos from my camera (.mts files) into iMovie '09, but now when I click Import from Camera, iSight opens up instead. Since I can't find out why it won't open up my camera files now, I have decided on just converting the files. I just have a question about converting though. The videos I recorded from my camera are in HD. They're very good quality. If I convert the videos from .mts into .mp4, would that reduce the quality of the video?

    When that happens to me I get stubborn and make iMovie see the camera by shutting down and reopening iMovie, because I don't want another level of transcoding. If that doesn't work and you have a card reader of even better, a sd slot on your iMac, just plug the card in. If it appears on the desktop iMovie should see it, and if it appears on your desktop then iMovie should read it.
    I have a Canon HFS 100 that works best if I take the card out and plug it into the computer.
    The times I converted to .mp4, I thought the quality did degrade, because it had to be converted to .mp4 and then imported as AIC. But I am not an expert on whether iMovie can deal with .mp4 directly.
    Canons require that one have the camcorder plugged into a power outlet, another reason to use a card reader.
    What kind of camcorder do you have?  With some camcorders, if one takes both photos and video, the video won't be read.
    When nothing works, occasionally deleting iMovie preferences works.
    Hugh

  • Question about pictures file in home folder

    I am trying to create more space on my hard drive and have a question about the pictures file.
    In addition to the iPhoto Library I have several folders named 1, 2, 3 etc each containing a bunch of photos; plus several hundred individual photo files.
    My question is whether these files are duplicates of what is in the iPhoto Library - and is there an easy way to find that out?
    And I guess also to find out how they got there in the first place. Could these be imports from disks as opposed to my digital camera?
    Thanks for any help,
    Laura

    Hey laura,
    I haven't used iPhoto for a while but from memory i think that i work similar to iTunes. Whne files are processed by iPhoto they are catalogued on the hard drive according to the iPhoto preferences. I would check out the iPhoto preferences and see if you can see anything in here that will tell you what is going on.

  • Question about Domain file size...

    I have a dot Mac account, and my iDisk capacity is 1 Gb.
    As I regularly back-up my Domain file from my G5 iMac to a FW external drive that sits on my desk, I have just noticed that the file size is now just over 1 Gb.
    Can someone please explain to me why I still have almost 700Mb left on my iDisk, yet my Domain file size is over 1 Gb?? Obviously, there must be 'internal' files that aren't copied to the iDisk.
    Thanks,
    Rachel.

    Wow, that's quite a discrepancy. 1gb Domain vs. 300mb site? Well suffice it to say that the Domain file contains all the information that is needed to generate your site. But it makes me curious too why you have such a large discrepancy. Do you have a lot of video on your site?
    My site is only about 50-60mb and my Domain is roughly the same size. When I first started using iWeb, I used to poke around inside the Domain file quite a bit more than I do now. You can open up your Domain file by Control-clicking it and selecting "Show Package Contents." At one point early on when I was blithely dragging and dropping stuff into iWeb and publishing just for experimentation, I noticed that even after I deleted images or EVEN WHOLE PAGES, that sometimes the Domain file would still contain images and quicktime movies left over from the deleted pages. I didn't know what was going on and actually tried to delete the "old" items from the Domain file, but I ended up with a non-functional Domain file...lots of error messages saying it was missing this and that. So I started over completely with a new Domain file. I also noticed at the time that my Domain file was several megabytes larger than my site.
    Since then, I have been very careful only to drag items to iWeb that will actually be used. The Domain-to-site size ratio has stayed pretty much 1:1. So I chalked up my earlier experience as a fluke. I don't know. Maybe there is an inconsistency somewhere. In fact, do a search here on "Domain file optimizing" or "Domain file bloat" and you may be able to find my questions about the issue. I never did get any responses, though.

  • Question about sorting files in media library

    Hey,
    I'm Sam Hoste from Belgium and I have a question about sorting music files in my media library in iTunes.
    My music collection mainly exists of complete albums instead of individual songs. The problem is that I can not play the songs of an album in the same order as on the tracklist of the album in the media library of iTunes.
    I also take very good care of the ID3 tags from my mp3-files, but that doesn't help.
    For example, if I had an album with the following tracklist,
    01. Artist - Song 1
    02. Artist - Song 2
    03. Artist - Song 3
    04. Artist ft Otherartist - Song 4
    05. Artist ft Otherartist - Song 5
    06. Artist - Song 6
    07. Artist - Song 7,
    every music file would have an ID3 tag for tracknumber (1, 2, 3, ...), an ID3 tag for artist ("Artist" or "Artist ft Otherartist"), an ID3 tag for title (Song 1, ...) and an ID3 tag for album ("Albumname").
    When I load this album in my media library in iTunes, I cannot get them sorted by album and by tracknumber on that album. When I sort by artist I get this list:
    01. Artist - Song 1
    02. Artist - Song 2
    03. Artist - Song 3
    06. Artist - Song 6
    07. Artist - Song 7
    04. Artist ft Otherartist - Song 4
    05. Artist ft Otherartist - Song 5.
    But that's normal, but even if I sort by album I get the same list:
    01. Artist - Song 1
    02. Artist - Song 2
    03. Artist - Song 3
    06. Artist - Song 6
    07. Artist - Song 7
    04. Artist ft Otherartist - Song 4
    05. Artist ft Otherartist - Song 5.
    So the songs aren't in the same order as they are supposed to be on the CD. And I would really like my albums to play in the same order than on the tracklist on the CD.
    I think the problem is caused by the fact that when you sort by "album" in iTunes media library, iTunes first sorts by albumname, and second by artistname, and third by tracknumber. In stead of sorting first by albumname, and then second by tracknumber in stead of the artist.
    My question: Is there a way to make sure iTunes sorts by albumname, and then by tracknumber in stead of artist, so I can play my albums in the same order as on the CD? Or is there an other solution for this issue?
    Thanks and kind regards,
    Sam Hoste

    See my previous post on Grouping Tracks Into Albums, in particular the topics Use an album friendly view and
    Tracks out of sequence.
    tt2

  • Question about HTML files using TextEdit

    First off, I wanted to ask if this is the proper place to post a question about HTML/XHTML. I couldn't really find anywhere else that seemed to fit better, but please point me in the right direction if this is not the place. Thanks.
    Moving on -- here's my question:
    I'm having trouble with working with HTML files in TextEdit. I'm on a Mac, using TextEdit as my HTML editor (I can not afford one of these other HTML editors, and I like using a simple text editor like TextEdit for HTML). Here's my problem: I open a new rich text document in TextEdit and write my HTML and then choose File>Save As and choose "HTML" under the File Format drop-down box. Having saved this file as an HTML file, I then open Safari and choose File>Open File and select my HTML file; however, when I do this, my web page's text does not appear in the browser window. Instead, the HTML code itself appears in the browser window, as if the browser was not interpreting it as HTML and converting it. The same problem happens when saving the file as a .htm file using Microsoft Word for Mac.
    So, as another solution (at the suggestion of a helpful poster in a previous thread), I tried creating a plain text file in TextEdit (instead of a rich text file like before). Now, in TextEdit there is no option for saving plain text files as HTML files, so I simply save it as a Unicode-8 format and then find the file in Finder and change the extension to .htm myself (I've tried .html as well). This, fortunately enough, actually works! When I open the file in Safari I get to see my web page as expected. However, the first time I quit out of the application TextEdit and then try to reopen my .htm file in TextEdit, I no longer can see my HTML code. Instead, TextEdit shows me the actual web page text that I would expect to see when I open the file in a browser, and my HMTL code is lost.
    Can someone please help me here? There has to be a way to edit HTML in TextEdit without the code disappearing every time you quit out of the application and reopen the HTML file. Any help is greatly, greatly appreciated. Thank you.

    That's the problem -- once I convert it to plain text there is no longer an HTML option under the Save As drop down menu. The drop down menu's title is Plain Text Encoding instead of File Format and the only options I get are Unicode-8, Unicode-16, Western, Chinese, and so forth. I can save it as an HTML file, but only if the file is rich text, which doesn't work for HTML.
    So, I can save it as plain text (.txt) and then go and change the extension myself, and like I said, it works if I do that. I can edit HTML in TextEdit and open the file properly in Safari to view my web page. The problem is (I went over all this in my first post) that, after that, if I exit TextEdit and reopen it, my document is no longer HTML code -- it is now simply the text of the web site as if I had opened it in a broswer.
    What do you suggest I do?

  • Question about PageMaker files

    Can my old Mac Pagemaker files be open and used in the newer Mac with OS 10.6.8 which my Granddaughter has given me?  If so, with all InDesign versions?  I'm an old **** and this is the first time I'm trying to use a Discussion Group.  How do I know when there is an answer?  Do I have to keep this website open, or check back sometime, or will I receive an Email or phone call?  Please let me know by means other that this site, to get started with.  My Email is [removed by forum host] Thank you,  Gerda May
    Message was edited by: Peter Spier

    Dear Peter (if I be so personal).  First, thank you for deleting my Email
    address on the post and saving me a lot of spam.  Further, you were most
    gracious in sending more specifics in regard to the answer of my question about
    using PM files in InDesign.
    However, I am trying hard to understand your instructions to unembed "links" and
    bring them up to date.  However, I have no idea of what links are, are they
    something I would have intentionally done or are they automatic, and something
    of which I have no control over?  How do I locate them?  Are these procedures
    also necessity for using my old Photoshop 6 files?
    I only use 2 Programs: PageMaker 6.5 and Photoshop 6.  I have inherited a newer
    Mac with OS 10.6.8 which has only the basic Mac programs in it.  As you can
    guess, I need to identify which are the proper newer programs to obtain for it,
    with the least bit of effort and understanding.   
    I use PageMaker to write letters, and compose stories for printing in a Club
    magazine.  I also resurrect previous stories, that I've stored through the
    years.
    In Photoshop, I fix up new and old pictures for inclusion in stories and also
    resurrect previous photos I've stored on an external Hard Drive, or placed on a
    CD.
    If you would be so kind to steer me in the right direction, I will be most
    appreciative.  Trying to understand computer things is hard for me, and often
    times unsuccessful.  Please just smile and don't laugh, I'll bet you can't take
    shorthand or bake Dutch cookies, either!  Looking forward to some instructions,
    if you have the time, with many regards, Gerda May.

  • Short question to WAR-file

    Hi there,
    I've searched the forum but couldn't find what I'm looking for ... I'm just about to test Tomcat with WAR-files:
    1) I got Tomcat 5, unzip, startup --> running fine
    2) Have created a demo WAR using NetBeans, working fine, too (in NetBeans)
    3) tried to copy the war file into the webapps folder in tomcat --> deployed (no errors)
    4) looked up, what's the URL-pattern for my service (is "/servlet/Eval") <-- well ...
    5) tried to access the service via "http://localhost:8080/servlet/Eval" --> NOT FOUND (???)
    Port is right 'cause the start-page appears. What's wrong here?
    Thx for reading.

    I think the URL you used to invoke the servlet is incorrect.
    I'll assume that:
    Your WAR file is named my-app,
    You have a web.xml in its WEB-INF directory that maps your servlet class to a URL /my-servlet,
    Your servlet is in a package.
    If all this is true, the URL should be:
    http://localhost:8080/my-app/my-servlet
    See if that's better.

  • Questions about adding files in LR3

    I've been a happy LR user for years. I used the LR3 beta and liked it (especially the 2nd version) and generally I'm very happy with the release version of LR3. But I have some questions about the import process.
    In LR2 I could edit off my Compact Flash cards (I know that's not smart, but sometimes on deadline fast is better than not smart) by adding the photos my library without moving them. That option is grayed out in LR3. Is there a way to turn it on or is this is a "new feature." If it's a permanent thing, maybe for 3.1 or the next incremental upgrade Adobe could make this possible with a popup (like we get when adding captions to multiple files) warning that editing photos on a CF (or SD) card is a bad idea. But let us make the decision.
    jack

    It's a deliberate change - time to adjust the workflow!
    John

  • Questions about Photo Files

    I am new to Mac and have a couple of questions about storing photo files just so I'm clear on everything I'm doing (or should be doing).
    I have copied my files over from an external hard drive to the Pictures folder on the Mac which seems pretty much how they were stored in Windows. I have always used Photoshop to edit my photos and will be doing the same on the Mac plus I am going to start using Aperture.
    I thought I would check out iPhoto today and if I understand correctly it imported (copied) all the photos in my files over to it so now there are two copies of all my photos and double the space taken up on the hard drive. Can someone confirm this is true and if probably not the best way to store my photos since I will be using Photoshop?
    My second question, is there a way to have thumbnails of the photos in folders with out opening the folders?
    Any and all advice on photo files, storage, ect. is welcome!
    Thanks in advance

    Hi
    That's correct - when iPhoto imports your images, it stores them in its library (Pictures/iPhoto/iPhoto Library, which appears to the Finder as a single file, but which is actually a package containing files and folders). It doesn't delete the original version.
    Both Aperture and Adobe Bridge (which is bundled with Photoshop) will themselves have the ability to manage your images, so you'll probably want to decide which application you prefer for image organisation and stick with one or the other. Aperture and iPhoto will also work together, so you can actually choose to store your masters in iPhoto if you prefer its image management.
    Both Aperture and Bridge have "thumbnail view" of an image library, or you can do a quick and dirty preview by opening the image folder in the Finder and switching to icon view (and using the View Options menu - cmd-J - to increase the icon size if necessary).
    Matt

  • Question about upload file to sever in jsp.

    i found some articles about upload file in jsp, and most of suggested that the third party classes will be used.
    but i want to know the basic technology behind them, for example what kind of class needed ( using java.io.* as usual)
    and what the process for writing a file to sever.
    any document or url link useful will be very welcomed.
    best regards

    Uploading a file is similar to sending any other kind of data, except that it must be encoded differently than a standard HTML form... Typically you will set up your form like this:
    <form action="/upload" enctype="multipart/form-data" method="POST">
    <input type="file" name="myFile">
    </form>
    The enctype declaration is necessary -- your file won't arrive intact any other way. However, the JSP/Servlet specs don't provide any code to deal with forms which are encoded this way, so things like request.getParameter() don't work. You will either have to roll your own code, or use a third party library.
    For more information, see RFC 1867, File upload in HTTP:
    http://www.faqs.org/rfcs/rfc1867.html

Maybe you are looking for

  • Hdmi adapter problem

    I own Phillips 32pfl9604h TV. Recently I bought HDMI adapter. When I set up the iPad with HDMI to TV , TV is recognizing the iPad but the format is constantly switching between 2 different formats. I tried to connect it to a different model of TV and

  • Horizontal scrolling faster than Vertical scrolling

    I have a jscrollpane, containing a jtable as its component view. When i drag the vertical scroll bar, the painting is slower than when i drag the horizontal scrollbar. I've tried using a profiler to understand, but i didn't. Can anybody help me ?

  • Satellite P10-804: AC adapter makes loud noises

    The power supply is periodically making terrible noises. Can it be replaced with a non Toshiba power adaptor ? If yes, is there anything I need to know ?

  • Got problem in selcting scroll menu

    here the thing   i am importing chines data from an xml file and showing them in flash  as marquee so i want them all to come behing each other like a  new  so i made it and make the looping things but now the problem comes is when ever the last data

  • Specific Browsers not displaying iWeb Blog Entries...

    As of this morning, Firefox AND Safari are not displaying a month's worth of entries. They start back in April, but nothing more current. Google's Chrome does show everything properly. I dumped the cache and history of the browsers and re-published i