Fixing the lenght of content to be displayed on JSP page

hi,
i want a CSS property which can display specific no. of character of string. My means that I want to display the email of currently logged in user, the place that is available to display email is only 30 character, if length of email is greater than 30 charater then discard the remaining character and display it, otherwise display the actual content of email.
thanks in advance

This is a duplicate, I have posted a reply here:
http://forum.java.sun.com/thread.jspa?threadID=5133422&messageID=9482084#9482084

Similar Messages

  • H:inputTextarea problem to fix the lenght of character

    hi,
    I have one h:inputTextarea on my page.i want to fix the lenght of the character. i want to put the character lenght 20 character,so user can not put the 21 character in textArea.

    You can probably use validators.
    I stole following snippet from [IBM |http://www.ibm.com/developerworks/library/j-jsf3/]
    <h:inputText id="firstName"
                    value="#{UserRegistration.user.firstName}">
         <f:validateLength minimum="2"
                                   maximum="25" />
    </h:inputText>With some alteration you should be on your way (I think)
    Best Regards,
    Martijn

  • How to retrieve data and display in JSP page

    hi,
    i am trying to retrieve data from SQL server 2000 and display in JSP Page. I have already place the codes of the retrieve in the bean file. I wanna ask is that how to display in the JSP page. If possible, can provide example codings for mi to reference?
    Thanks
    Regards,
    shixuan

    HI Tan ,
    I pressume that you wanted to make use of PDK, the code can go like this .
    <b><u>1) JAVA file</u></b>
    import com.sapportals.htmlb.DropdownListBox;
         import com.sapportals.htmlb.InputField;
         import com.sapportals.htmlb.event.Event;
         import com.sapportals.htmlb.page.DynPage;
         import com.sapportals.htmlb.page.PageException;
         import com.sapportals.portal.htmlb.page.JSPDynPage;
         import com.sapportals.portal.htmlb.page.PageProcessorComponent;
         import com.sapportals.portal.prt.component.IPortalComponentRequest;
         import com.sapportals.portal.prt.component.IPortalComponentSession;
         import com.sapportals.portal.prt.component.IPortalComponentContext;
         import java.sql.*;
         public class P_SAP_B_User extends PageProcessorComponent
         * Method          :           getPage()
         * Description      :                         
         * Input Parameters     :     None
         * Returns          :          Object of Class DynPage     
              public DynPage getPage()
                  return new P_SAP_B_UserDynPage();
                }     // end of dynPage()
                public static class P_SAP_B_UserDynPage extends JSPDynPage
                  /* Variable Declaration     */
                   /* Object of bean class P_SAP_B_CreateUser initialised to null */
                       private P_SAP_B_CreateUser createUserBean = null;
                  /* Flags for checking the occurance of Event & Error. */
                  private int iFlag=0;
                  private int iErrFlag=0;
                  /* Variables for storing the information
                          entered by user in each text field */
                  private String sFname;
                  private String sSname;
                  private String sAge;
                  private String sExp;
                  private String sSkill;
                  private String sUnit;
         * Method          :           doInitialization()
         * Description      :                         
         * Input Parameters     :     None
         * Returns          :          None
                  public void doInitialization()
                         IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
                         Object o = componentSession.getValue("createUserBean");
                         if(o==null || !(o instanceof P_SAP_B_CreateUser))
                           createUserBean = new P_SAP_B_CreateUser();
                           componentSession.putValue("createUserBean",createUserBean);
                        }     // end of if
                         else
                             createUserBean = (P_SAP_B_CreateUser) o;
                         }     // end of else
                   }//end of doInitialisation()
         * Method          :           onUpdate()
         * Description      :                         
         * Input Parameters     :     object of Event class
         * Returns          :          None
                   public void onUpdate(Event e)throws PageException
                        /*     sets flag to 1 when update button is clicked. */
                        iFlag=1;
         * Method          :           doProcessAfterInput()
         * Description      :                         
         * Input Parameters     :     None
         * Returns          :          None
                  public void doProcessAfterInput() throws PageException
                             InputField ifFirstName = (InputField) getComponentByName("FirstName");
                             InputField ifSecondName = (InputField) getComponentByName("SecondName");
                             InputField ifAge = (InputField) getComponentByName("Age");
                             InputField ifExp = (InputField) getComponentByName("Exp");
                             InputField ifSkill = (InputField) getComponentByName("Skill");
                             DropdownListBox dlbUnit = (DropdownListBox) getComponentByName("Unit");
                             int iAge,iExp;
                             IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
                            IPortalComponentContext myContext = request.getComponentContext();
                             P_SAP_B_CreateUser myNameContainer = (P_SAP_B_CreateUser) myContext.getValue("createUserBean");
                             if(ifFirstName != null)
                                  this.sFname = ifFirstName.getValueAsDataType().toString() ;
                             }     // end of if
                             if(ifSecondName!= null)
                                  this.sSname = ifSecondName.getValueAsDataType().toString() ;
                             }      // end of if
                             if(ifAge!= null)
                                  this.sAge = ifAge.getValueAsDataType().toString() ;
                             }     // end of if
                             if(ifExp!= null)
                                  this.sExp = ifExp.getValueAsDataType().toString() ; 
                             }     // end of if                         
                             if(ifSkill != null)
                                  this.sSkill = ifSkill.getValueAsDataType().toString() ;          
                             }     // end of if
                             if(dlbUnit != null)
                                  this.sUnit = dlbUnit.getSelection().toString() ;     ;
                             }      // end of if
                          /* Data Validation */
                             /* try block for numeric Exception */
                             try
                                 /* checking for any field left blank by the user */
                                  if(sFname.equals("") || sSname.equals("") ||  sAge.equals("")|| sExp.equals("") || sSkill.equals(""))
                                        /* set error flag to 1 in case of any field left blank */
                                        iErrFlag=1;
                                  } // end of if
                                  else
                                        /* converting Age and Experience fields (String) to integer */
                                         iAge= Integer.parseInt(sAge);
                                         iExp= Integer.parseInt(sExp);
                                       /* setting the boundaries on the value in Age Field */
                                         if(iAge<0)
                                             /* set error flag to 2 in case of age below 0 */
                                             iErrFlag=2;
                                         }// end of if
                                       /* setting the boundaries on the value in Experience field */
                                          else if(iExp<0 ||(iExp/12)>=iAge)
                                              /* set error flag to 3 in case of experience below 0 or exceeding the age in years */
                                              iErrFlag=3;
                                          }// end of else if
                                          /* In case of no error */
                                          else
                                             /* setting the bean variables */
                                             try
                                                 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                                                 Connection con = DriverManager.getConnection("jdbc:odbc:Test");
                                                 String query="insert into UserData values(?,?,?,?,?,?)";
                                                 PreparedStatement prestat=con.prepareStatement(query);
                                                 /* setting the values to be inserted into the user table */
                                                 prestat.setString(1,sFname);
                                                 prestat.setString(2,sSname);
                                                 prestat.setString(3,sAge);
                                                 prestat.setString(4,sExp);
                                                 prestat.setString(5,sSkill );
                                                 prestat.setString(6,sUnit);
                                                 prestat.executeUpdate() ;
                                                 prestat.close();
                                                 con.close();
                                                 myNameContainer.setSFname(sFname);
                                                 myNameContainer.setSLname(sSname);
                                                 myNameContainer.setSAge(sAge);
                                                 myNameContainer.setSExp(sExp);
                                                myNameContainer.setSSkill(sSkill);
                                                myNameContainer.setSUnit(sUnit);
                                             } // end of inner try block
                                              catch(Exception sqle)
                                                 myNameContainer.setErrMessage("Update failed ! Please try again." );
                                              } // end of catch corresponding to inner try
                                                           } // end of inner else
                                                      } //end of outer else
                                   } //end of outer try block
                                   catch(Exception e)
                                     /* setting flag to 4 in case of non-numeric age/experience values */
                                     iErrFlag = 4;
                                     /* Displaying error message corresponding to the value of error flag */
                                  switch(iErrFlag)
                                    /* Empty Field */
                                    case 1:myNameContainer.setErrMessage( "Please Fill all the fields");
                                    break;
                                    /* Invalid Value in the age field */
                                    case 2:myNameContainer.setErrMessage( "Enter a valid value in Age field.(Hint : Have you entered Age<0 ?");
                                    break;
                                    /* Invalid Value in the experience field */
                                    case 3:myNameContainer.setErrMessage( "Enter a valid value in Experience field.(Hint : Experince should not be negative or greater than your age in months)");
                                    break;
                                    /* Non-numeric value in the Age/ experience fields */
                                    case 4:myNameContainer.setErrMessage( "Please Enter Numeric Value for Age and Experience");
                                    break;
                                 } // end of switch-case block
              } //end of doProcessAfterInput()
         * Method          :           doProcessBeforeOutput()
         * Description      :                         
         * Input Parameters     :     None
         * Returns          :          None
                  public void doProcessBeforeOutput() throws PageException
                       /* Displays Form for new user creation by default */
                       this.setJspName("P_SAP_B_UserCreationForm.jsp");
                         /* In case of an error display an error message page */
                         if(iErrFlag!=0)
                              setJspName("ErrorPage.jsp");
                         } //end of if
                         /* Displays the user's information as entered in the SQL
                            database after its been uploaded by the user */
                         else if(iFlag==1)
                             setJspName("hello.jsp");      
                          } // end of else if
                  } // end of doProcessBeforeOutput()
              } // end of P_SAP_B_UserDynPage Class
         } // end of P_SAP_B_User class
    * End of File P_SAP_B_User.java
    2) Bean
    package com.sap.usercreation;
    import java.io.Serializable;
    public class P_SAP_B_CreateUser implements Serializable
         private String sFname;
         private String sLname;
         private String sUnit;
         private String sSkill;
         private String sExp;
         private String sAge;
         private String errMessage;
         * @return
         public String getSFname() {
              return sFname;
    * @return
    public String getSLname() {
         return sLname;
    * @param i
    * @param string
    public void setSFname(String string) {
         sFname = string;
    * @param string
    public void setSLname(String string) {
         sLname = string;
    * @return
    public String getSUnit() {
         return sUnit;
    * @param string
    public void setSUnit(String string) {
         sUnit = string;
    * @return
    public String getSSkill() {
         return sSkill;
    public void setSSkill(String string) {
         sSkill = string;
    * @return
    public String getSAge() {
         return sAge;
    * @return
    public String getSExp() {
         return sExp;
    * @param string
    public void setSAge(String string) {
         sAge = string;
    * @param string
    public void setSExp(String string) {
         sExp = string;
    * @return
    public String getErrMessage() {
         return errMessage;
    * @param string
    public void setErrMessage(String string) {
         errMessage = string;
    3) The Jsp file i have already posted.
    See if you copy this code and paste it wont work as i have not given you full code ,But yes this gives you an overview of how things can be done .
    Thanx
    Pankaj

  • How To Customize displaying  of JSP page From Backing Bean

    I would like to customize the displaying of jsp page from backing bean based on user Roles
    For example
    - if the Role is Admin then backing bean should display Admin.jsp
    - if the Role is Guest then backing bean should display Guest.jsp
    Any pointers/suggestions will be highly appreciated
    Regards
    Bansi

    Thanks to all for providing thoughts
    I wanna make it more Dynamic. In the sense
    "Backing Beans should drive the rendering of first jsp page in the application " and not jsp page driving the backing bean or not to put some kind of hard coding in jsp page to see if its admin user then display certain set of UI Components or certain set of other UI components for other users.
    As we have atleast 10 different Roles and there can be Composite Roles i.e. combination of two roles. In this case how does the Backing Bean drives the rendering of jsp page?
    Regards
    Bansi

  • Getting image path from database( Remote server)  & display in jsp page

    hai frnds,
    i have one doudt regarding in my web application Development
    . I want to Getting image path from database( **Remote server**) & display in jsp page here iam forwarding my control through Servlets
    how this will passiable
    Thanks in Advance
    SonyKamesh
    [email protected]

    hai
    I think ur doubt will be...
    1) Getting a Image From Remote Server( & U stored a only path name in Data Base)
    2) Image r stroed in saparate Drive( Not in Webroot-- where u Created domine )
    Please Any Help Will be Appriciated
    [email protected]
    Edited by: Sonykamesha on Dec 18, 2007 11:02 PM

  • IFRAME and The code to fix the IE active content behavior

    I'm using the Macromedia Extension for fix the IE April 11
    Upgrade. It's all right, but the iframes doesn't work with thenew
    code, Do you know some solution???? HELP!!!
    Thanks

    <sigh>
    Upload the Scripts folder that the fix places in your Local
    root folder.
    This is asked and answered about 10 times a day here.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "_adrian" <adrian @ test.com> wrote in message
    news:ej5a1j$rc9$[email protected]..
    > So I have version 7 SWF on a page, and DW8 wants to
    apply its "IE Active
    > Content block fix" to the page, after which time, the
    SWF no longer shows
    > up. The page just sits there bank. There had been a
    posting here months
    > ago about a cgc.js fix, but I can't find the details on
    that now...
    >
    > Has anyone else run into this? How should we handle it?
    Thanks
    >

  • Displaying a jsp page content as a pdf...

    HI,
    I am writing a simple jsp page.When I request that jsp page I want to display it in a pdf format in the browser. I have given the content type as "application/pdf", but still its showing as a normal web page. But when I am making the content type as "application/vnd.ms-excel", its working and opening in the excel sheet. Plz help me..how to display the jsp page in pdf format.
    the tag i am using is..
    <%@ page language="java" contentType="application/pdf" %>

    u want to show a pdf file in a jsp??
    so u have to write a servlet that that writes this file to the response

  • Greek language not displaying in jsp page

    My application is based on struts framework...
    we doing in multilanguage.
    When i select greek the followingis displayed:
    �������&#132;�&#131;���&#133;���� ���&#128;�����&#137; �&#131;�&#132;��
    even i've did the pageEncoding code in jsp page...
    i dont know why it is not displaying but i maintaining properties files for greek language. so, when i call the greek language, the greek properties file was located and display the content... But for other languages like dutch, portuguese, spanish is working fine...I keep the resource properties file in the same place where other language files placed.
    Is there any more changes i want to do...
    I call this greek lang. externally but should this related to database(SQL Server 2000).
    What i want to do.

    <body background="pic/love.gif">
    <%
    --- jsp code
    out.println("<img src='pic/vijay.jpg' height='100' width='100'>");
    --- jsp code
    %>
    </body>

  • Pictures are not displaying in jsp page

    hi everyone,
    i want to display background images in my jsp page
    also some other images which are not background images
    plz tell me the way that enables me to place images in my jsp page
    thanx

    <body background="pic/love.gif">
    <%
    --- jsp code
    out.println("<img src='pic/vijay.jpg' height='100' width='100'>");
    --- jsp code
    %>
    </body>

  • To search a record from the table by providing a search button in JSP page

    Hi,
    My problem statement is:
    I have a jsp page which displays a table containing records. I have to provide a button called search and a condition in a textfield so that the record which matches the condition gets highlighted.
    Can anyone solve my problem statement. Its urgent.
    Suraj.

    Example:
    on the jsp page, read the matched value the server provides and use it to put the statement in bold using the <b> tag (I dont know the syntax for highlighting).
    <%String matchedString=(String) request.getAttribute("matchingString");%>
    Then in your list:
    <%if(matchedString.compareTo(thisRecordString)==0){%>
    <b>
    <%}%>
    //your text goes here
    <%if(matchedString.compareTo(thisRecordString)==0){%>
    </b>
    <%}%>

  • Bean Value display in JSP Page

    Hi,
    I am trying to display a value stored in my bean on the jsp page. The value is to be displayed on the initial jsp page.
       public void doInitialization()
              request = (IPortalComponentRequest) this.getRequest();
              response = (IPortalComponentResponse) this.getResponse();
              myContext = request.getComponentContext();
              myProfile = myContext.getProfile();      
              Statement += "doInitialization";
              BeanContainer = new MockUpBean();
              BeanContainer.setValues( Statement);
              myProfile.putValue( "myBean", BeanContainer);
              // reset String
              BeanContainer = ( MockUpBean) myProfile.getValue( "myBean");     
        }// public void doInitialization()
    On the JSP Page side:
    <jsp:useBean id="myBean" scope="application" class="MockUpBeanPackage.MockUpBean" />
    <%= myBean.getValues()%>
    The jsp page does no pick up the value I try to store in the doInitialise method.
    Any thoughts on what I may have done wrong in my code.
    I try response.write("Test"), this too does not show up in my JSP page.
    Any advice would be appreciated.
    Thank you
    NAC

    Marty,
    The portalapp.xml file is as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="MockUpPage">
          <component-config>
            <property name="ClassName" value="MockUpPackage.MockUpPage"/>
            <property name="SecurityZone" value="MockUpPackage/low_safety"/>       
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/InitialPage.jsp"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    Again any help would be apreciated. I have used this piece of code to write values to beans in various projects, never had any issues. This is the first time I am having an issue with this piece of code.
    NAC

  • Displaying a jsp page in full window

    Hi All,
       I have a jsp page in which I have two frames(vertical),
    in the left frame,I have a link LogOff.When I click on Log off,I want a jsp page with msg(Logged of succcesfully) to be displayed in the whole window.But now it is displaying either in Left Frame or right Frame
    I used iframes tag for display of frames..
    Can any one help in this regard
    Thanks in Advance
    SANTHOSH

    Santhosh,
    in this case, use
    ... target="_parent"
    instead of
    _top
    Regards,
    Dominik

  • Cant display index.jsp page of application folder

    Hello experts,
    I am trying to do one simple struts application using Struts2 get the data and display it..
    I kept my folder that is Struts2Application in webbaps dir of tomcat..
    when I write the "http://localhost:8080/Struts2Application" it displays the same page i.e. home page of tomcat, it dosnt show the index.jsp
    and when I write the "http://localhost:8080/Struts2Application/index.jsp" then also displays the home page of tomcat..
    my web.xml is
    <?xml version="1.0" encoding="iso-8859-1"?>
    <web-app id="WebApps_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLoacation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>Struts 2 applicaion</display-name>
    <filter>
         <filter-name>struts2</filter-name>
         <filter-class>
              org.apache.struts2.dispatcher.FilterDispatcher
         </filter-class>
    </filter>
         <filter-mapping>
              <filter-name>struts2</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>
         <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
         </welcome-file-list>
    </web-app>Please help me out.....

    Please check out following all files...
    index.jsp
    <%@ page contentType="text/html; charset=UTF-8"%>
    <%@ taglib prefix="s" uri="struts-tags" %>
    <html><head><title>Struts 2 Application</title>
              <link rel="stylesheet" href="mystyle.css" type="text/css" />
         </head>
         <body>
         <h1> Struts 2 Applicaton</h1>
         Enter Client Details :
              <s:form action="ClientAction" method="post">
                   <s:textfield label="Name" name="name"/>
                   <s:textfield label="Age" name="age"/>
                   <s:textfield label="Salary" name="salary"/>
                   <s:submit/>
              </s:form>
         </body>
    </html>client.jsp
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%@ taglib prefix="s" uri="/struts-tags" %>
    <html>
         <head>
              <title>You submitted </title>
         </head>
         <body>
              Thank you, <b><s:property value="name"/></b>
              your salary is : <b><s:property value="salary"/> $</b>
         </body>
    </html>error.jsp
    <%@ page contentType="text/html; charset=UTF-8"%>
    <%@ taglib prefix="s" uri="struts-tags" %>
    <html>
         <head>
              <title>Struts 2 Application</title>
              <link rel="stylesheet" href="mystyle.css" type="text/css" />
         </head>
         <body>
         <h1> Error..! </h1>
         This error page is being shown because any of following reasons :
         <ul class="boldred">
         <li>Filed(s) left blank.</li>
         <li>Invalid Data Entered.(For examples: String in place of Integer.)</li>
         </ul>     
    </body>
    </html>struts.xml
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
         <include file="struts-default.xml"/>
         <package name="default" extends="struts-default">
              <action name="ClientAction" class="com.kogent.action.ClientAction">
                   <result name="success">/client.jsp</result>
                   <result name="error">/error.jsp</result>
                   <result name="input">/error.jsp</result>
              </action>
         </package>
    </struts>ClientAction.java
    // Java Document
    package com.kogent.action;
    import com.opensymphony.xwork2.*;
    import com.opensymphony.xwork2.ActionSupport;
    public class ClientAction extends ActionSupport
         String name;
         int age;
         int salary;
         public String getName()
              return name;
         public void setName(String name)
              this.name = name;
         public int getAge()
              return age;
         public void setAge(int age)
              this.age = age;
         public int getSalary()
              return salary;
         public void setSalary(int salary)
              this.salary = salary;
         public String execute() throws Exception
              if(getName().equals("") || getName()==null || getAge()==0 || getSalary()==0)
                   return ERROR;
              else
                   return SUCCESS;
    }And I kept all jar files in lib folder of WEB-INF

  • How to get the value from a database without submitting a jsp page

    I have a jsp which has a text box depending on the value entered I want to get the value from a database for other two fields with out submitting jsp page. I am using struts.
    Thanks For any assistance provided.

    Alright,here is an example for you for the first case.
    Present.jsp:
    ============
    <html:html>
    <head>
    <title><html:message key="page.title"/></title>
    </head>
    <body>
    <html:form action="ChangeEvent.do">
    <html:hidden property="method"/>
    <!-- Submitting the Form onKeyUp of EmpId field and trying to save the
         state of the Form in the scope of session -->
    Emp Id:<html:text property="empId" size="5"  onkeyup="if(true){this.form.elements[0].value='populateDetails';this.form.submit();}"/>
    Emp Name:<html:text property="empName" size="10" />
    Email Address:<html:text property="email" size="10" />
    <html:submit>Submit</html:submit>
    </html:form>
    </body>
    </html:html>struts-config.xml:
    ==================
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <!-- Form bean which stores the properties of all the Form elements -->
    <form-beans>
    <form-bean name="employeeFormBean" type="org.apache.struts.action.DynaActionForm">
       <form-property name="empId" type="java.lang.String"/>
       <form-property name="empName" type="java.lang.String"/>
       <form-property name="email" type="java.lang.String" />   
    </form-bean>
    </form-bean>
    <action-mappings>
    <action path="/ChangeEvent" type="Test.GetChangeAction" name="employeeFormBean" scope="request" parameter="method"> 
    <!-- On successful call of DB the Page has to be forwarded to the same page again by
          uploading updated form bean values. -->
    <forward name="success" path="/Present.jsp"></forward>
    <forward name="failed" path="/error.jsp"></forward>
    </action>
    </action-mappings>
    </struts-config>GetChangeAction.java:
    =====================
    public class GetChangeAction extends DispatchAction{
      public ActionForward populateDetails(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
            DynaActionForm dForm = (DynaActionForm)form;
            String empId = dForm.get("empId");     
            // calling Model / Db and then getting back Employee Details
            EmployeeBean eb = ModelUtils.getDetails(empId);
            // Updating form bean by updating values from the Model 
            dForm.set("empName".eb.getEmpName()); 
            dForm.set("email".eb.getEmail());
            return mapping.findForward("success");
    }well to me this should work regardless to any browser but we need to make sure we put in our logic properly.

  • Read a property file value and display in jsp page

    I need a solution for the below mentioned scenario,
    I want to read a value from the property file in JSP page.
    For Example, Let us have a property file called A.properties, in the file, we have a value, username = Sam.
    I want to bring this value in the jsp page.
    Please assist in this issue.
    thanks in advance.

    If you are using struts, then you have to first load the taglib like
    <%@ taglib uri="/WEB-INF/strutsresources/struts-bean.tld" prefix="bean" %>and then access the particular property like
    <bean:message key="welcome"/>Also, you have to define <message-resources> in struts-config. Though I am not into struts for year now, So, please confirm the code.

Maybe you are looking for

  • Not able to get data from Reference Purchase Organization

    Hi,     the scenario is Need to have one global pur. org for 3 company codes and one each company code specific purchase org. so i created Z300 as a ref purchasing org and created Z100 for a specific company 3000 n assigned to it and assigned Z100 to

  • EBS: RFEBGB00 No line items found

    Hello All, When I try to post the Electronic Bank Statement in Great Britan into the system through RFEBGB00 (FF_5), the system is picking up the header the trailer data correctly. Whereas, the transaction data is not getting posted and it shows "No

  • Transferring albumn artwork/song ratings etc to new itunes install

    I have windows XP installed on one HD and Vista installed on another HD on the same PC. I have spent a lot of time getting the album artwork, rating the songs etc on the XP iTunes install. I recently upgraded my ram and can now use Vista w/o Lag and

  • Extract information from Javadoc files

    I want to extract class, method & parameter information from the javadoc files (in html format, not from source code). Are there any existing API's / opensource projects that would help me do this. I have tried searching google and the forums, but I

  • Zero value sales order creation

    Dear Gurus, Can any one tell me how to do a zero value sales order - as in free sample only the excise value has to come and the net value without excise it must be Zero. if you have screen shot sent it regarding the configuration to [email protected