john findler

Greenhorn
+ Follow
since Jan 23, 2006
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 john findler

Thanks. I kinda thought so. I wish the dangerously product-specific deployment descriptors were identified somewhere.
18 years ago
Hi Tom and Scott,

What advice can you give for using the eclipse IDE for development of web components and J2EE applications intended for deployment to JBoss application server? I particularly like the Borland Together Developer 2006 product, which is fully based on Eclipse. Note that like to create deployment descriptors, Ant and other artifacts manually (not via websphere automation tricks) Thanks.
[ February 08, 2006: Message edited by: john findler ]
18 years ago
Hi Tom and Scott,

What are the main issues to consider when this company (which I have contracted with) wants to develop under JBoss (during R&D) with the intention of eventually transitioning to their established production WebSphere environment?

Thanks!
18 years ago
GOT IT !!! I'll describe the solution tomorrow. simple.
18 years ago

Originally posted by Ben Souther:
... try:
<img src="${pageContext.request.contextPath}/images/myImage.gif" />



I agree with all of your facts. But Tomcat is not cooperating.

Here's some more detail - maybe you can help me find the problem:

1. I TRIED YOUR GOOD SUGGESTION

My href="<%=basePath%>Rules.html"
and img src="<%=basePath%>images/libback.gif"> (note that basePath has an ending slash in it)

have the identical effect as when I change to the syntax based on your suggestion:

... ="${pageContext.request.contextPath}/images/myImage.gif"

I verified that the browser's Properties on these links yields the correct absolute paths.

The resulting absolute URLs for my GIF and html become these according to the browser:
http://localhost/myapp/Rules.html
and
http://localhost/myapp/images/libback.gif
respectively.
These seem correct, but Tomcat does not want to serve them up.

But Tomcat does not treat these absolute URLs as expected.
The GIF displays as a broken [x] symbol on my jsp's page,
and if I click the html link, the browser just redisplays my jsp page.
It doesn't even given me a page not found or complain.


2. I TRIED ENTERING THE URLS DIRECTLY

I have even tried entering these absolute URLs in the browser address field directly.
Tomcat just does not revise the page, and doesn't complain.

As a sanity check, when I enter an absolute URL to the these same files which I copied again to webapps/ROOT, and webapps/ROOT/images,
Tomcat displays them fine. (e.g. http://localhost/Rules.html works fine). So there isn't anything wrong with the files themselves or the ability to serve them via an absolute URL to ROOT on purpose.


3. MAYBE A CLUE: TOMCAT DISPLAYS MY jsp page WHEN IT DOESN't FIND INTENDED FILES

I am wondering why Tomcat doesn't complain when it can't find the files instead of just redisplaying my jsp page.

It's as though Tomcat thinks the URL is addressing a directory and then displaying the default welcome page for .html or .gif .
But this can't be: I've checked all of the web.xml files in my Tomcat installation, and none of them
mention my application .jsp as the default welcome page or anything.

Thanks again in advance for your kind expert help

[ January 23, 2006: Message edited by: john findler ]
[ January 23, 2006: Message edited by: john findler ]
18 years ago

Originally posted by Ben Souther:
How are you referencing the images?
What is the syntax of your <img .. /> tags?



For static html references, this serves the file if its in webapps/ROOT:
See <a href="../Rules.html">Rules</a> <br>

For Gifs, for example, this serves the file if its in webapps/ROOT:

<body background="../libback.gif">


I have tried all combinations of
href="./Rules.html" <br>
href="../images/Rules.html"
href="<%=basePath%>Rules.html" (no extra "/" between the > and Rules)

and I have copied these html and gif files to everywhere under webapps/myapp:
...webapps/myapp
...webapps/myapp/WEB-INF
...webapps/myapp/images
...webapps/myapp/WEB-INF/classes

and in doing so, I have tried full shutdown of Tomcat, browser, and host,
and redeploy. Nothing makes Tomcat look in myapp for static files. It insists on looking in its ROOT for my static pages, even though it finds my jsp's references to jsp and classes under webapps/myapp just fine

Any suggestions now? (Thanks)

[ January 23, 2006: Message edited by: john findler ]
[ January 23, 2006: Message edited by: john findler ]
18 years ago
I have a JSP application (myapp) deployed successfully in Tomcat 5.5.12 with J2SDK1.5 VM. It successfully locates my compiled .class files and jsp's under my webapps/myapp application context directory, under WEB-INF and so forth.

My problem involves the static HTML and .gif files referenced in the jsp's.
Tomcat insists on finding them only under webapps/ROOT, rather than webapps/myapp . I have tried using relative and absolute URLs for the static HTMLs and GIFs. Tomcat only understands the relative URL (which is relative to the basepath of the application). Tomcat finds these HTML & GIF files when I copy them under webapps/ROOT instead of the webapps/myapp. I have verified that this is not a start-up, refresh, or cache problem. Tomcat instantly serves the referenced files if they are moved to webapps/ROOT when I resubmit the jsp application, and instantly sees that they are gone if I delete them from webapps/ROOT . Tomcat never sees the files when they are under webapps/myapp (which is where they are supposed to be).

Any suggestions?
[ January 23, 2006: Message edited by: johnfake temp ]
18 years ago