Setup Advice Needed: dev vs. test vs. production

2011-01-21 Thread Susan G. Conger
I have some web services running on tomcat and I am trying to figure out the
best way to have 1 tomcat instance running all 3 environments.  So the
tomcat would run dev, test, and production on one tomcat instance.  I don't
want to install 3 instances of tomcat on the customers machine for running
the different environments.  

 

I guess the way I would like it to work is to have the web services have the
same name regardless of the environment.  The easy way to think about it is
to have each environment running on a different port.  Is this possible?  Or
would it be easier to have a virtual host?  For now I just need to be
pointed in the correct direction on what is the best way to handle this
situation with tomcat.  If you do have a suggestion and know how to set it
up then please pass it along.  

 

Thanks,

Susan

 

===

Susan G. Conger
Custom Windows  Macintosh Development

President
Web Site Design  Development

YOERIC Corporation
Database Design  Development

256 Windy Ridge Road

Chapel Hill, NC  27517

Phone/Fax: (919)542-0071

cong...@yoeric.com

www.yoeric.com

 



RE: Setup Advice Needed: dev vs. test vs. production

2011-01-21 Thread Susan G. Conger
I hear you.  But in our environment it just isn't feasible to install three
different tomcats on the customer's system.  So I was trying to come up with
a way to do this without having to rename a bunch of stuff.  If it was
running on a different virtual host for each environment or different ports.
Can Tomcat be setup so 3 VM instances are ran under one tomcat installation?
With the constraint that only one tomcat can be installed on the system what
is the best way to run 3 separate environments?

Thanks,
Susan

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, January 21, 2011 1:15 PM
To: Tomcat Users List
Subject: RE: Setup Advice Needed: dev vs. test vs. production

 From: Susan G. Conger [mailto:cong...@yoeric.com] 
 Subject: Setup Advice Needed: dev vs. test vs. production

 I don't want to install 3 instances of tomcat on the 
 customers machine for running the different environments.  

I strongly suggest you rethink that, and use at least three separate Tomcat
instances.  Trying to run everything in one instance puts production at a
severe risk of failure should anything in the dev or test environment have a
problem (e.g., infinite loop, heap overflow).  Given the extremely low cost
of hardware (or VMs) these days, I'd have the test and prod systems on
different boxes or VMs, and let each developer run their own Tomcat instance
on their own workstation.

 - 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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



RE: Setup Advice Needed: dev vs. test vs. production

2011-01-21 Thread Susan G. Conger
You are preaching to the choir here about the multiple installs.  But I
can't.  This is running on an AS400.  And the clients are very particular on
what you can install.  So I am stuck.  FYI:  The dev, test, and production
is for my software not Tomcat.  So I have 3 or more versions of the software
that I have to support.  I want to have 1 tomcat installation will all of
the versions on it at my customer site.  Actual development happens on my
laptop but sometimes I have versions that the customer has to play with and
give feedback on that aren't ready for testing.  This I would install under
dev, then others that are actually in the testing phase and then finally
production.

On my laptop I have multiple tomcat installations but I don't have that
luxury on the customer's as400.

So my thought process is I will have to change my software that communicates
with the web services so that it calls different web services depending on
dev, test, or production.  However I don't want to have to do this.  It
would be better if I could just change the port.  I don't know if a virtual
host would give me anything or not.

Thanks,
Susan

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, January 21, 2011 2:06 PM
To: Tomcat Users List
Subject: RE: Setup Advice Needed: dev vs. test vs. production

 From: Susan G. Conger [mailto:cong...@yoeric.com] 
 Subject: RE: Setup Advice Needed: dev vs. test vs. production

 But in our environment it just isn't feasible to install 
 three different tomcats on the customer's system.

Why not?

 So I was trying to come up with a way to do this without 
 having to rename a bunch of stuff.

Trying to run three separate environments on one Tomcat will *require*
renaming a bunch of stuff.  Running separate Tomcats for each avoids that
issue.

 Can Tomcat be setup so 3 VM instances are ran under one 
 tomcat installation?

Assuming you mean JVM, not VM, you can read RUNNING.txt in the Tomcat home
directory to see how multiple Tomcat instances can be run with one copy of
the Tomcat jar files.  But I'm not sure what you think you're gaining by
doing so.  Having separate installations and running instances lets you test
on a new Tomcat version before committing it to production.

 With the constraint that only one tomcat can be installed on 
 the system what is the best way to run 3 separate environments?

