Multilingual menu-config in struts

Hi, i'm using struts in my web project. i'm trying to make my web multilingual. everything seems fine except the menu-config.xml which make my tree-menu in my jsp pages. below is a fraction of my menu-config.xml.
<Menu name="ToDoListMenuReports" title="Reports" description="Reports" width="50">
   <Item name="ToDoListMenuCompletionReport" title="Completion Report" location="cuttingCompletionReport.do"/>
   <Item name="ToDoListMenuBundleWIPReport" title="Bundle WIP Report" location="cutBundleWIPDetail.do"/>
</Menu>Here it will display Reports, Completion Report and Bundle WIP Report in english. how to make it multilingual? can anyone shows me? thank you.
cy

Here it will display Reports, Completion
Report and Bundle WIP Report in english.
how to make it multilingual? can anyone shows me?
thank you.The Strings in the title need to be taken from a file specified under message resources with a key for all the text that needs to be displayed in multiple languages.
<message-resources parameter="com.myapp.MessageResource"/>For ever language you need, you would be creating a file like MessageResources_fr for French and so on...
While displaying the text, you could use <bean:message> tag to lookup the text from the message resources file for the specified language.

Similar Messages

  • Appfuse menu-config.xml error

    I have the next error when compile the appfuse project,
    javax.servlet.ServletException: Failure initializing struts-menu: Error parsing resource file: /WEB-INF/menu-config.xml nested exception is: The reference to entity "O" must end with the ';' delimiter.
    I found the problem, when buit menu-config.xml with this code:
    <Item name="AutorizaCheque" title="menu.fin.cheques.autorizaCheque" page="contabilidad/ordencheque/elegirlibro.jsp?D=A&O=A" roles="CHQAuto"/>The error is generated by the use of symbol "&" in the tag "page"
    my question is, exist some form replace that symbol?

    You have to replace & by &amp; in XML text.

  • Menu Bar for Struts application

    Hi All,
    We are developing the Struts based Web Application using Hibernate and for this we need the Menu Bar for all the pages in the application.But we are unable to write the code for the menu bar using java classes.
    If possible please send the code for the issue.
    Thanking you.
    Ram

    tsith wrote:
    georgemc wrote:
    ramachandrarao_bandaru009 wrote:
    We are developing the Struts based Web Application using Hibernate and for this we need the Menu Bar for all the pages in the application.But we are unable to write the code for the menu bar using java classes.Then you probably shouldn't have applied for a job that required Struts experience
    Right, I'm off to post in some Neurosurgery forum, see how far I can blag my way in that profession:
    >
    I am attempting to remove a cerebral tumour but I don't know one end of a gamma knife from the other. If anyone knows how to do this please detail the exact steps in laymans terms below
    >1) open up head
    2) locate tumor (note correct spelling ;-)
    3) remove tumor - be careful not to remove good stuff
    4) close head
    5) ???
    6) profitYou spelt tumour wrong :p

  • IME browser, app menu config clean & vpn config in archlinux ask ?

    ArchLinux can't use ime type chinese in browser !!! Can anyone help to give me some advice?
    I need input the chinese word . I have try to opera,arora. both of them is can't type chinese character.
    I use chines IME(WuBi)
    Another Question:
                 1.     Can  anyone told me how to clean the application menue wrong configuration? 
                     For example I had install the cisco anyconnect  by use  '.sh' script. but it can run it .But it  still exist the config for this .
                                          I  have install the vmwareWorkstaion in customer style  , and after that  delete the file .
                      So application also left the vmware wrong config .I want to clean these .
                 2.      Can anyone told me how to use VPN conncet the enterprise VPN?
                      My company use cisco vpn to connect to VPN   .and have bellow two option
                                GroupName=
                                GroupPwd=
                      in cisco vpn software for windows  can import the config file .  I don't know in archlinux which software can be used to connect to VPN.

    jimfz wrote:ArchLinux can't use ime type chinese in browser !!! Can anyone help to give me some advice?
    How did you install Wubi? Does Chinese input work in other applications?
    Can  anyone told me how to clean the application menue wrong configuration?
    If you didn't use pacman then it will be difficult to clean application files.
    Is openconnect good for you? It works with Cisco AnyConnect VPN.

  • Someone know how to config the struts?

    I download the jakarta-struts-1.2.4-lib.zip and
    set struts.jar in the classpath, put other jar files in the lib dir and put the tld file in the web-inf dir.
    Is that enough if I want to use struts?
    I have tried some examples such as "hello.jsp", but they all throw exceptions
    "org.apache.jasper.JasperException" or "java.lang.NullPointerException".
    I just began to learn struts, and do not know the reasons.
    Could some gentlemen help me?
    Thanks a lot.

    This is a JSF forum, not Struts, so please ask your questions here http://jakarta.apache.org/site/mail2.html#Struts
    You can check the mailing list archives before
    http://www.mail-archive.com/[email protected]/
    And maybe read some docs
    http://struts.apache.org/faqs/index.html
    http://struts.apache.org/userGuide/

  • How to create menu bar in jsp page using struts-tles

    I have started working with struts-tiles. I want to create menu bar using struts-tiles. please guide me.

    I've done this very recently. In fact, tiles has very little to do with the menu itself.
    In your layout, define where you want the menu to go.
    <tiles:insert attribute="menu" />Now, in the actual file, create your menu structure. This part is up to you. I've used http://www.brainjar.com/ as a starting point for the client side actions.
    On my menu page, I call a method on a custom object that returns the menu bar object. Currently, I'm working on putting this menu into some sort of cached object so it doesn't have to rebuild it on every page request.
    Perhaps I've misread your post and you're looking to use tiles, in and of itself, to simulate menus? Otherwise, I hope my post helps.

  • Struts config modules

    I am having 2 struts config files and in web .xml I am defining the module as below....
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>config/sheraton</param-name>
    <param-value>/WEB-INF/struts-sheraton.xml</param-value>
    </init-param>
    but I am getting this error when I run the application.
    Failed to load servlet: javax.servlet.UnavailableException: Parsing error processing resource path
    at org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.java:1035)
    at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1014)
    at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:482)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManager.java:802)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleServlet.java:141)
    at com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycl
    thanks,

    Hi,
    Just think abt the param that u set....!!!!
    ActionServlet is a Servlet; how can u set the 2 params with the same name?
    In the ActionServlet
    config = getServletConfig().getInitParameter("config"); will be called to get the config value, then which init param value will be returned? obviously the second param will override the 1st param value. therefore no use of giving 2 params with the same name.
    if u have more than 1 config files ...just mention them by separating witn cama (,). This is how org.apache.struts.action.ActionServlet is being implemented(if u can!! check the ActionServlet source code).
    I think the error is not due to defining the 2 params with the same name.
    that my be due to the fact that, as in ur code config param value will be second param value xml(WEB-INF/struts-sheraton.xml) file, which doesn't contain the standard config file (struts-config.xml) format.

  • Error in using mysql in struts, help

    error log:
    2005-12-07 10:34:28 StandardContext[employees]Marking servlet action as unavailable
    2005-12-07 10:34:28 StandardContext[employees]Servlet /employees threw load() exception
    javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
         at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1091)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:997)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:840)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4240)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:795)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:475)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:480)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:961)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:347)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:476)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:547)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:286)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:387)
    my datasource config in struts-config.xml
         <data-sources>
              <data-source type="org.apache.commons.dbcp.BasicDataSource">
                   <set-property property="driverClassName" value="org.gjt.mm.mysql.Driver" />
                   <set-property property="url" value="jdbc:mysql://localhost:3306/employees" />
                   <set-property property="maxCount" value="5" />
                   <set-property property="minCount" value="1" />
                   <set-property property="user" value="root" />
                   <set-property property="password" value="2" />
              </data-source>
         </data-sources>
    my question: i can use the database via command, but why can not connect to database in my application employees?
    and another interesting thing is that my application work correctly yesterday, but can not work today(make no change on anything)?

    error log:
    2005-12-07 10:34:28 StandardContext[employees]Marking servlet action as unavailable
    2005-12-07 10:34:28 StandardContext[employees]Servlet /employees threw load() exception
    javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
         at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1091)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:997)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:840)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4240)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:795)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:475)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:480)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:961)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:347)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:476)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:547)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:286)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:387)
    my datasource config in struts-config.xml
         <data-sources>
              <data-source type="org.apache.commons.dbcp.BasicDataSource">
                   <set-property property="driverClassName" value="org.gjt.mm.mysql.Driver" />
                   <set-property property="url" value="jdbc:mysql://localhost:3306/employees" />
                   <set-property property="maxCount" value="5" />
                   <set-property property="minCount" value="1" />
                   <set-property property="user" value="root" />
                   <set-property property="password" value="2" />
              </data-source>
         </data-sources>
    my question: i can use the database via command, but why can not connect to database in my application employees?
    and another interesting thing is that my application work correctly yesterday, but can not work today(make no change on anything)?

  • Plz help me ragarding Struts

    when i have given a request for http://localhost:7001/Finance/loginForm.jsp
    i am getting the following error:
    javax.servlet.jsp.JspException: No getter method for property Dbname of bean org.apache.struts.taglib.html.BEAN
    please tell me wat might be the reason for this
    thanking you

    i have defined getters method in the formbean class which extends ActionFrom
    This is code plz check it
    package com.innova.reports.forms;
    import javax.servlet.ServletRequest;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.taglib.html.*;
    public class LoginFormBean extends ActionForm {
         // --------------------------------------------------------- Instance Variables
         /** Pwd property */
         private String Pwd;
         /** Uname property */
         private String Uname;
         /** Server property */
         private String Server;
         /** Dbname property */
         private String Dbname;
         // --------------------------------------------------------- Methods
         * Method validate
         * @param mapping
         * @param request
         * @return ActionErrors
         public ActionErrors validate(
              ActionMapping mapping,
              HttpServletRequest request) {
              // TODO Auto-generated method stub
              return null;
         * Method reset
         * @param mapping
         * @param request
         public void reset(ActionMapping mapping, HttpServletRequest request) {
              // TODO Auto-generated method stub
         * Method validate
         * @param mapping
         * @param request
         * @return ActionErrors
         * Returns the Pwd.
         * @return String
         public String getPwd() {
              return Pwd;
         * Set the Pwd.
         * @param Pwd The Pwd to set
         public void setPwd(String Pwd) {
              this.Pwd = Pwd;
         * Returns the Uname.
         * @return String
         public String getUname() {
              return Uname;
         * Set the Uname.
         * @param Uname The Uname to set
         public void setUname(String Uname) {
              this.Uname = Uname;
         * Returns the Server.
         * @return String
         public String getServer() {
              return Server;
         * Set the Server.
         * @param Server The Server to set
         public void setServer(String Server) {
              this.Server = Server;
         * Returns the Dbname.
         * @return String
         public String getDbname() {
              return Dbname;
         * Set the Dbname.
         * @param Dbname The Dbname to set
         public void setDbname(String Dbname) {
              this.Dbname = Dbname;
    struts-config.xml
    <struts-config>
    <data-sources />
    <form-beans >
    <form-bean name="UserLoginForm" type="com.innova.reports.forms.LoginFormBean" />
    </form-beans>
    <global-exceptions />
    <global-forwards />
    <action-mappings >
    <action
    attribute="UserLoginForm"
    input="/loginForm.jsp"
    name="UserLoginForm"
    path="/userLoginForm"
    scope="request"
    type="com.innova.reports.actions.LoginAction" />
    </action-mappings>
    <message-resources parameter="com.innova.reports.utils.ApplicationResources" />
    </struts-config>
    PLease go through i ahev given it but still its giving the same problem

  • Need to understand Struts Framework

    Greetings everyone,
    I am trying to understand how the entire Struts Framework works.
    If I am running tomcat, is copying and pasting the WAR file into webapps directory the only way to install struts?
    Since I am new to struts and was trying to understand how it works from ground up, I tried creating the neccessary files needed and copied the struts.jar into my web app's WEB-INF\lib folder.
    Unfortunately, I kept on hitting errors.
    Here is my app directory structure
    1) MyApp/
    - index.jsp
    - displayname.jsp
    2) WEB-INF/
    - struts-config.xml
    - struts-html.tld
    - web.xml
    3) WEB-INF/classes/example/
    - NameAction.class
    - NameForm.class
    4) WEB-INF/lib/
    - servlet-api.jar
    - struts.jar
    I am getting this error:
    HTTP Status 404 - /StrutsActionForm/index.jsp
    type Status report
    message /StrutsActionForm/index.jsp
    description The requested resource (/StrutsActionForm/index.jsp) is not available.
    Apache Tomcat/5.5.20
    I know it sounds silly but that's the only way I can truly understand the entire struts framework.
    Your reply will be much appreciated.

    If you specify the appBase of your application in Tomcat's server.xml ,
    or define a <Context>.xml and point the docBase to where ever your code's main directory is, you won't hae to create a WAR file and place it under WEB-INF each time you make any change.
    This saves a lot of time and effort in the development envionment, especially when you make a change to JSP pages - you can just refresh the browser to see the changes instead of creating a WAR file just to see changes in JSPs.
    Create a WAR file only when you are deploying your application to production / live website - a WAR file is not necessary in dev environment.
    With the above set-up your project can be located outside and independent of Tomcat, as long as the appBase or docBase are pointing to the location of your project.
    For tomcat related questions join the Tomcat User Mailing List
    and for struts question Struts User Mailing List

  • [SOLVED] LXDE menu disappeared after update

    After last update the menu entries in LXDE menu disappeared. There are only two entries, Logout  and Run
    Is there any way to restore the menu entries?
    Last edited by leonidas (2014-11-17 18:16:14)

    nbvcxz wrote:
    1. broken panel config
    please show (cat) us your panel configuration eg:
    cat ~/.config/lxpanel/default/panels/panel
    or
    cat ~/.config/lxpanel/LXDE/panels/panel
    especially part Plugin type=menu
    With the same problem, my cat showed:
    Plugin {
    type = menu
    Config {
    image=/usr/share/lxde/images/lxde-icon.png
    system {
    separator {
    item {
    command=run
    separator {
    item {
    image=gnome-logout
    command=logout
    2. hidden all entities in menu
    backup and remove local menu application
    mv ~/.local/share/applications ~/.local/share/applications.bak
    I did that, and my applications.bak directory contains lots of files with extension of .desktop
    3. missing a part of menu
    install again lxmenu-data, menu-cache and libfm-extra
    sudo pacman -S libfm-extra libfm-extra libfm-extra
    Did you mean to put libfm-extra three times?
    Did you mean
    sudo pacman -S lxmenu-data menu-cache libfm-extra
    I tried that, but didn't have any pacman. I used apt-get to get it, and found myself playing pacman :-)
    I tried
    sudo apt-get install lxmenu-data menu-cache libfm-extra
    and got the result:
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package menu-cache
    E: Unable to locate package libfm-extra
    4. launch panel from termian
    if nothing helps start terminal stop lxpanel and start it again from terminal to see the output
    lxpanelctl exit
    lxpanel
    When I run lxpanel (with the bare command, or as someone else suggested, with
    lxpanel -p LXDE
    ) I get the error message
    Xlib: extension "RANDR" missing on display ":1"
    The panel starts OK, but still has only Run and Logout entries in the START menu.
    I am running Ubuntu 13.04, accessing the server through tightvnc.
    The file
    ~/.config/lxpanel/LXDE/panels/panel
    begins with
    # lxpanel <profile> config file. Manually editing is not recommended.
    # Use preference dialog in lxpanel to adjust config when you can.
    so I don't want to just add entries the function.
    The preference dialog didn't seem to have a way for me to import other START menu entries.
    Any help appreciated :-)
    Jim

  • Java.lang.ClassCastException in struts application

    Hi,
    In application after I perform an insert(data into the DB) operation, the application must then display a list . Currently this is not happening. I can perform the insert operation successfully , but after that i get the following exception:
    java.lang.ClassCastException: org.theclass.candidate.view.SearchForm
         org.theclass.candidate.view.CandidateListAction.execute(CandidateListAction.java:41)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I dont understand where to look for errors.
    This is my web.xml file :
    <web-app>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Standard Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- The Usual Welcome File List -->
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-tiles</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    </web-app>
    struts-config.xml:
    <struts-config>
         <form-beans>
              <form-bean
              name="candidateForm"
              type="org.theclass.candidate.view.CandidateForm"/>
         <form-bean
              name="listForm"
              type="candidate.ListForm"/>
              <form-bean
              name="searchForm"
              type="org.theclass.candidate.view.SearchForm"/>
         </form-beans>
    <global-forwards>
         <forward
              name="List"
              path="/jsp/list.jsp"/>
         <forward
              name="candidatelist"
              path="/CandidateList"/>
         <forward
              name="Add"
              path="/jsp/addcandidate.jsp"/>
    </global-forwards>
    <action-mappings>
         <action path="/Add"
              name="candidateForm"
              type="org.theclass.candidate.view.AddCandidateAction"
              validate ="true"
              input="/jsp/addcandidate.jsp">
              <forward name="success" path="/CandidateList.do"/>
         </action>
         <action path="/CandidateList"
              type="org.theclass.candidate.view.CandidateListAction"
              name="searchForm"
              scope="request" >
              <forward name="failure" path="/jsp/list.jsp"/>
              <forward name="success" path="/jsp/candidatelist.jsp"/>
         </action>
         <action path="/Edit"
              type="org.theclass.candidate.view.GetCandidateAction"
              name="candidateForm"
              scope="request"
              validate="false" >
              <forward name="success" path="/jsp/editcandidate.jsp"/>
              <forward name="error" path="/CandidateList.do"/>
         </action>
         <action path="/View"
              type="org.theclass.candidate.view.GetCandidateAction"
              name="candidateForm"
              scope="request"
              validate="false" >
              <forward name="success" path="/jsp/viewcandidate.jsp"/>
              <forward name="error" path="/CandidateList.do"/>
         </action>
         <action path="/EditCandidate"
              type="org.theclass.candidate.view.EditCandidateAction"
              name="candidateForm"
              scope="request"
              input="/jsp/editcandidate.jsp"
              validate="true" >
              <forward name="success" path="/CandidateList.do"/>
              <forward name="error" path="/jsp/editcandidate.jsp"/>
         </action>
         <action path="/ViewCandidate"
              name="candidateForm"
              scope="request"
              input="/jsp/viewcandidate.jsp"
              validate="true" >
              <forward name="success" path="/CandidateList.do"/>
              <forward name="error" path="/jsp/viewcandidate.jsp"/>
         </action>
    <action path="/List"
              name="searchForm"
              type="org.theclass.candidate.view.CandidateListAction"
              input="/jsp/list.jsp">
              <forward name="success" path="/jsp/candidatelist.jsp"/>
         </action>
    </action-mappings>
    <!-- Controller Configuration -->
    <controller
    processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
    <!-- Message Resources Definitions -->
    <message-resources parameter="ApplicationResources"/>
    <!-- comment following if struts1.0.x -->
    <plug-in className="org.apache.struts.tiles.TilesPlugin" >
    <set-property property="definitions-config"
         value="/WEB-INF/tiles-defs.xml" />
    <set-property property="moduleAware" value="true" />
    <set-property property="definitions-parser-validate" value="true" />
    </plug-in>
    <!-- end comment if struts1.0.x -->
         <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
              <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    </plug-in>
    <plug-in className="org.theclass.candidate.view.HibernatePlugin">
    <!-- <set-property property="configFilePath" value="/WEB-INF/src/hibernate.cfg.xml" /> -->
         <set-property property="configFilePath" value="/hibernate.cfg.xml" />
    <set-property property="storeInServletContext" value="true" />
         </plug-in>
    </struts-config>
    Please tell me where am i going wrong. I am running out of time.
    I use struts 1.2.9, JDK 5,tomcat 5.5.17. In CandidateListAction class i have hibernate query language statements(HQL)

    Take a look at the stack trace, it shows you exactly where the error is coming from:
    java.lang.ClassCastException: org.theclass.candidate.view.SearchForm
    org.theclass.candidate.view.CandidateListAction.execute(CandidateListAction.java:41)Line 41 in your CandidateListAction.
    Probably it is failing on a cast of your action form.
    Taking a closer look at your struts-config, you are "chaining" actions.
    Your AddCandidateAction uses the candidateForm, and forwards to CandidateListAction.do
    Your CandidateListAction uses the searchForm.
    That will be the cause of your class cast exception.
    <action path="/Add"
      name="candidateForm"
      type="org.theclass.candidate.view.AddCandidateAction"
      validate ="true"
      input="/jsp/addcandidate.jsp">
      <forward name="success" path="/CandidateList.do"/>
    </action>
    <action path="/CandidateList"
    type="org.theclass.candidate.view.CandidateListAction"
    name="searchForm"
    scope="request" >
    <forward name="failure" path="/jsp/list.jsp"/>
    <forward name="success" path="/jsp/candidatelist.jsp"/>
    </action>Check out: http://struts.apache.org/1.x/faqs/newbie.html#chaining
    Solutions?
    - don't chain actions ;-)
    - use the same action form for both actions (possible?)
    - make the actionForward a "redirect" one. That means a new request, and losing any request parameters/attributes but should prevent this class cast exception.
    Hope this helps,
    evnafets

  • Struts Problem: How to use multi-ActionForm ?

    In an webapp, there will ofen be more than one ActionForm at one session.
    So in the struts-config.xml, u can config as :
    <struts-config>
    <form-beans>
    <form-bean name="form01" type="ActionForm01" />
    <!-- Locale form bean -->
    <form-bean name="form02" type="ActionForm02">
    <form-property name="language" type="java.lang.String" />
    <form-property name="country" type="java.lang.String" />
    <form-property name="page" type="java.lang.String" />
    </form-bean>
    </struts-config>But, how does the Action's execute() method know which ActionForm will be past to it?
    public ActionForward execute( ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response )
    throws Exception{
    }The argument ActionForm from references to which AtionForm? ActionForm01 or ActionForm02?
    By the way,in the struts-config.xml,each form-bean tag has an attribute "name", i.e: <form-bean name="form01" type="ActionForm01" />
    What's the use of this "name"?

    If you look further down in the struts-config.xml , u will find action mapping. There, you will mention the attribute "name" of the form-bean to represent the corresponding form bean , which is used in the action class.

  • [SOLVED] XFCE - Editing Applications Menu

    Hi there,
    The applications menu seems to update happily in XFCE when i use pacman.. however pacman has placed some items (eg. XMMS) into an incorrect category (in this case "Other").
    How can I edit the menu so that XMMS is placed into the "Multimedia" group? When I use the menu editor in XFCE, it allows me to add or remove items from the menu, EXCEPT it has an "include" entry that seems to include another menu called "system"...?
    Where can i find this "system" menu??
    Many thanks,
    KC
    Last edited by killercow (2008-09-03 18:12:34)

    tesjo wrote:It uses *.desktop entries of either /usr/share/applications/ or ~/.local/share applications/ just edit these file with a text editor, look at a few and you'll see how to get the group, title or icon you want in the menu.
    Ah ha!
    I had found the list of applications in /usr/share/applications and was trying to edit the entry for xmms, but whatever I did it didn't work, so I thought I was being silly and asked if there was a menu config file i had to use...
    Turns out that there was an entry in the ~/.local/share/applications that was overwriting my changes to the /usr/share... settings! How frustrating, glad to have got it sorted lol.
    Thanks for your quick advice!
    [SOLVED!]
    Last edited by killercow (2008-09-03 18:13:16)

  • How to run Struts program with the help of tomcat

    Hello Everybody
    This is Adesh.I am a newcomer of java and facing a problem with struts, so if any one know how to set the path of struts and how to run struts program, so plz inform me.
    THX in Advance.............................................

    struts-config.xml
    <struts-config>
    <action-mappings>
         <action path  = "/welcome"
                    type  = "Welcome"
                    scope="session">
                <forward name="success" path=".welcome"/>
                <forward name="failure" path=".base.error"/>
         </action>
    </action-mappings>
        <plug-in className="org.apache.struts.tiles.TilesPlugin">
            <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
            <set-property property="definitions-debug" value="1"/>
            <set-property property="definitions-parser-details" value="0"/>
            <set-property property="definitions-parser-validate" value="true"/>
        </plug-in>
    </struts-config>tiles-defs.xml
    <tiles-definitions>
         <definition name = ".base" path = "/include/template.jsp">
              <put name = "title" value = "${title}"/>
              <put name = "header" value = "/include/top.jsp"/>
              <put name = "body" value = "${body}"/>
              <put name = "footer" value = "/include/footer.jsp"/>
         </definition>
    </tiles-definitions>web.xml
    <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>/WEB-INF/struts-config.xml</param-value>
            </init-param>
    <init-param>
                <param-name>definitions-config</param-name>
                <param-value>/WEB-INF/tiles-defs.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
    <servlet>
            <servlet-name>init</servlet-name>
            <servlet-class>Init</servlet-class>
            <load-on-startup>2</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>action</servlet-name>
            <url-pattern>*.do</url-pattern>
        </servlet-mapping>
      <jsp-config>
        <taglib>
            <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/wall.tld</taglib-uri>
            <taglib-location>/WEB-INF/wall.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/c.tld</taglib-uri>
            <taglib-location>/WEB-INF/c.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fn.tld</taglib-uri>
            <taglib-location>/WEB-INF/fn.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fmt.tld</taglib-uri>
            <taglib-location>/WEB-INF/fmt.tld</taglib-location>
        </taglib>
    </jsp-config>
        <resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/SQLServerDB</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
    </web-app>This should help....

Maybe you are looking for

  • ITunes consistently thinks my iPhone is a new phone and wants to set up as new

    I have had an iPhone 4S for 4 weeks and have had every other iPhone since 2007. I plug my phone in regularly to my computer and change the content that is synched to it. Something happened yesterday, however, that makes iTunes think it's a new phone

  • Multiple select-option

    Hi gurus, I would just like to ask for your ideas on how can I output in ALV the multiple entries in your select-options. Here's the scenario, I have a select-option which is unit of measurement and it can have a multiple entries. The requirement is

  • ERP Purchase order not flowing to SNC

    Hello experts, I created few purchase orders in ERP but those are not reflected in SNC system. I checked XML and the error is "Ship-from location missing". Kindly help. Regards, Gulshan Edited by: Gulshan Yadav on Nov 18, 2011 10:19 AM

  • Pseudo delta with ABAP or OLAP variables

    Hey gurus! Since I have to post my first question at SDN one day, it may better be now! I'm rather new to SAP BI, therefore your help is requested: I'm currently implementing a pseudo delta, a full data load from ODS to ODS and subsequently ODS to Cu

  • Can I see my sms backups on iCloud?

    I'd hoped to see my text messages on my MacBook after syncing my phone.  ICloud is set up.  Can I find my sms texts somwhere on the computer?