• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WebServerReources on Servlet deployment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WebServerReources on Servlet deployment


  • Subject: WebServerReources on Servlet deployment
  • From: Miguel Angel Torres Avila <email@hidden>
  • Date: Wed, 20 Aug 2008 19:12:34 -0500

Hi List,

I have made a Framework that encapsulates a number of tools that are useful in my applications.
_javascript_ Things like a popUp Calendar Date selector, prototype and scriptaculous, overlib, RichText HTML Editor, etc.
Some of those tools have their own css and images referenced inside the css file and of course _javascript_ files.
In order to use those tools I use the following approach:
For CSS files I declare a String var like this:

private final String calendarSkinCSS = application().frameworksBaseURL()
+ "/"
+ frameworkName()
+ ".framework/WebServerResources/TORA_Tools_Resources/_javascript_/jscalendar/skins/aqua/theme.css";

In my HTML  file I declare the component this way
<webobject name = "CalendarSkinCSS" />

And in my WOD file this

CalendarSkinCSS: WOGenericElement {
elementName = "link";
rel = "stylesheet";
type = "text/css";
href = calendarSkinCSS;
}

That way I get this html code

<link href="" type="text/css" rel="stylesheet">

For _javascript_ files is something similar

String declaration example

private final String calendarJSURL = application().frameworksBaseURL()
+ "/"
+ frameworkName()
+ ".framework/WebServerResources/TORA_Tools_Resources/_javascript_/jscalendar/calendar.js";
HTML file

<webobject name = "calendarJSURL" />

WOD file

calendarJSURL: WOJavaScript {
scriptSource = calendarJSURL;
}

I get this:

<script src="" language="_javascript_">

As you can see this is a simple approach that resolves the use of css and _javascript_ files, but now I am testing the deployment of my apps in Tomcat, so this approach does not work (well It would work if I had apache running with my WebServer resources in it and my app running in Tomcat on the same machine ).
Is there a better approach that you gays know that would facilitate the use of the framework in a Servlet deployment environment?
I have made some tests and the framework is copied inside the application.war file so if I change the way I generate the URL's to a more "WebObjects way" I think there will not be problems in the Servlet Deployment environment.
Does Project Wonder has Components and Utilities that could help me?

Any Help will be appreciate. 

Miguel Torres.







 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: AjaxUpdateLink / Container
  • Next by Date: Re: Protected access modifiers handled differently at runtime, in XCode and Eclipse?
  • Previous by thread: Re: AjaxUpdateLink / Container
  • Next by thread: Re: Protected access modifiers handled differently at runtime, in XCode and Eclipse?
  • Index(es):
    • Date
    • Thread