This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I started working on Servlets4b, and have run into some strange phenomenon. Now, I downloaded the most recent version of jr.jar and put j2ee.jar in the directory where they are supposed to go, but things are just....different. When I tried to run the ant all deploy command, I got the complaint that the directory C:\java\src\java didn't exist. so I created it and ran the command again. This time I got:
[war] Building war: C:\java\build\dist\videos.war [war] Warning: selected war files include a WEB-INF/web.xml which will be ignored (please use webxml attribute to war task)
I don't understand what I'm being told here. I'm thinking I need to change by build file in some way, but I'm not sure how. I opened up the videos.war file and it was pretty empty. It seems a lot of files are missing.
So I went ahead and started orion and got the login page to display, and upon typing in the password, the next page displays, but after that, nothing works. No matter which button is clicked, that same empty list page is all tah shows up. Weird.
</target> (I took some lines out) Some of the files I need are not being compiled and put where they belong in orion. Did the build file get changed recently? [ July 18, 2006: Message edited by: Marilyn de Queiroz ]
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Mar 15, 2001
Unfortunately, I fixed the problem last night and I can't remember how. I'm a little doped-up on cold meds. I don't remember creating a java and web directory inside of my C:\java\src directory. That doesn't mean I didn't do it, I just don't remember doing it. I'm pretty sure that all of my java files were put directly inside the src file, and not inside another directory. but like I said, my memory could be faulty. When I created the java directory and put all the source files where they belonged, the build worked, but I'm still getting that message about a web.xml file that won't be used. When I deleted it from video.zip the build failed. When i put it back, it worked. So that file is being used. Anyway, with exception of these two complaints:
compile: [javac] Compiling 63 source files to C:\java\build\classes [javac] Note: C:\java\src\java\com\javaranch\db\DBFacade.java uses or overr des a deprecated API. [javac] Note: Recompile with -deprecation for details.
war: [war] Building war: C:\java\build\dist\videos.war [war] Warning: selected war files include a WEB-INF/web.xml which will be ignored (please use webxml attribute to war task)
everything is working now. All the buttons do what they're supposed to. Now I just have to figure out what to do with the Cookie stuff. I used a token in the original verson of this assignment. Is that still the approach, or should cookies be used by themselves?
Marilyn de Queiroz
Joined: Jul 22, 2000
No tokens. Just cookies.
I'll check on the web.xml warning. Perhaps I forgot a statement in build.xml.
Don't worry about the deprecated stuff. It has to do with some statements that had to be put into jr.jar that don't affect anything we're doing here on the Cattle Drive. Although I'm not sure I understand why you would be running javac on DBFacade.java ... Did you unjar jr.jar?
Joined: Mar 15, 2001
Originally posted by Marilyn de Queiroz: I'm not sure I understand why you would be running javac on DBFacade.java ... Did you unjar jr.jar?
Not to my knowledge. I do have jr.jar in a few different locations, like a directory named resources/web-inf/lib/ as well as src/web/web-inf/lib/ both located in C:\java. I may have un-zipped it at some time in the past, and just don't remember doing so. I'm just running the ant all deploy command and for some reason it is giving me that message. It doesn't seem to interfere with anything, and I have been getting that message all along, even with Servlets 4a.