Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Publishing Static Content
Publishing Static Content [message #176735] Wed, 09 August 2006 21:08 Go to next message
Alan Chandler is currently offline Alan ChandlerFriend
Messages: 45
Registered: July 2009
Member
I have a dynamic web project (famtree) that is in my workspace and I can
publish it to a tomcat 5.5 server controlled by eclipse just fine.
However, it creates web pages which references a number of css files at
URLs of the form /style/style.css

I have another directory (chandlerfamily) in my workspace that contains
all the static content. Included in this directory is a subdirectory
style which holds all the .css files

How do I publish that into the root context of the tomcat server?

I tried effectively importing this into Eclipse by defining it as a
static web project, but doing this doesn't allow it to have a runtime
to publish to.

I tried editing server.xml in both the "servers"/tomcat directory in
eclipse and in
workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp 0/conf to
specify a docBase of the workspace/chandlerfamily and a path of "", but
that doesn't seem to work either.
Re: Publishing Static Content [message #176783 is a reply to message #176735] Thu, 10 August 2006 17:59 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
Alan,

Are you saying that your famtree web project references the .css files
at http://localhost:8080/style/style.css or
http://localhost:8080/famtree/style/style.css?

Cheers,
Larry

Alan Chandler wrote:
> I have a dynamic web project (famtree) that is in my workspace and I can
> publish it to a tomcat 5.5 server controlled by eclipse just fine.
> However, it creates web pages which references a number of css files at
> URLs of the form /style/style.css
>
> I have another directory (chandlerfamily) in my workspace that contains
> all the static content. Included in this directory is a subdirectory
> style which holds all the .css files
>
> How do I publish that into the root context of the tomcat server?
>
> I tried effectively importing this into Eclipse by defining it as a
> static web project, but doing this doesn't allow it to have a runtime
> to publish to.
>
> I tried editing server.xml in both the "servers"/tomcat directory in
> eclipse and in
> workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp 0/conf to
> specify a docBase of the workspace/chandlerfamily and a path of "", but
> that doesn't seem to work either.
>
>
Re: Publishing Static Content [message #176800 is a reply to message #176783] Thu, 10 August 2006 19:05 Go to previous messageGo to next message
Alan Chandler is currently offline Alan ChandlerFriend
Messages: 45
Registered: July 2009
Member
Larry Isaacs wrote:

> Alan,
>
> Are you saying that your famtree web project references the .css files
> at http://localhost:8080/style/style.css or
> http://localhost:8080/famtree/style/style.css?
>

The first one of these two
Re: Publishing Static Content [message #176808 is a reply to message #176800] Thu, 10 August 2006 19:55 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
You need a Dynamic Web Project whose context-root is set to "", i.e. is
the default Web application. If you create a new project for this
purpose, you may get an opportunity to set the Context Root to "" in the
Dynamic Web Project wizard, depending on your version of WTP. After the
project exists, trying to set the Context Root to "" in the project
properties results in an error (see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=137628 for details). You
have to manually modify the ".component" or
"org.eclipse.wst.common.component" file make this change. Once you have
this project setup, add the desired .css content to that project's
WebContent folder.

As mentioned in Comment #2 of Bug 137628, you may want to turn off
auto-serving of webapps to avoid trouble with this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=125364.

Cheers,
Larry

Alan Chandler wrote:
> Larry Isaacs wrote:
>
>> Alan,
>>
>> Are you saying that your famtree web project references the .css files
>> at http://localhost:8080/style/style.css or
>> http://localhost:8080/famtree/style/style.css?
>>
>
> The first one of these two
>
Re: Publishing Static Content [message #176993 is a reply to message #176808] Mon, 14 August 2006 19:14 Go to previous message
Alan Chandler is currently offline Alan ChandlerFriend
Messages: 45
Registered: July 2009
Member
Larry Isaacs wrote:

>... You
> have to manually modify the ".component" or
> "org.eclipse.wst.common.component" file make this change. Once you
> have this project setup, add the desired .css content to that
> project's WebContent folder.

A bit of a delay until I managed to get around to trying this. Thank
you it works fine.
Previous Topic:Web page manipulation without gui
Next Topic:Tomcat problem with JDBC driver and connection pooling
Goto Forum:
  


Current Time: Thu Nov 27 20:07:16 GMT 2014

Powered by FUDForum. Page generated in 0.10640 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software