Jim Babcock

Ranch Hand
+ Follow
since Dec 03, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jim Babcock

Anyone have a good recipe for building apps at ROOT level using Ant on Tomcat? I've struggled mightily with this (it toook me forever to figure out that the ROOT part of the path is hard coded in Tomcat for 5.X... a little cheesy, IMHO) and have it working, but it seems like a hack. It really seems like Tomcat really doesn't expect that anyone would want to run an application at /.

Currently, I'm setting the app.name as 'ROOT' and app,path as '/'... which works, but it choke when you deploy it on the javadocs because it results in a null package name.

Even if I do create everything as a named application and use / as a static landing page, how do I deploy it? It seems like its breaking the paradigm to to maintain the landing page in dev/test/production by hand when I'm using a deployment tool to promote apps from a single point of code... or am I missing something real basic as usual?

Thanks,

Jimbus
18 years ago
Hello,

I've got a couple of generic questions about Tomcat and was hoping I could get some answers and maybe even a little discuuson about them.

1) What's the difference between Tomcat and Geronimo? Reading the descriptions on their landing pages, I see that Tomcat is a jsp/servlet container and Geronimo is a j2ee container... but isn't Geronimo just an an amalgamation of Tomcats and Struts, two existing Apache projects? I'm confused as to why I should be excited by Geronimo. It seems like a resource drain... at least for the short term.

2) How fast/slow is Tomcat 5.5X? When I first started down this road, I was looking into an Apache/Tomcat figuration and was assured that Tomcat had had considerable work and was about as fast as Apache this days... But as I'm doing other research, I keep running across things that say that they picked up speed when they used Apache as the main server. Admittedly some of these post were older, but I'm still concerned. My application is mostly serving static WML pages to cell phones, but I'm developing some maintenance type applications that will be dynamic (another consideration is that my other servers are all dynamic apps and having as few configs to remember as possible keeps me saner .

Thanks,

Jimbus
18 years ago
I didn't think so and I apologize if this is inappropriate for this forum, but it is about j2ee.

Toward the end of my college career, around 93-94, I was involved with Youngtown State's ACM chapter and we were all geeked about the web. I wasn't impressed with a lot of it, most people's pages were just reposts of pictures and links they stole from someone else. But we saw the potential and tried to get the university to do something useful with it. We played with CGI to get things like class catalogs and the like published, but mostly the university thought it was a nice toy and that we should leave stop bothering people. (Actually, we were used. The Computer Center saw this as the future, but knew they couldn't get it passed the administration. So they gave us just enough rope to hang ourelves, shouted about how dangerouslt we were representing the University and took it all alway without even a good job or pat on the back. The same people who encouraged and helped us from the CC, told us we were luck to not get in trouble)

Anyhow, After college (may of 95) I hooked up with a group of people working for Control Data in Detroit looking to develope a product to ease database access and integration through the web. The Info*Engine product started out as Perl scripts running in CGI, but quickly became a share object mounted on Nescape 2's NSAPI. The cool thing was ten years ago, we had these things called webjects that looked almost exactly like bean tags. We went to the first JavaOne and were doing things no one else were doing: accessing sql databases through web based tags, accessing and integrating with products like Metaphase (think ERP for the design side), we were in Ford, Motorola,GM, Boeing Roketdyne doing real ecommerce style applications. We had a layered protocol that allowed us to develop customized adapters. But mostly, we had fun and thought we were cool .

Netscape and HP flew in and saw our dog and pony show and talk about partner, but we didn't here back from either one and they each had their own competing product within 3-6 months (Netscape's was livewire). We spun off some time during all of this and started our own company and then got bought out by Parametric Technologies as an integration tool for their Windchill product. We eventual were absorbed into the product and ceased to exist as a stand alone product. Just as I was left the company, they were starting to embrace j2ee, which was the death knell for I*E, because they really were redundant and Windchill was fully invested in Java technologies...

In the end, I don't know if it was just coincidence or we really had some influence on beans and j2ee. I just thought you ought to know there were a group of us out there doing it first and our company remembered.

I now return your regularly scheduled forum

