You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by PCJ <pe...@gmail.com> on 2010/03/12 17:57:36 UTC

Examining where Tomcat is serving files from

Hi, I'm trying to test a custom tag library and not quite getting there. I'm
using Tomcat to serve the files but when I navigate to where they should be,
I'm getting 404s for everything. I have a project in Eclipse called
MyTagLib, which Tomcat (integrated into Eclipse) is serving on port 8080,
and my Web content is in MyTagLib/web/content appropriately enough. I have
the following tag set in org.eclipse.wst.common.component:

<wb-resource deploy-path="/" source-path="/web/content"/>

So localhost:8080/blarg.html should serve MyTagLib/web/content/blarg.html,
but it doesn't. What I want to know is, if Tomcat isn't seeing these files,
how can I examine where it IS looking? Is there a way to set up a debugger
or something?

Oh, and by the way, I'm using the ancient Tomcat 4.1, but if anybody knows
anything about dealing with this in newer versions I'll make an effort to
translate. Thanks!
-- 
View this message in context: http://old.nabble.com/Examining-where-Tomcat-is-serving-files-from-tp27879973p27879973.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Examining where Tomcat is serving files from

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: PCJ [mailto:peter.jones.rpi@gmail.com]
> Subject: RE: Examining where Tomcat is serving files from
> 
> I'm using 4.1 even though it's embarrassingly old because it's 
> part of the testing procedure for this application.

Fix the procedure and get rid of some of the moving parts.  Replace the 4.1 Tomcat with a useful version, and don't run it under Eclipse (which likes to use its own configuration for Tomcat, hidden from view, ignoring yours).  Best if you test with whatever servlet container you have in production, otherwise the usefulness of your testing is somewhat marginal.  If that's not feasible, then at least use a supported level of Tomcat.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Examining where Tomcat is serving files from

Posted by PCJ <pe...@gmail.com>.
Unfortunately, everything is missing. Even flat HTML doesn't show up, and
I've tried just about every permutation of directory names I can think of.
It may be that Tomcat isn't even trying, or tries but sees nothing at all.

I'm using 4.1 even though it's embarrassingly old because it's part of the
testing procedure for this application. It's not used in production, so it
doesn't affect much - at least I don't think it does.


Joseph Morgan-2 wrote:
> 
>>> I'm getting 404s for everything
> 
> Is it your tag not being accessed, or files accessed from your tag, or
> the whole webapp missing?
> 
> If it is just an issue of your tag not being able to find files as you
> think they should, 
> Just create a File (new File("xxx")) within your tag and System.out the
> absolute path of that file.  That will
> Tell you what the tag sees as your root! 
> 
>>> Is there a way to set up a debugger or something?
> 
> You can do remote debugging of the JSP containing the tag.
> 
>>> Oh, and by the way, I'm using the ancient Tomcat 4.1
> 
> Why?
> 
> -----Original Message-----
> From: PCJ [mailto:peter.jones.rpi@gmail.com] 
> Sent: Friday, March 12, 2010 10:58 AM
> To: users@tomcat.apache.org
> Subject: Examining where Tomcat is serving files from
> 
> 
> Hi, I'm trying to test a custom tag library and not quite getting there.
> I'm
> using Tomcat to serve the files but when I navigate to where they should
> be,
> I'm getting 404s for everything. I have a project in Eclipse called
> MyTagLib, which Tomcat (integrated into Eclipse) is serving on port
> 8080,
> and my Web content is in MyTagLib/web/content appropriately enough. I
> have
> the following tag set in org.eclipse.wst.common.component:
> 
> <wb-resource deploy-path="/" source-path="/web/content"/>
> 
> So localhost:8080/blarg.html should serve
> MyTagLib/web/content/blarg.html,
> but it doesn't. What I want to know is, if Tomcat isn't seeing these
> files,
> how can I examine where it IS looking? Is there a way to set up a
> debugger
> or something?
> 
> Oh, and by the way, I'm using the ancient Tomcat 4.1, but if anybody
> knows
> anything about dealing with this in newer versions I'll make an effort
> to
> translate. Thanks!
> -- 
> View this message in context:
> http://old.nabble.com/Examining-where-Tomcat-is-serving-files-from-tp278
> 79973p27879973.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Examining-where-Tomcat-is-serving-files-from-tp27879973p27883226.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Examining where Tomcat is serving files from

Posted by Joseph Morgan <jo...@ignitesales.com>.
>> I'm getting 404s for everything

Is it your tag not being accessed, or files accessed from your tag, or
the whole webapp missing?

If it is just an issue of your tag not being able to find files as you
think they should, 
Just create a File (new File("xxx")) within your tag and System.out the
absolute path of that file.  That will
Tell you what the tag sees as your root! 

>> Is there a way to set up a debugger or something?

You can do remote debugging of the JSP containing the tag.

>> Oh, and by the way, I'm using the ancient Tomcat 4.1

Why?

-----Original Message-----
From: PCJ [mailto:peter.jones.rpi@gmail.com] 
Sent: Friday, March 12, 2010 10:58 AM
To: users@tomcat.apache.org
Subject: Examining where Tomcat is serving files from


Hi, I'm trying to test a custom tag library and not quite getting there.
I'm
using Tomcat to serve the files but when I navigate to where they should
be,
I'm getting 404s for everything. I have a project in Eclipse called
MyTagLib, which Tomcat (integrated into Eclipse) is serving on port
8080,
and my Web content is in MyTagLib/web/content appropriately enough. I
have
the following tag set in org.eclipse.wst.common.component:

<wb-resource deploy-path="/" source-path="/web/content"/>

So localhost:8080/blarg.html should serve
MyTagLib/web/content/blarg.html,
but it doesn't. What I want to know is, if Tomcat isn't seeing these
files,
how can I examine where it IS looking? Is there a way to set up a
debugger
or something?

Oh, and by the way, I'm using the ancient Tomcat 4.1, but if anybody
knows
anything about dealing with this in newer versions I'll make an effort
to
translate. Thanks!
-- 
View this message in context:
http://old.nabble.com/Examining-where-Tomcat-is-serving-files-from-tp278
79973p27879973.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org