Get rid of the constraint; it's nonsensical.

 - 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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



RE: Serving images from classes directory

2009-06-18 Thread Susan G. Conger
Andre,

Thanks.  I know serving images from the classes directory is not the best
way to do stuff.  But from a maintenance/source control stand point it sure
would make things a lot easier if I didn't have to pick and choose what
directories to move when deploying on the users machines.  Because the tool
app deploys the web apps that it builds as classes under it's own classes
directory, I have to move all of my custom scripts and graphics to another
location in order to use them.  As I said it would make my life much easier
if everything was in one spot.  That way I could package everything easier
and maintain with subversion easier.  This is a windows box so I can't just
put links in the other area.  I actually have to move or copy the pieces.
Having multiple copies of the same objects is not a fix because they have to
be kept up to date.

I knew when I posted the first request that it was strange.  But sometimes
we have to take that square peg and hammer it into the round whole.  So if
anyone has any ideas (I will take a look at your rewriting url stuff.
Thanks!) how this can be done then I am all ears.  If you just want to slam
me for doing something different then don't bother.  

Thanks,
Susan

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Wednesday, June 17, 2009 4:34 PM
To: Tomcat Users List
Subject: Re: Serving images from classes directory

Susan,
have a look at this :
http://tuckey.org/urlrewrite/

This is a servlet filter, which kind of wraps your webapp, 
intercepting all calls before they reach your webapp.
On the way, it allows you to modify the request URL (for instance), to 
for example to redirect the call to some simple servlet which would just 
return said image.
Or maybe - my knowledge is too limited to really tell - arrange for 
these calls to be served by Tomcat's default webapp, which serves static 
items.

Note that I am not in all this taking a stance on whether what you want 
to do is fundamentally a good idea, which from the previous expert 
testimonies here, it seems it is not.

Also, the reason that said experts object so strenuously to what you 
want to do, is not that they just personally don't like it for some 
reason of elegance or so.  Their main objection probably has to do with 
the security of your website.  Mixing code (which you do not want to 
disclose to just about anyone) with static objects (which you want to 
disclose of course) is probably the best way to introduce huge holes in 
whatever security scheme your site would otherwise have.
So the experts are telling you don't do that, because in their expert 
and considerate opinion, they don't feel that they should help you do by 
yourself something that will definitely put your site at risk.


Susan G. Conger wrote:
 Thanks Tim.  I don't have control during build because that is done by the
 third party tool.  I am not going to mention their name.  I was hoping
that
 this would be easy.  You know a servlet mapping in the web.xml file that
 would allow me to just map the directory/file type and I could just put
that
 in my html.  Since I can't use jsp everywhere I need the images.  Again I
am
 tied into their system and they have stuff in html files that they create.
 I edit the html template files they have to add my images and javascript.
 I use their environment to create/edit/build the web application.
Underneath
 I have tied in netBeans the best I can so I can debug their stuff.  But
that
 has issues too.  
 
 Thanks,
 Susan
 
 -Original Message-
 From: Tim Funk [mailto:funk...@apache.org] 
 Sent: Wednesday, June 17, 2009 1:07 PM
 To: Tomcat Users List
 Subject: Re: Serving images from classes directory
 
 If the images are physical images in the classes directory - you have a 
 few options.
 
 1) At build time - move (or copy) the files from the classes directory 
 to somewhere more sane that the default servlet can access
 2) Write a filter the detects these images that live in the classes dir, 
 and then forwards to the images. (You need to be careful with this one)
 
 For # 2 - it would look something like this:
 doFilter(...) {
String p = request.getServletPath();
if (p.matches(/magic_prefix/[\\w]+\\.gif$)) {
  String np = request.getServletPath().replaceFirst(.+/, );
  request.getRequestDispatcher(/WEB-INF/class/more/cowbell/ + np)
 .forward(request, response);
} else {
  chain.doFilter(...);
}
 }
 
 
 -Tim
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 


-
To unsubscribe, e-mail: users-unsubscr

RE: Serving images from classes directory

2009-06-18 Thread Susan G. Conger
-- What is 'it', precisely?
It is server images from the classes directory.

