• Welcome to KonaKart Community Forum. Please login or sign up.
 

SetMsgValue() on server engine instance

Started by bibi, October 19, 2012, 01:07:49 pm

Previous topic - Next topic

bibi

Hi,

Is it possible to call getMsgValue() from a client side instance?

<bean:define id="kkEng" name="konakartKey" type="com.konakart.al.KKAppEng"/>

<head>
<% kkEng.setPageTitle(kkEng.getEng().getMsgValue("message.example", 1, "us_US"));%><title ><bean:message key="<%=kkEng.getPageTitle()%>"/></title>
</head>

Errors log says that : getMsgValue function is not defined with KKEngIf

Thanks


julie

I don't understand what you're trying to achieve. Looks like you're trying to call a method on KKEng (which implements KKEngIf) that doesn't exist.

bibi

Hi,

I am trying to find any easy way to implement Unique Title and meta description for each page( for SEO ) of a website?

By the way,  can you help???
:-[


Thanks

julie

Can't you just set it in the struts action class that is called before the page is displayed?

bibi

I thought there was way to do it on the server without recompiling, any way thx


bibi

Hi

I've found a way to do it without much effort, i didnt take time to test all the pages (if problems i will update the post) i would like to share it with you all

1 Change the getKKAppEng() function of the BaseAction.java
2 Modify de setPageTitle(), setMetaDescription(), setMetaKeywords() functions with the following
        kkAppEng.setPageTitle(getCatMessage(request, kkAppEng.getPageTitle()));
        kkAppEng.setMetaDescription(getCatMessage(request, kkAppEng.getMetaDescription()));
        kkAppEng.setMetaKeywords(getCatMessage(request, kkAppEng.getMetaKeywords()));
3 Recompile

4 Adding on the current JSP the following portion of code
will do the job
       <% kkEng.setPageTitle("my.titleforthecurrentjsp");%>
my.titleforthecurrentjsp is the index key of the message catalog u want to set


I didnt check yet the meta keywords, but i will update if any problem detected

It take some time for the generated class to stabilize for the accurate  title, but it work fine now



PS: problem may arise on the performance side, i will check that too

Best regards