Home > Archive > EAserver > November 2005 > Sharing files accross web application









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sharing files accross web application
Daniel Coppersmith

2005-11-20, 1:23 pm

Hello!


I have 2 web applications, let's call them AAA and BBB.

I have generic files that they both use (JSPs, .JS, etc). An example is a
page that displayed a formatted message with a nice icon, text, header with
logo and jazz like that.

I want to have the shared files in a single directory and have the web apps
share those files so I don't need to maintain two copies.

My directory structure is like this:

%JAGUAR%\Repository\
WebApplication\
AAA\
page1.jsp
BBB\
page2.jsp
Shared\
xxxx.jsp

The problem is, when I reference the files in Shared, EAS thinks that Shared
is it's own webApplication and says the file is not found.


In page1.jsp and page2.jsp I have this:

<%@ include file="../Shared/xxxx.jsp" %>

and I get this error:

500 Servlet jspservlet: unable to service request: /page1.jsp(10,0) File
"../Shared/xxxx.jsp" not found



(I've also tried the the slashes going the other way like: <%@ include
file="..\\Shared\\xxxx.jsp" %> but get the same error with different
slashes)

Any ideas if this is possible and if so how to do it? The way I am doing
it now is to have a copy of shared in each web application's folder and then
it works, but then I have multiple copies of the same file to make sure they
are insynch.


Carson Hager

2005-11-20, 1:23 pm

You can't do this either. :)


Carson

____________________
____________________
____

Carson Hager
Cynergy Systems, Inc.
http://www.cynergysystems.com

Email: carson. hager@cynergysystems
.com
Office: 866-CYNERGY ext. 89
Mobile: 1.703.489.6466

Take PowerBuilder to the Web with EAF 4.0
http://www.cynergysystems.com/public/products/eaf


"Daniel Coppersmith" <daniel_N.0.S.P.A. M_at_InFrontSoftware
_D0T_C0M> wrote
in message news:4380bcd7$1@foru
ms-1-dub...
> Hello!
>
>
> I have 2 web applications, let's call them AAA and BBB.
>
> I have generic files that they both use (JSPs, .JS, etc). An example is a
> page that displayed a formatted message with a nice icon, text, header
> with
> logo and jazz like that.
>
> I want to have the shared files in a single directory and have the web
> apps
> share those files so I don't need to maintain two copies.
>
> My directory structure is like this:
>
> %JAGUAR%\Repository\
WebApplication\
> AAA\
> page1.jsp
> BBB\
> page2.jsp
> Shared\
> xxxx.jsp
>
> The problem is, when I reference the files in Shared, EAS thinks that
> Shared
> is it's own webApplication and says the file is not found.
>
>
> In page1.jsp and page2.jsp I have this:
>
> <%@ include file="../Shared/xxxx.jsp" %>
>
> and I get this error:
>
> 500 Servlet jspservlet: unable to service request: /page1.jsp(10,0) File
> "../Shared/xxxx.jsp" not found
>
>
>
> (I've also tried the the slashes going the other way like: <%@
> include
> file="..\\Shared\\xxxx.jsp" %> but get the same error with different
> slashes)
>
> Any ideas if this is possible and if so how to do it? The way I am doing
> it now is to have a copy of shared in each web application's folder and
> then
> it works, but then I have multiple copies of the same file to make sure
> they
> are insynch.
>
>



Rahul Jain

2005-11-20, 1:23 pm

The static files can be kept in html\ folder, right?

--
Rahul Jain


"Carson Hager" <carson.hager@do_no_spam.cynergysystems.com> wrote in message
news:4380c596$1@foru
ms-1-dub...
> You can't do this either. :)
>
>
> Carson
>
> ____________________
____________________
____
>
> Carson Hager
> Cynergy Systems, Inc.
> http://www.cynergysystems.com
>
> Email: carson. hager@cynergysystems
.com
> Office: 866-CYNERGY ext. 89
> Mobile: 1.703.489.6466
>
> Take PowerBuilder to the Web with EAF 4.0
> http://www.cynergysystems.com/public/products/eaf
>
>
> "Daniel Coppersmith" <daniel_N.0.S.P.A. M_at_InFrontSoftware
_D0T_C0M> wrote
> in message news:4380bcd7$1@foru
ms-1-dub...
>
>



Carson Hager

2005-11-20, 8:24 pm

Yes but you can't include them like he wants to.


Carson

____________________
____________________
____

Carson Hager
Cynergy Systems, Inc.
http://www.cynergysystems.com

Email: carson. hager@cynergysystems
.com
Office: 866-CYNERGY ext. 89
Mobile: 1.703.489.6466

Take PowerBuilder to the Web with EAF 4.0
http://www.cynergysystems.com/public/products/eaf