I realize the correct place to put my scripts and graphics.  However the
tool app deploys the app it makes for me as a class under it's classes
directory.  So I want to put all of my custom scripts and graphics in that
class package that it creates.  I then want to be able to access my custom
content by editing the html and putting a url in that points to the custom
content inside the class that was created by the tool app.

I have no control over what gets copied and where it is copied from.  The
developer of the tool app doesn't have any scripts or customizations for
this scenario.  In the end I may end up putting my custom content where I
don't want it, in doing so I know that I will be causing myself a
maintenance nightmare for the next couple of year.  Everytime I deploy an
application it will take extra time/steps.  This is what I am trying to
avoid by serving the custom content from the images directory.

Thanks,
Susan

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Wednesday, June 17, 2009 2:58 PM
To: Tomcat Users List
Subject: Re: Serving images from classes directory

Susan G. Conger wrote:
 I started with the authors of the tool app and they said it was a tomcat
 limitation.  Basically can't be done.  

What is 'it', precisely?

If they control the tool app then why can't they specify a location to
place scripts, stylesheets and images, so that they output in a
predictable place in your webapp?


 So I figured I would try the list before I took their word for it.

You're not meant to _directly_ access anything in WEB-INF/.  It's
protected, and deliberately so, as it has stuff you don't want users to
access.

You *can* put stuff in there and write some code to access it and
deliver it on request, but there's not a lot of point in doing so if you
can just put the data in question somewhere more accessible.

Typically, your webapp would look like (something) this:

 appname/index.html

 appname/thing.jsp

 appname/images/logo.gif

 appname/styles/layout.css

 appname/scripts/common.js

 appname/WEB-INF/web.xml

 appname/WEB-INF/classes/com/my/app/AppServlet.class

 appname/WEB-INF/lib/commons-logging.jar


Anything you put under /classes isn't going to be available directly to
the user if the server is a properly functioning Servlet container.

Doesn't stop you putting things elsewhere though.



 Yes, I use the tool to modify the template files.  But that is basically
 just editing html using the tool.  When the tool app builds my app it
copies
 everything into the classes directory.  

Which classes directory?  The one in the tool-app, or the one in your
generated webapp?

If it copies 'everything' why can't it copy images somewhere into the
generated app too?


 So that everything looks like one big Java class under the tool app.

That doesn't make a great deal of sense.  You're saying that there's a
file called (something like) BigBunchOfTemplates.class in WEB-INF/classes ?


 So my thought is that my images and javascripts should go in here so I can
have everything together and make
 maintenance easier.  I check everything the tool app builds into
subversion
 so I can have some source control.  

Let's see if my understanding is accurate first.

p



 Thanks,
 Susan
 
 
 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: Wednesday, June 17, 2009 2:09 PM
 To: Tomcat Users List
 Subject: Re: Serving images from classes directory
 
 Susan G. Conger wrote:
 The template files are in the classes directory.  This is a web app that
 is
 deploying it's own web app.  So it is rather convoluted.  The web app
that
 gets deployed is my web app while the web app doing the developing is the
 third party tool.
 
 
 For reference then, we'll call the first one the 'tool app'.
 
 So are you actually editing the template files yourself, or are you
 using the tool app to edit the template files?
 
 Where in your app do the modified template files end up, and are they
 copied individually?
 
 
 The thought also occurs that the authors of the tool app might be the
 people you really want to be talking to about this.
 
 p
 
 
 
 Thanks,
 Susan

 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: Wednesday, June 17, 2009 1:29 PM
 To: Tomcat Users List
 Subject: Re: Serving images from classes directory

 Susan G. Conger wrote:
 Thanks Tim.  I don't have control during build because that is done by
 the
 third party tool.  I am not going to mention their name.  I was hoping
 that
 this would be easy.  You know a servlet mapping in the web.xml file that
 would allow me to just map the directory/file type and I could just put
 that
 in my html.  Since I can't use jsp everywhere I need the images.  Again
I
 am
 tied into their system and they have stuff in html files that they
 create.
 I edit the html template files they have to add my images and
javascript.
 I use

RE: Serving images from classes directory

2009-06-18 Thread Susan G. Conger
The tool app is the third party development tool that is used to generate my
web application.

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Thursday, June 18, 2009 8:47 AM
To: Tomcat Users List
Subject: Re: Serving images from classes directory