Jimbus
I'd been using a bean and couldn't find a good discussion on patterns of use for that either. I suspect that I should have had a been for every table, but wasn't sure. In the end, because I couldn't figure out how to set up the most basic of where causes without just passing the whole thing as a string and defeating what I thought purpose of beans was, I just ended up just passing the whole sql string... which didn't seem to be much value add.

I guess I'm frustrated because it seems that all the books or web info I find is geared for simplest case or deeply theoretical and I'm stuck with just enough knowledge to do it wrong and need a concise guide to writing robust, scalable patterns.

Jimbus
I'm looking for resultSet info, as well. I've seen it inferred that I shouldn't leave things in resultSets, that there is another data structure that is better suited and releases the connection on pages that don't need to keep it open. Unfortunately, these folks never seem to actually say what to use.

I'd like to be able to insert a row into my resultSet w/o updating the DB, so I don't think resultSet is the data structure I want. Once I do the insert, I'd like to use two while loops to step through this and another resultSet, colelating them. Again, it doesn't seem like I have the right data structure. In the future, I may need to display data a page at a time and worry about throughput matters.

All of the tutorials I find are all variations on:

No takers on this one? I'm sure its just a dumb mistake or typo on my part, but I don't think I'll put this on out on my own.

*does his best to look helpless*

Jimbus
18 years ago
The answer is yes, tomcat does support javascript in form suthentication.

Once again a typo/stupid coder trick and some weirdness on Tomcats part had me searching forever.

I'd mv'd index.html to index.jsp in the login directory, thinking that I'd declared the directory, not the file in web.xml. And for some reason Tomcat cached the original page instead of throwing up an error message and NO changes I'd make on the pages had any effect. Madness, I tell you .

So when I went to make the login page match the style of the rest of the app, things got a bit testy... until I figured out my gaff.

Help this helps someone,

Jimbus
18 years ago
I got it:

type="java.lang.string"



I AM the typo king! The illegal type was causing it to not be bound.

*roar*
18 years ago
Hello,

If I declare the following in $tomcat_home/conf/context.xml:



and the folling in $app_home/WEB-INF/web.xml:



How do I access it in my jsp file? I've tried the following to no avail:



I get the error:



Thanks,

JimB
18 years ago
It'd be real nice if I could set focus on the j_username field.

It works when I copy the page to an unprotected realm...

JimB
18 years ago

Instead of typing http://localhost:8080/, I want to type the web server name like http://webserver/ and this should take me to default web page.



BTW, using "webserver" vs "localhost" is a DNS matter. localhost is (most likely) hardcoded to 127.0.0.1 in etc/hosts (or C:\WINDOWS\system32\drivers\etc\hosts). For your machine to be know on the web as whatever.net, you need someone with a DNS server to publish the name and link it to your IP address. Most companies and universities have the ability to do this, but if you are sitting at home with a cable modem, you'll have to someone to do it for you. There are some free services out there, do a google search. If you don't have a static IP, you'll need to software running that will dynamically monitor it and update the service.

That's probably way more simplified than you needed, but I wasn't sure...

Jimbus
18 years ago
I thinking browser issue. You could try installing firefox as a test. you could also try downloading something thats not associated a Microsoft product. Finally, use regedit to search for csv and see if you see anything funky.

I have had mime-type issue with Explorer in the past that didn't go away until I rebuilt the OS... but I'm not a windows guru.
18 years ago
Running on port 80, which is the default http port and necessary to not have a port number included in the URL, means running the server as root on UNIX systems. Any process running on any port below port 1000 (I think) has to be start by root as a security check.
18 years ago
This is a standard functionallity in Tomcat, as well. It's just the error you're getting isn't providing much information... not a Tomcat issue .

Have you put a mime-type enter for csv files in web.xml? I have one for xls files that looks like this:



It could be Explorer is cramping because it doesn't recognize the mime-type

Jimbus
18 years ago
Hello,

when I access a protected url directly, I get an unrecognized file type on the style sheet include and the url on the browser is to the style sheet, not the page that was the original target.

I built a login button on the unprotected landing page which calls a redirect page in a protected realm. The redirect points back to the landing page and the menu is conext sensitive, based on role. This works flawlessly. Once logged in, I can visit any of the pages without issue.

Let me add some relavant data... though this seems like DOH screw up on my part:

Style sheet include:



Realm entry:



Server.xml config

18 years ago