"Rahul Jain" <jainrahul@gmailXXX.com> wrote in message
news:4380c985$1@foru
ms-2-dub...
> The static files can be kept in html\ folder, right?
>
> --
> Rahul Jain
>
>
> "Carson Hager" <carson.hager@do_no_spam.cynergysystems.com> wrote in
> message news:4380c596$1@foru
ms-1-dub...
>
>



Peter Abbott

2005-11-20, 8:24 pm

What we do to solve this problem is have a project that contains a
common set of web components that is then included into any project at
build time.

Pete

Daniel Coppersmith wrote:
> Hello!
>
>
> I have 2 web applications, let's call them AAA and BBB.
>
> I have generic files that they both use (JSPs, .JS, etc). An example is a
> page that displayed a formatted message with a nice icon, text, header with
> logo and jazz like that.
>
> I want to have the shared files in a single directory and have the web apps
> share those files so I don't need to maintain two copies.
>
> My directory structure is like this:
>
> %JAGUAR%\Repository\
WebApplication\
> AAA\
> page1.jsp
> BBB\
> page2.jsp
> Shared\
> xxxx.jsp
>
> The problem is, when I reference the files in Shared, EAS thinks that Shared
> is it's own webApplication and says the file is not found.
>
>
> In page1.jsp and page2.jsp I have this:
>
> <%@ include file="../Shared/xxxx.jsp" %>
>
> and I get this error:
>
> 500 Servlet jspservlet: unable to service request: /page1.jsp(10,0) File
> "../Shared/xxxx.jsp" not found
>
>
>
> (I've also tried the the slashes going the other way like: <%@ include
> file="..\\Shared\\xxxx.jsp" %> but get the same error with different
> slashes)
>
> Any ideas if this is possible and if so how to do it? The way I am doing
> it now is to have a copy of shared in each web application's folder and then
> it works, but then I have multiple copies of the same file to make sure they
> are insynch.
>
>

Daniel Coppersmith

2005-11-20, 8:24 pm

Carson - you're killing me!


"Carson Hager" <carson.hager@do_no_spam.cynergysystems.com> wrote in message
news:4380c596$1@foru
ms-1-dub...
> You can't do this either. :)
>
>
> Carson
>
> ____________________
____________________
____
>
> Carson Hager
> Cynergy Systems, Inc.
> http://www.cynergysystems.com
>
> Email: carson. hager@cynergysystems
.com
> Office: 866-CYNERGY ext. 89
> Mobile: 1.703.489.6466
>
> Take PowerBuilder to the Web with EAF 4.0
> http://www.cynergysystems.com/public/products/eaf
>
>
> "Daniel Coppersmith" <daniel_N.0.S.P.A. M_at_InFrontSoftware
_D0T_C0M> wrote
> in message news:4380bcd7$1@foru
ms-1-dub...
a[color=darkred]
doing[color=darkred]

>
>



Jim Egan

2005-11-20, 8:24 pm

carson.hager@do_no_spam.cynergysystems.com wrote...
> You can't do this either. :)


Thinking out loud here...

Once upon a time I was a Unix admin. I think I recall that there was an ability to alias
files. Seems like you could create the real file in a central location and then put the
alias files in the web app directories. Might work.
--
Jim Egan [TeamSybase]
Sybase product enhancement requests:
http://www.isug.com/cgi-bin/ISUG2/submit_enhancement
Carson Hager

2005-11-20, 8:24 pm

That's almost always the answer. Ant is your friend.



____________________
____________________
____

Carson Hager
Cynergy Systems, Inc.
http://www.cynergysystems.com

Email: carson. hager@cynergysystems
.com
Office: 866-CYNERGY ext. 89
Mobile: 1.703.489.6466

Take PowerBuilder to the Web with EAF 4.0
http://www.cynergysystems.com/public/products/eaf


"Peter Abbott" <abmannz@yahoo.co.nz> wrote in message
news:4380daa7$1@foru
ms-2-dub...[color=darkred]
> What we do to solve this problem is have a project that contains a common
> set of web components that is then included into any project at build
> time.
>
> Pete
>
> Daniel Coppersmith wrote:

Carson Hager

2005-11-20, 8:24 pm

Blame Sun. :)



____________________
____________________
____

Carson Hager
Cynergy Systems, Inc.
http://www.cynergysystems.com

Email: carson. hager@cynergysystems
.com
Office: 866-CYNERGY ext. 89
Mobile: 1.703.489.6466

Take PowerBuilder to the Web with EAF 4.0
http://www.cynergysystems.com/public/products/eaf


"Daniel Coppersmith" <daniel_N.0.S.P.A. M_at_InFrontSoftware
_D0T_C0M> wrote
in message news:4380e7ba@forums
-2-dub...
> Carson - you're killing me!
>
>
> "Carson Hager" <carson.hager@do_no_spam.cynergysystems.com> wrote in
> message
> news:4380c596$1@foru
ms-1-dub...
> a
> doing
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com