Susan G. Conger wrote:
 -- What is 'it', precisely?
 It is server images from the classes directory.
 
 I realize the correct place to put my scripts and graphics.  However the
 tool app deploys the app it makes for me as a class under it's classes
 directory.  So I want to put all of my custom scripts and graphics in that
 class package that it creates.  I then want to be able to access my custom
 content by editing the html and putting a url in that points to the custom
 content inside the class that was created by the tool app.
 
 I have no control over what gets copied and where it is copied from.  The
 developer of the tool app doesn't have any scripts or customizations for
 this scenario.  In the end I may end up putting my custom content where I
 don't want it, in doing so I know that I will be causing myself a
 maintenance nightmare for the next couple of year.  Everytime I deploy an
 application it will take extra time/steps.  This is what I am trying to
 avoid by serving the custom content from the images directory.

 So that everything looks like one big Java class under the tool app.
 
 That doesn't make a great deal of sense.  You're saying that there's a
 file called (something like) BigBunchOfTemplates.class in WEB-INF/classes
?

I'd like to help, but I'm a little confused by what you're describing.

What, exactly, is generated by the tool app?  Is it a .war file?
If so, have you expanded it and examined the results to see what's in it?

p


 So my thought is that my images and javascripts should go in here so I
can
 have everything together and make
 maintenance easier.  I check everything the tool app builds into
 subversion
 so I can have some source control.  
 
 Let's see if my understanding is accurate first.
 

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




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



RE: Serving images from classes directory

2009-06-18 Thread Susan G. Conger
Sorry, it is a treated as a package with .xml, .html, .class files, and
.java files.  So it is serving up the .html files that are in there just
fine.  So I put an images directory under there and tried to serve up my
images and tomcat can't find them.  Maybe the images directory needs to be
added to the classpath?

Thanks,
Susan

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Thursday, June 18, 2009 8:32 AM
To: Tomcat Users List; sus...@bfcassociates.com; p...@pidster.com
Subject: RE: Serving images from classes directory

 From: Susan G. Conger [mailto:sus...@bfcassociates.com]
 Subject: RE: Serving images from classes directory
 
 So I want to put all of my custom scripts and graphics in
 that class package that it creates.  I then want to be able
 to access my custom content by editing the html and putting
 a url in that points to the custom content inside the class
 that was created by the tool app.

I'll bite: how do you expect to put something other than Java code inside a
class file?

 - 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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



RE: Serving images from classes directory

2009-06-18 Thread Susan G. Conger
That is the rub.  I don't control this process.  The tool app is the one
that builds/deploys my application.  It is its own web application that
actually generates my application and deploys it.  So I have to play nice
with the tool app in order to have everything work correctly.

Thanks,
Susan

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Thursday, June 18, 2009 8:30 AM
To: Tomcat Users List
Subject: RE: Serving images from classes directory

 From: Susan G. Conger [mailto:sus...@bfcassociates.com]
 Subject: RE: Serving images from classes directory
 
 But from a maintenance/source control stand point it sure
 would make things a lot easier if I didn't have to pick
 and choose what directories to move when deploying on the
 users machines.

That would be the function of a deployment script, written in ant or
whatever strikes your fancy; it's not something you'd have to do manually.
Once the script is written, you can use it for each deployment, and files
will be in the proper locations, eliminating the complexity and risk you're
facing now.

 - 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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



RE: Serving images from classes directory

2009-06-18 Thread Susan G. Conger
All that is controlled by the tool app (Not written by me).  That is why I
have to play nice. :-) Here is my web.xml for the tool app.

?xml version=1.0 encoding=ISO-8859-1 ? 
  !DOCTYPE web-app (View Source for full doctype...) 
- web-app
  display-nametool_app application/display-name 
  descriptiontoolapp/description 
- !--  Define servlet-mapped and path-mapped example filters 
  -- 
- !--  Define servlets that are included in the example application 
  -- 
- servlet
  servlet-nameservletToJsp/servlet-name 
  servlet-classservletToJsp/servlet-class 
  /servlet
- servlet
  servlet-nameinvoker/servlet-name 
  servlet-classorg.apache.catalina.servlets.InvokerServlet/servlet-class

