Maria Laxmi

Ranch Hand
+ Follow
since Aug 08, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Maria Laxmi

HI,

I have a portlet developed using Spring MVC portlet. Recently we are seeing a lot of exceptions to get the command object from the session.
The exception is "Session attribute 'commondObjectName' required - not found in session".
We can not reproduce this in any of our local environments. This happens only in production. We can't find an exact test-case to reproduce it. Once we were able to reproduce it from FireFox browser but at the same time were not able to reproduce the same exception using other browsers (IE, chrome). One more thing, even if you see this exception in the log, nothing gets wrong on the page. The user experience is fine. It's just that the log file is getting cluttered with this exception and wants to get rid of it.

Does any one have any idea about this exception?

Thanks,
12 years ago
I have to develop Remember me auto login functionality for the portal site. We are using Liferay6 and want to use Remember me functionality of Liferay. How can I enable it?

And also I have a requirement that if user is logged in using remember me and if he comes on the site after few days and still logged in at that time if user wants to use My Account page to change information we should ask for password again (here My Account page is redirects user to the custom portlet). Now I am not sure how to implement this functionality. How would I come to know that the user is signed in using remember me or signed in as a normal sign in process so that I can define two sub flows for the My Account page.

if signed in using remember me then asked for the password before rendering the My Account page and if signed in through normal authentication process then just show them My Account page.

Thanks


13 years ago
I have requirement of putting hash for multiple name-value pair in my javascript cookie.

I am looking for a good example of how to create, store & delete a cookie with hash value.

Thanks,
Hi,

I am usign Liferay6 and I have my custom portlet which sends an email. I am using JavaMailSender to send an email. I want to configure mailSender properties like smtp host, smtp port from Liferay's mail configuration. In liferay6 you can configure the SMTP server by going to Control Panel -> Server Administration -> Mail. I want to read these properties for my custom portlet and configure mailSender in my portlet. I tried configuring as mentioned below but didn't work.


mailSender.setHost(PortalUtil.getPortalProperties().getProperty("mail.session.mail.smtp.host"));
mailSender.setPort((Integer.parseInt(PortalUtil.getPortalProperties().getProperty("mail.session.mail.smtp.port"))));
mailSender.setProtocol(PortalUtil.getPortalProperties().getProperty("mail.session.mail.transport.protocol"));

I always get default values for below mentioned property even if I change it to something else through Liferay's control panel. My question is how can I get the values of outgoing smtp host & port which is configured through Liferay's mail configuration.

mail.session.mail.smtp.host = localhost
mail.session.mail.smtp.port 25

Thanks,
13 years ago
Hi,

I have developed a simple portlet using spring portlet. It has one form which submits the data and the data gets saved in the database. My portlet was working fine but suddenly I am getting this error "Closing portletApplicationContext for namespace". Basically what it does is, it removes the portal from all pages where it is deployed when I click on the submit button. I have no idea what is wrong as it was working perfectly fine.

Any help will be helpful.

Thanks,
13 years ago
Hi,

Is it possible to sync up my database with liferay database. To explain briefly, lets say if I have a DB with some tables to capture user details and their roles. This database is configured with separate application (may be a seperate portlet). This application is used to maintain user detail and their roles.Now my question is how can I sync up this user detail with liferay user detail such that whatever modifications I do with this DB, that should effect in my liferay database as well. For example, if I create a new user in my dabatabse , liferay database should also get updated with this new user.

Hope I am clear with my question. Any help will be appreciated.

And also need some suggestion for good tutorial for Portlet with spring MVC.

Thanks,
14 years ago
My concern is to test when multiple threads try to call synchronized method at the same time. Is there any way we can catch this scenario in Junit Testcase?
14 years ago
Hi,

Is there a good way to test that a method is synchronized in a JUnit test? I have used synchronized method for J2EE application.

Thanks,
14 years ago
Hi,

I am new to web services and trying to understand SOAP from scratch. Can any one suggest me good book for implementing SOAP in J2EE application?

Thanks,
14 years ago
Thanks for quick reply.

I think it is not refresh. Sorry for unclear explanation. It is just if there is any error on the page, it keeps you on the same page and holds all value entered by the user .But dynamic fields are collapse upon error.

I hope I am clear this time.

THanks,
Hi,

I am facing some problem related to dynamic fields in jsp page. I have couple of fields in form which get displayed when you select a radio button. For these fields individual <div> has been defined. The problem is if the radio button is selected and dynamic fields are available on the page and if there is any error on the page, page gets refreshed and all dynamic fields get disappeared again. To make it available I again have to click on radio button.

I think I do need to set some property in form tag but don't have any clue which one? Can any one suggest?

Thanks,
Assume that the user has not blocked the pop up.
Hi,

I want to open a pop up window when the user closes the browser or type a different URL in the browser window. I am using window.open() method to display the pop up. Now the requirement was not to show the pop up when user hits the browser back button and remains on the same website. I could also implement this with the below mentioned function.

Basically what I am doing is, I have one tag file where I have a code to display a pop up using window.open() method. I am specifying the height & width of the window to 1 so window will be opened but won't show up. Now in the jsp file I have defined above mentioned function to handle the browser back button issue. So, if the user hits the browser back button then window will not be shown to the user but if the user either closes the browser or type the different URL the pop up will show up. This behavior works perfectly fine in IE & FF but doesn't see the same behavior in Safari.

Any comments or suggestions are welcome. I hope I have clearly explained my question.

Thanks,
Thanks for the quick reply.

This is the piece of code written in tag file and the tag file is just simply included in jsp page where I have to open the window.

<script type="text/javascript">
function open_window()
{

window.open("some_url","pageName","status=1,toolbar=1,top=300000,left=100000,resizable=1, scrollbars=1, toolbar=0, status=0, location=0, directories=0, menubar=0,z-lock=yes").blur();
return false;
}
if (window.addEventListener) {
window.addEventListener("unload",open_window, false);
}
else {
window.attachEvent("onunload", open_window);
}
</script>
Hi,

I want to pop up a new window on an unload event of some jsp page. I have written a tag file which handles the unload event and opens a new window. Everything works fine but according to the requirement I want to display the pop up only when user either close the browser or goes to different website by typing different url. To be more specific If the user uses back browser button and still remains in the same website the pop up should not get display. I don't understand how to handle the back browser button and stop displaying pop up. As per current implementation pop up gets displayed if user uses the back browser button.

Thanks,