D kukreja

Ranch Hand
+ Follow
since Jan 29, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by D kukreja

Hi ,

we have been trying to get a portlet working on websphere portal 8. We did the proxy configuration to point to the applications. Also made th epolicy file changes and ran configengine.sh ,
the error in firebug is
403 BMWPX0006E: The URL you tried to access through the proxy is not allowed.

Heres the policy file

<policy url="{$nitro_url_policy}" acf="none">
<actions>
<method>GET</method>
<method>HEAD</method>
<method>POST</method>
<method>PUT</method>
<method>DELETE</method>
</actions>
<cookies>
<cookie>LTPA</cookie>
<cookie>LTPA2</cookie>
<cookie>JSESSIONID</cookie>
<cookie>LtpaToken</cookie>
<cookie>LtpaToken2</cookie>
<cookie>SimpleToken</cookie>
</cookies>
<headers>
<header>x-lfn-url-callback</header>
<header>User-Agent</header>
<header>Accept*</header>
<header>Vary</header>
<header>Location</header>
<header>Content*</header>
<header>Authorization*</header>
<header>X-Method-Override</header>
<header>Set-Cookie</header>
<header>If-Modified-Since</header>
<header>If-None-Match</header>
<header>X-Server</header>
<header>X-Update-Nonce</header>
<header>X-Requested-With</header>
<header>com.ibm.lotus.openajax.virtualhost</header>
<header>com.ibm.lotus.openajax.virtualport</header>
</headers>
</policy>

Also tried using <policy url="http://server.domain.name:10039/nitro/*" acf="none"> and <policy url="*" acf="none"> instead of <policy url="{$nitro_url_policy}" acf="none">

Also note that LDAP is configured in WAS console and we are able to login using the ldap users in Websphere portal console as well as application. We are trying to add the portlet using the adminstrator id which is not in LDAP , but is present in the users of WAS8.

Any pointers will be helpful. Thanks!
11 years ago
Hi,
I want to have <a href> or a link in the error message.
When I add field error in my validate() method of action , it is rendering as plain text. so , if I add using getText()




it is rendered as it is on html , and a href is not parsed to show a link on the page. It should come as

Email address already registered. Please Sign in


any ideas how to do this in struts 2?
thanks

13 years ago
I am using xhtml ..actually I have modified the xhtml ftl's and put it in one of my template folder and using that..but I copied the original ftl from xhtml.

Anyway..I do not need to resolve this issue as I dont have to use tooltip now. but a solution here might help others.
thank you
13 years ago
I took this code from struts 2 documentation , but it doesn't work.
I want to show an icon next to the field and show the tool tip


First I did not use the jsTooltipEnabled attribute , it didnt work with or wthout this sttribute..not sure how to use the tooltip.
thanks
13 years ago
I resolved this by using fieldexpression.
its working fine for me.thanks!
13 years ago
Can I validate for "required" for my s:select and s:checkbox fields.
I am using struts2 validator framework to perform front end validations. text boxes are getting validated properly. but for selection adn checkbox it always shows the field error.
Heres the xml part from my action-validation.xml

Heres from the jsp


Even if I select something in job role, it gives me error that noting is selected.
My question is "is it evenpossible to validate fields other than textfield " using struts 2 validator?
if not, how do I hook up my own javascript?
thanks
13 years ago
We are deciding on what to use for our new project.
Can someone point me to some comparison of using spring remoting vs using apachae wink classes for restful webservices.
We will have a couple of services getting accessed from a common client.
thanks!!
13 years ago
hi

I am using log4j-1.2.11.jar here , There is no compilation errors .
I am developing using Rational Application DEveloper on windowsXP , and deploy on WAS 6.1 test server. I do not get any issues.
When I move this EAR and deploy it on WAS 6.1 server on AIX I am getting a runtime error on the line wehre log.info is present in the code . This is the error -"Unhandled exception or error intercepted: java.lang.NoSuchMethodError: org/apache/log4j/Logger.info(Ljava/lang/String;)V"
any ideas?
thanks
it is working now after I followed the "onload" event thing in the above page.
This page says:
"The problem is that once the page is loaded, were you to assign a new source URL to an image or even create a new image object the image will likely not appear in your page. (Depending on the size of the image and the browser.) The Document Object (DOM 2 ) has already been rendered by the browser. If you retrieve an image that was not loaded when the page was loaded, you must insert or append that image's binary stream into the existing page. Let's load a simple page with no image and try to put an image inside a place holder division."

And I thought this is the roo cause of my problem. I followed the approach explained here http://www.rodsdot.com/ee/scriptingRemoteImages.asp
thanks!
My problem is solved using the above link.
Thanks you guys anyways !
It is not displaying because the src is set to a valid url after page is loaded.
anyway I found something which looks like will solve my problemm , I am trying it now
have a look at "another example" here
http://www.rodsdot.com/ee/scriptingRemoteImages.asp
I am not streaming back the image file from AJAX call. It returns only the name of the file created.
The url which is coming in the src , I am able to access the image if I type the same url directly in browser.
but in this manner nothing comes up , because itthe action spitting the image on screen) is a struts action and it never calls the action if I set src attribute in javascript after the page is loaded.

Is there another way to stream the image from ajax call and display in a div , instead of using this struts StreamResult thing.
thanks
hi Eric
AJAX code is creating the .png file.
This file is not present in the folder intially. When AJAX java code is called , it reads something from the database and based on that it creats .png file and saves in the folder.
Now if I do what you suggested my javascript looks like this

With this it never goes to dynamicImageaction to get the image when this javascript is executed.
any more suggestions?
Hi,
I am trying to display image using ajax and javascript.
Heres the situation.
I have an AJAX action , which creates a png file and saves in a folder.
When the ajax action returns only then I have the png file available, so I need to display this png file on the screen now.
I cannot just set the src of tag in the javascript as that doesn't work in FF , becoz this folder is not published on the webserver. Even if I get a way to write to a folder of webserver, it will not work since the image is only created during the ajax call, and there is not re-publish of the project on the weserver in between.
I use StreamResult from struts as a url to display the image. but how to open that url in javascript.
thanks
MArtin,

I can upgrade to 1.3.
but heres what I am doing now ..I am using FileUtils.copyFile() method to copy the file in the same directory.
and then use the File reference to the new Fie to for further processing in some new thread. so, even after coming out of my action class, the fileuploadinterceptor is removing the file , I hope reaper will not remove the new file.