- init-param
  param-namedebug/param-name 
  param-value3/param-value 
  /init-param
  load-on-startup2/load-on-startup 
  /servlet
- servlet-mapping
  servlet-nameinvoker/servlet-name 
  url-pattern/servlet/*/url-pattern 
  /servlet-mapping
- servlet-mapping
  servlet-nameservletToJsp/servlet-name 
  url-pattern/servletToJsp/url-pattern 
  /servlet-mapping
  /web-app

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Thursday, June 18, 2009 10:49 AM
To: Tomcat Users List
Subject: RE: Serving images from classes directory

 From: Susan G. Conger [mailto:sus...@bfcassociates.com]
 Subject: RE: Serving images from classes directory
 
 Sorry, it is a treated as a package with .xml, .html, .class files, and
 .java files.  So it is serving up the .html files that are in there
 just fine.

You're saying that you already have some mechanism of delivering .html files
from WEB-INF/classes?  How does that work?

 Maybe the images directory needs to be
 added to the classpath?

A classloader's classpath is used to access .class files and other resources
*via a classloader*; a classloader can not deliver .html files to an HTTP
client, so how are you doing it?  Do you already have a servlet that reads
.html from WEB-INF/classes and writes the output to the response output
stream?

 - 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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



Serving images from classes directory

2009-06-17 Thread Susan G. Conger
This may be a bit weird, however there is a reason for it.  I need to be
able to serve images from the classes directory of my web app.  The web app
is created using another companies program and all of the code is in the
classes directory.  I want to add an images directory and put all of my
custom images in that directory and then using them in my html/jsp pages.  I
also need to be able to insert/execute javascript code that is in the
classes directory or another directory below the classes directory.  Anyone
have any idea how to do this?

 

Thanks,

Susan

 

 


BFC Associates, Inc. 

  

Helping Save You Money on Warehouse Operations


Susan Conger

Chapel Hill, NC

630-562-0375 x106



Main Office:

245 W. Roosevelt Rd. #8-51

West Chicago, IL 60185

630.562.0375

630.562.0618 (fax)

 

 



RE: Serving images from classes directory

2009-06-17 Thread Susan G. Conger
So there isn't any easy way to do this without using java?  I was just
wanted to use a different url and have them served up correctly.  Can you
give me/point me to an example of what you are talking about below?

Thanks,
Susan

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, June 17, 2009 11:33 AM
To: Tomcat Users List
Subject: RE: Serving images from classes directory

 From: Susan G. Conger [mailto:sus...@bfcassociates.com]
 Subject: Serving images from classes directory
 
 I need to be able to serve images from the classes directory 
 of my web app.

Try using ClassLoader.getResourceAsStream() to read the image, then write it
to the response output stream.  You'll need to set the content-type header
appropriately, of course.

 - 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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



RE: Serving images from classes directory

2009-06-17 Thread Susan G. Conger
The web app is made by another company that screen scrapes/translates a
mainframe app and then makes a web app out of it.  They store this in their
classes directory.  So in order to keep everything together and make
maintenance and deployment easier, I would like to have all of the generated
code and custom code in one location.  That way I don't have to pull things
from everywhere when I deploy to the web app to our customers.  I wish it
didn't work this way and if I was developing from scratch I wouldn't do it
this way.  However sometime we have to find work arounds caused by the
environment that others choose.  Basically I am stuck so I am trying to make
the best of it.

Thanks,
Susan

-Original Message-
From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com] 
Sent: Wednesday, June 17, 2009 11:56 AM
To: Tomcat Users List; sus...@bfcassociates.com
Subject: Re: Serving images from classes directory

On Wed, Jun 17, 2009 at 6:56 AM, Susan G. Conger
sus...@bfcassociates.com wrote:

 This may be a bit weird, however there is a reason for it.  I need to
 be able to serve images from the classes directory of my web app.

I have to ask -- why? It seems a pointless complication...

--
Hassan Schroeder  hassan.schroe...@gmail.com

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




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



RE: Serving images from classes directory

2009-06-17 Thread Susan G. Conger
As I said.  It is not a web app that I have created.  It is generated by a
third party development environment.  If I want my stuff to play nice with
their stuff then I have to wedge my stuff into their stuff.  Which is
located under the classes directory.  I don't make the rules I just try to
bend them to solve my problems.  I can't change the development environment.
I have to figure out how to get around it.  Do you have any idea on how I
can accomplish this.  I know it is weird but it is what it is.

Thanks,
Susan

-Original Message-
From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com] 
Sent: Wednesday, June 17, 2009 12:10 PM
To: Tomcat Users List; sus...@bfcassociates.com
Subject: Re: Serving images from classes directory

On Wed, Jun 17, 2009 at 9:04 AM, Susan G. Conger
sus...@bfcassociates.comwrote:

 The web app is made by another company that screen scrapes/translates a
 mainframe app and then makes a web app out of it.  They store this in
their
 classes directory.  So in order to keep everything together and make
 maintenance and deployment easier, I would like to have all of the
 generated
 code and custom code in one location.  That way I don't have to pull
things
 from everywhere when I deploy to the web app to our customers.


That makes no sense at all.

A web app is a web app, and the classes directory is only one part
of it.  Pretty much any normal web app includes exposed content like
images, stylesheets, javascript.

Are you saying you deploy *only* a classes directory to customers?
Again, that makes no sense.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com



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



RE: Serving images from classes directory

2009-06-17 Thread Susan G. Conger
Thanks Tim.  I don't have control during build because that is done by the
third party tool.  I am not going to mention their name.  I was hoping that
this would be easy.  You know a servlet mapping in the web.xml file that
would allow me to just map the directory/file type and I could just put that
in my html.  Since I can't use jsp everywhere I need the images.  Again I am
tied into their system and they have stuff in html files that they create.
I edit the html template files they have to add my images and javascript.
I use their environment to create/edit/build the web application. Underneath
I have tied in netBeans the best I can so I can debug their stuff.  But that
has issues too.  

Thanks,
Susan

-Original Message-
From: Tim Funk [mailto:funk...@apache.org] 
Sent: Wednesday, June 17, 2009 1:07 PM
To: Tomcat Users List
Subject: Re: Serving images from classes directory

If the images are physical images in the classes directory - you have a 
few options.

1) At build time - move (or copy) the files from the classes directory 
to somewhere more sane that the default servlet can access
2) Write a filter the detects these images that live in the classes dir, 
and then forwards to the images. (You need to be careful with this one)

For # 2 - it would look something like this:
doFilter(...) {
   String p = request.getServletPath();
   if (p.matches(/magic_prefix/[\\w]+\\.gif$)) {
 String np = request.getServletPath().replaceFirst(.+/, );
 request.getRequestDispatcher(/WEB-INF/class/more/cowbell/ + np)
.forward(request, response);
   } else {
 chain.doFilter(...);
   }
}


-Tim


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




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



RE: Serving images from classes directory

2009-06-17 Thread Susan G. Conger
The template files are in the classes directory.  This is a web app that is
deploying it's own web app.  So it is rather convoluted.  The web app that
gets deployed is my web app while the web app doing the developing is the
third party tool.

Thanks,
Susan

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Wednesday, June 17, 2009 1:29 PM
To: Tomcat Users List
Subject: Re: Serving images from classes directory

Susan G. Conger wrote:
 Thanks Tim.  I don't have control during build because that is done by the
 third party tool.  I am not going to mention their name.  I was hoping
that
 this would be easy.  You know a servlet mapping in the web.xml file that
 would allow me to just map the directory/file type and I could just put
that
 in my html.  Since I can't use jsp everywhere I need the images.  Again I
am
 tied into their system and they have stuff in html files that they create.
 I edit the html template files they have to add my images and javascript.
 I use their environment to create/edit/build the web application.
Underneath
 I have tied in netBeans the best I can so I can debug their stuff.  But
that
 has issues too.  

If you can edit the template files, can't you include images in the same
place as the templates?

p



 Thanks,
 Susan
 
 -Original Message-
 From: Tim Funk [mailto:funk...@apache.org] 
 Sent: Wednesday, June 17, 2009 1:07 PM
 To: Tomcat Users List
 Subject: Re: Serving images from classes directory
 
 If the images are physical images in the classes directory - you have a 
 few options.
 
 1) At build time - move (or copy) the files from the classes directory 
 to somewhere more sane that the default servlet can access
 2) Write a filter the detects these images that live in the classes dir, 
 and then forwards to the images. (You need to be careful with this one)
 
 For # 2 - it would look something like this:
 doFilter(...) {
String p = request.getServletPath();
if (p.matches(/magic_prefix/[\\w]+\\.gif$)) {
  String np = request.getServletPath().replaceFirst(.+/, );
  request.getRequestDispatcher(/WEB-INF/class/more/cowbell/ + np)
 .forward(request, response);
} else {
  chain.doFilter(...);
}
 }
 
 
 -Tim
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 


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




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



RE: Serving images from classes directory

2009-06-17 Thread Susan G. Conger
I started with the authors of the tool app and they said it was a tomcat
limitation.  Basically can't be done.  So I figured I would try the list
before I took their word for it.  

Yes, I use the tool to modify the template files.  But that is basically
just editing html using the tool.  When the tool app builds my app it copies
everything into the classes directory.  So that everything looks like one
big Java class under the tool app.  So my thought is that my images and
javascripts should go in here so I can have everything together and make
maintenance easier.  I check everything the tool app builds into subversion
so I can have some source control.  

Thanks,
Susan


-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Wednesday, June 17, 2009 2:09 PM
To: Tomcat Users List
Subject: Re: Serving images from classes directory

Susan G. Conger wrote:
 The template files are in the classes directory.  This is a web app that
is
 deploying it's own web app.  So it is rather convoluted.  The web app that
 gets deployed is my web app while the web app doing the developing is the
 third party tool.


For reference then, we'll call the first one the 'tool app'.

So are you actually editing the template files yourself, or are you
using the tool app to edit the template files?

Where in your app do the modified template files end up, and are they
copied individually?


The thought also occurs that the authors of the tool app might be the
people you really want to be talking to about this.

p



 Thanks,
 Susan
 
 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: Wednesday, June 17, 2009 1:29 PM
 To: Tomcat Users List
 Subject: Re: Serving images from classes directory
 
 Susan G. Conger wrote:
 Thanks Tim.  I don't have control during build because that is done by
the
 third party tool.  I am not going to mention their name.  I was hoping
 that
 this would be easy.  You know a servlet mapping in the web.xml file that
 would allow me to just map the directory/file type and I could just put
 that
 in my html.  Since I can't use jsp everywhere I need the images.  Again I
 am
 tied into their system and they have stuff in html files that they
create.
 I edit the html template files they have to add my images and javascript.
 I use their environment to create/edit/build the web application.
 Underneath
 I have tied in netBeans the best I can so I can debug their stuff.  But
 that
 has issues too.  
 
 If you can edit the template files, can't you include images in the same
 place as the templates?
 
 p
 
 
 
 Thanks,
 Susan

 -Original Message-
 From: Tim Funk [mailto:funk...@apache.org] 
 Sent: Wednesday, June 17, 2009 1:07 PM
 To: Tomcat Users List
 Subject: Re: Serving images from classes directory

 If the images are physical images in the classes directory - you have a 
 few options.

 1) At build time - move (or copy) the files from the classes directory 
 to somewhere more sane that the default servlet can access
 2) Write a filter the detects these images that live in the classes dir, 
 and then forwards to the images. (You need to be careful with this one)

 For # 2 - it would look something like this:
 doFilter(...) {
String p = request.getServletPath();
if (p.matches(/magic_prefix/[\\w]+\\.gif$)) {
  String np = request.getServletPath().replaceFirst(.+/, );
  request.getRequestDispatcher(/WEB-INF/class/more/cowbell/ + np)
 .forward(request, response);
} else {
  chain.doFilter(...);
}
 }


 -Tim


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




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


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


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




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



Tomcat 6 Manager

2008-09-17 Thread Susan G. Conger
I am trying to use the deployment of a host directory under the tomcat
manager.  The context path that I want to use is /webapp/bfc.  However
whenever I try to deploy the directory it gives me an invalid context path
and it fails to deploy.  What should I put in the context path to have it
deploy to /webapps/bfc?

 

Thanks,

Susan

 


BFC Associates, Inc. 

  

Helping Save You Money on Warehouse Operations


Susan Conger

Chapel Hill, NC

630-562-0375 x106



Main Office:

245 W. Roosevelt Rd. #8-51

West Chicago, IL 60185

630.562.0375

630.562.0618 (fax)

 

 



RE: Tomcat 6 Manager

2008-09-17 Thread Susan G. Conger
When you go into the Tomcat Manager you get a list of running web
applications.  Then the next section lets you deploy a host directory or
local WAR file.  It asks for the following information:

Context Path (optional): [I have found this is not optional]
XML Configuration file URL:  [This appears to be optional]
WAR or Directory URL:[Here I enter my host directory path]

I don't have anything in my server.xml.  Just a generic tomcat 6 install.
When I enter anything in the Context path that has a 2 tier specification
.i.e. xyz/abc I get an error when I try to deploy the host directory.  I
have been able to deploy a different directory using just xyx.  So basically
if I have a unix directory called /mywebapps/xyz that has a web application
in it.  And I want to deploy it using the Tomcat Manager what would I put in
for the Context Path.  I know that the WAR or Directory should be
/mywebapps/xyz.  I want the context path to be xyz/abc.  However if I put
that in the deployment fails.

Does this explain it a little better?

Thanks,
Susan

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 17, 2008 9:07 AM
To: Tomcat Users List
Subject: Re: Tomcat 6 Manager

Susan G. Conger wrote:
 I am trying to use the deployment of a host directory under the tomcat
 manager.

No sure what you mean by deploy a host directory.

  The context path that I want to use is /webapp/bfc.  However
 whenever I try to deploy the directory it gives me an invalid context path
 and it fails to deploy.  What should I put in the context path to have it
 deploy to /webapps/bfc?

webapps is usually the host's appBase. I am a little confused.

A few questions:
- what is the full path to your Tomcat installation?
- what is your host configuration in server.xml?
- what is the full path to the directory you want to deploy?
- what url do you want to use to access this web app?

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



redirect port 80 to application server

2008-04-17 Thread Susan G. Conger
I am not sure if this is the right list for this.  But I have an Apache HTTP
server front end and I want to redirect port 80 so that it goes to port
8080.  

 

Thanks,

Susan

 

===

Susan G. Conger
Custom Windows  Macintosh Development

President
Web Site Design  Development

YOERIC Corporation
Database Design  Development

256 Windy Ridge Road

Chapel Hill, NC  27517

Phone/Fax: (919)542-0071

[EMAIL PROTECTED]

www.yoeric.com

 



RE: redirect port 80 to application server

2008-04-17 Thread Susan G. Conger
I have to have the Apache HTTP in front.  Don't want it there but it is
required by the customer.  So they type in http://myserver/webapp and expect
it to go to the application server.  I say just use the port
http://myserver:8080/webapp and you will get to the application server.
They say we don't want to type in the port just make 80 redirect to the
application server port.  So, I am here trying to figure out the easiest way
to redirect all traffic from 80 to 8080 and still have the apache running in
front.  Should I use remote proxies?

Thanks,
Susan  

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 17, 2008 12:26 PM
To: Tomcat Users List
Subject: RE: redirect port 80 to application server

 From: Susan G. Conger [mailto:[EMAIL PROTECTED] 
 Subject: redirect port 80 to application server
 
 But I have an Apache HTTP server front end and I want 
 to redirect port 80 so that it goes to port 8080.  

If by the above you mean you want to send all port 80 requests through
to Tomcat on port 8080, why are you bothering with httpd at all?  Just
take it out and configure Tomcat to use port 80.

Or maybe you need to supply more information...

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



System requirements for running Apache Tomcat on Windows Box

2008-04-14 Thread Susan G. Conger
I am trying to put together some system requires for running Apache HTTP
Server and Tomcat on windows machines.  I have looked all over but I can't
seem to find a minimum system specification for windows.  I want to run
tomcat 6.0 and I need CPU, Hard Drive Space, Memory and anything else that
will tell the customer what the need.  I would like to know the minimum,
medium, ideal system specifications for windows.  If anyone know where I can
find this information or has these specs please let me know.

 

Thanks,

Susan

 

===

Susan G. Conger
Custom Windows  Macintosh Development

President
Web Site Design  Development

YOERIC Corporation
Database Design  Development

256 Windy Ridge Road

Chapel Hill, NC  27517

Phone/Fax: (919)542-0071

[EMAIL PROTECTED]

www.yoeric.com