Ah... silly me.

Doing this fixes it! Thank you all for your help.

One last thing that kind of concerns me, but maybe it isn't an issue.

When I use the filename binding in anything, such as WOImageButton, 
WOResourceURL, the URL is similar to this:

http://10.0.1.100:60613/cgi-bin/WebObjects/atlas.woa/_wr_/wodata=/Users/treddy/workspace/atlas/build/atlas.woa/Contents/WebServerResources/default.com/images/top1.jpg

I can replace that last part with /etc/passwd or any other file and at least in 
development, the server happily passes that file out. I assume there is some 
way to make sure that that doesn't happen in production. Correct?

I've tried this on an app that is servlet deployed and I cannot get to it, but 
that maybe the servlet container preventing this.

Thoughts?

Tarun

On Jan 12, 2011, at 10:22 PM, Farrukh Ijaz wrote:

> You need to specify action. You can't set it as null although it doesn't 
> complain at compile time. That's breaking your component I guess.
> 
> Farrukh
> 
> On 2011-01-13, at 7:49 AM, Tarun Reddy wrote:
> 
>> Last thing.. I created a new Wonder Application and successfully reproduced 
>> the problem.
>> 
>> My steps:
>> create new Wonder Application
>> create an image in WebServerResources/default.com/images/search.jpg
>> Add public String comp = "default.com"; to Session.java
>> In Main.html, add WOImage <webobject name = "SubmitButton"></webobject> in 
>> body tag
>> In Main.wod add
>> SubmitButton : WOImageButton {
>>      filename = "~session.comp + \"/images/search.jpg\"";
>>      action = null;
>> //   filename = "default.com/images/search.jpg";
>>      }
>> 
>> Fail.
>> Pretty simple to reproduce. Next step is to see if I update the Wonder 
>> Frameworks if this still fails. Mine is from May 10, 2010.
>> 
>> Tarun
>> 
>> On Wed, Jan 12, 2011 at 9:43 PM, Tarun Reddy <[email protected]> wrote:
>> This seems to work fine. It resolves to 
>> 
>> com.webobjects.appserver._private.WOImageButton
>> 
>> Tarun
>> 
>> 
>> On Wed, Jan 12, 2011 at 5:01 AM, John Larson <[email protected]> wrote:
>> Go to the page's Java file. Somewhere try to define a variable of type 
>> WOImageButton and see if eclipse finds it in your classpath. It's possible 
>> that your install is missing it altogether. There's obviously other ways to 
>> check that, but this way should only take a second and then you've 
>> eliminated the classpath problem. 
>> 
>> John
>> 
>> On Jan 12, 2011, at 1:36 AM, Tarun Reddy <[email protected]> wrote:
>> 
>>> It is quite late and I tried it again today. It definitely is an error when 
>>> I switch back and forth only changing woimage and woimagebutton. Same page, 
>>> same exact location. 
>>> 
>>> I'm not specifying a framework as I'm using the webserverresource 
>>> directory. I apologize in advance for the lack of case in my email. iPhone 
>>> and late night coding. 
>>> 
>>> I'll try tomorrow to create a small project with just the code in question 
>>> to see if I can repro. 
>>> 
>>> Thank you,
>>> Tarun
>>> 
>>> Sent from my iPhone
>>> 
>>> On Jan 11, 2011, at 8:54 PM, John Larson <[email protected]> wrote:
>>> 
>>>> It might be late and I may have had a beer or two tonight, but are you 
>>>> absolutely positive that simply changing from WOImage to WOImageButton 
>>>> breaks it as you've described? I want to remember that error being a 
>>>> bundling problem like if you use an outdated reference to a framework. If 
>>>> it was an ognl problem, you'd get a clear ognl error. This is a total shot 
>>>> in the dark, but it's dark outside so ..., did you try specifying the 
>>>> framework in addition to the filename?
>>>> 
>>>> John
>>>> 
>>>> 
>>>> 
>>>> On Jan 11, 2011, at 9:35 PM, Tarun Reddy <[email protected]> wrote:
>>>> 
>>>>> On Mon, Jan 10, 2011 at 10:43 PM, Tarun Reddy <[email protected]> wrote:
>>>>> Can anyone help with this:
>>>>> 
>>>>> SearchImage : WOImageButton {
>>>>>      filename = "~session.siteDefinition.siteDomain + 
>>>>> \"/images/find1.jpg\"";
>>>>> }
>>>>> 
>>>>> This gives the desired image....
>>>>> 
>>>>> SearchImage : WOImage {
>>>>>      filename = "~session.siteDefinition.siteDomain + 
>>>>> \"/images/find1.jpg\"";
>>>>> }
>>>>>  
>>>>> 
>>>>> I guess it would have been at least moderately helpful to include my 
>>>>> error that I get :-)
>>>>> 
>>>>> Error:    java.lang.RuntimeException: Unable to load the component named 
>>>>> 'SearchImage' with the declaration Component Type = WOImageButton, 
>>>>> Bindings = { filename=session.siteDefinition.siteDomain + 
>>>>> "/images/find1.jpg" }. Make sure the .wo folder is where it's supposed to 
>>>>> be and the name is spelled correctly.
>>>>> Reason:   Unable to load the component named 'SearchImage' with the 
>>>>> declaration Component Type = WOImageButton, Bindings = { 
>>>>> filename=session.siteDefinition.siteDomain + "/images/find1.jpg" }. Make 
>>>>> sure the .wo folder is where it's supposed to be and the name is spelled 
>>>>> correctly.
>>>>> 
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Webobjects-dev mailing list      ([email protected])
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>> http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com
>>>>> 
>>>>> This email sent to [email protected]
>> 
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com
>> 
>> This email sent to [email protected]
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to