Problem using struts tags in .jsp

I have a page that fills in the appropriate user information in text fields when viewed. The problem is, i want to have a text field that shows the full name, but i only have getter and setter methods for firstname and lastname in my form bean. Is there a way to combine firstname and lastname to display the fullname using the <html:text> tag ???

You can use an ActionForm for your view that differs from the bean you are using. DynaActionForm would be ideal because it can be tedious to have a full complement of view beans that mirror your value objects.
The idea is to loadup a DynaActionForm with the values for the view before the JSP is called in an Action. The following shows the parts of this and some code for execute() that creates DynaActionForm.
If you have this bean in myapp/Contact.java
package myapp;
public class Contact {
private String firstName,lastName;
public String getFirstName() { return firstName; }
public String getLastName() { return lastName; }
public void setFirstName(String _firstName) { firstName = _firstName; }
public void setLastName(String _lastName) { lastName = _lastName; }
}Put this in the appropriatesecions in struts-config.xml
<form-bean name="ContactActionForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="fullName" type="java.lang.String"/>
</form-bean>
<action path="/showContactForm"
        type="myapp.ShowContactActionForm">
  <forward name="success" path="/contactActionForm.jsp">
</action>
<action path="/handleContact"
        name="ContactActionForm"
        type="myapp.HandleContactActionForm">
  <forward name="success" path="/contactActionForm.jsp">
</action>And for the execute method in the ShowContactActionForm put...
Contact contact = db.getContact(contactId);
ModuleConfig mc = _mapping.getModuleConfig();
FormBeanConfig fbc = mc.findFormBeanConfig("ContactForm");
DynaActionFormClass dafc =
DynaActionFormClass.createDynaActionFormClass(fbc);
DynaActionForm theForm = (DynaActionForm)dafc.newInstance();
theForm.initialize(_mapping);
theForm.set("fullName", contact.getFirstName() + " " + contact.getLastName());
_request.setAttribute("ContactForm", theForm);
fwd = _mapping.findForward("success");

Similar Messages

  • Problem using Custom tag in JSP

    Iam facing problem when i am deploying my files on j2ee 1.4 server it give following erroer::
    my .tld file and jsp are given below
    any body can help me;
    mytaglib.tld file:
    <<?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//
    DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/
    web-jsptaglibrary_1_1.dtd">
    <!-- a tag library descriptor -->
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>first</shortname>
    <uri></uri>
    <info>A simple tab library for the
    examples</info>
    <tag>
    <name>hello</name>
    <tagclass>tags.HelloTag</tagclass>
    <bodycontent>empty</bodycontent>
    <info>Say Hi</info>
    </tag>
    </taglib>
    MY JSP file :::
    <%@ taglib uri="/WEB-INF/mytaglib.tld"
    prefix="first" %>
    <HTML>
    <HEAD>
    <TITLE>Hello Tag</TITLE>
    </HEAD>
    <BODY bgcolor="#ffffcc">
    <B>My first tag prints</B>:
    <first:hello/>
    </BODY>
    </HTML>
    Error :::
    org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/mytaglib.tld: (line 1, col 2)
         org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:218)
         org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:188)
         org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:515)
         org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:460)
         org.apache.jasper.compiler.Parser.parseDirective(Parser.java:526)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1617)
         org.apache.jasper.compiler.Parser.parse(Parser.java:174)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:244)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:146)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:132)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:245)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:462)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:551)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)

    thanks for reply it still giving error :
    org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/mytaglib.tld
         org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:218)
         org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:188)
         org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:515)
         org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:460)
         org.apache.jasper.compiler.Parser.parseDirective(Parser.java:526)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1617)
         org.apache.jasper.compiler.Parser.parse(Parser.java:174)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:244)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:146)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:132)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:245)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:462)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:551)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)

  • How to get parameter and add it to hyperlink using struts tag?

    Hi everyone:
    There is a.jsp pass a parameter to b.jsp.How to get the parameter in b.jsp using struts Tag?I also want to add the parameter to a hyperlink in b.jsp.For example in b.jsp <html:link forward=.....>cxxxx</html:link>.How to add the parameter(get from a.jsp) to cXXXX in b.jsp?

    Try this:
    Copy A Request Parameter - You can create a new bean containing the value of a parameter included in this request. If no parameter of the specified name was included, a request time exception will be thrown - therefore, it is common to nest the use of this tag inside a <logic:present parameter="xxx"> tag to ensure that the parameter was really included. If there is the possibility that more than one parameter of the same name was included, specify the "multiple" attribute (and the resulting value bean will be an array of String values, instead of a single String).
    <bean:parameter id="name" name="name"/>
    And then just use <html:link> with paramId. No java code at all.

  • Problems using GET method in JSP

    Hi,
    I had some problems using GET method in JSP.
    I'm using Apache web server 1.3 and Tomcat 3.3.1 in windows 2000.
    And I'm using language English and Korean.
    When I send messages using POST method, all is good
    But when I send message using GET method, English is good, but Korean is not good.
    I tried to encode using
    URLEncode.encode(str, "UTF-8")
    and decoding it using
    URLDecode.decode(request.getParameter(tag), "UTF-8")
    but it didn't work.
    How can I receive request including Korean using GET method in JSP?
    If anyone have solutions, please let me know.
    thanks.

    Hi,
    I had some problems using GET method in JSP.
    I'm using Apache web server 1.3 and Tomcat 3.3.1 in
    windows 2000.
    And I'm using language English and Korean.
    When I send messages using POST method, all is good
    But when I send message using GET method, English is
    good, but Korean is not good.
    I tried to encode using
    URLEncode.encode(str, "UTF-8")
    and decoding it using
    URLDecode.decode(request.getParameter(tag), "UTF-8")
    but it didn't work.
    How can I receive request including Korean using GET
    method in JSP?
    If anyone have solutions, please let me know.
    thanks.This problem appears, when one use UTF-16 encoding in JSP - am I right?
    If so there are two solutions:
    1) Temporary: Use "UTF-8" - or any other 8 bit encoding scheme and
    encode Korean symbols with "&1234;" kind of escapes - though it
    may not work
    2) Absolute: get my piece of code, which I have managed to write
    just a month ago resolving absolutely similar problem with UTF-16
    in code using Chinese/Russian/English encodings
    But I wouldn't say that it's costs 10 DDs :) - it's much more
    expensive... So try 1st variant if it wouldn't help - let me know.
    I'll figure :)
    Paul

  • How I can use struts with uix jsp

    Hi,
    I want to use struts with uix jsp but I don't know how to set value of uix tag attribut by struts tag
    example :
    I want to change:
    <uix:globalHeader text="title" >
    by
    <uix:globalHeader>
    <bean:message key="title" arg0="Browse"/>
    </uix:globalHeader>
    N.B: I tried to use the tag <boundAttribute> but doesn't works
    Thanks in advance.

    Hi Ghazouani,
    From your sample code it looks like you are trying to use the Struts <bean:message> to provide internationalized text for the links in your globalHeader component. Couple of comments on this particular issue:
    - You'll need to add a <link> element to your globalHeader for each item that you want to display. So, instead of:
    <uix:globalHeader>
    <bean:message key="title" arg0="Browse"/>
    </uix:globalHeader>
    You'll want something which looks like this:
    <uix:globalHeader>
    <uix:link text="Browse"/>
    </uix:globalHeader>
    - If you want to bind the text for each link to some internationalized value which is pulled from a ResourceBundle, you should use the UIX JSP <bundle> data provider:
    <uix:bundle name="l10n" class="your.Bundle"/>
    <uix:globalHeader>
    <uix:link textBinding="title@l10n"/>
    </uix:globalHeader>
    In general when mixing JSP tags from different tag libraries, you need to be careful that you honor the semantics of each tag library. For example, in this particular case, the <uix:globalHeader> expects to have <uix:link> children - using any arbitrary tag (like <bean:message>) is not necessarily going to produce the desired results.
    As far as general UIX/Struts integration goes, we recommend using uiXML as a view for your Struts application. Check out the "Using uiXML with Struts" section of the UIX Developer's Guide for more info.
    Andy

  • How to use custom tag in jsp

    sir
    plz tell me how to use custom tag in jsp.plz describe it.
    i will be thankful to u

    Do you want to use taglibs or develop custom tags? Either way take a look at these:
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html
    http://www.stardeveloper.com/articles/display.html?article=2001081301&page=1
    http://www.onjava.com/pub/a/onjava/2000/12/15/jsp_custom_tags.html
    http://jakarta.apache.org/taglibs/tutorial.html
    http://www.ibm.com/developerworks/edu/j-dw-java-custom-i.html
    http://www.herongyang.com/jsp/tag.html

  • Problem using custom tag library in portlet's jsp

    Hi,
    I created a custom portlet (a JSR 168 portlet) and I'm using a tag library that I previously developed. Normally it works fine, but sometimes I get a ClassCastException. Once I redeploy the portlet everything works again. This is Oracle Portal 10.1.4.
    Has anybody encountered similar problems?
    Here's the exception:
    taglib exception:
    java.lang.ClassCastException at timecardreminderportlet.html._view._jspService(_view.java:201) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source) at org.mitre.isis.trs.reminder.portlet.TimecardReminderPortlet.doDispatch(TimecardReminderPortlet.java:108) at javax.portlet.GenericPortlet.render(Unknown Source) at oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499) at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230) at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153) at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

    Hi,
    I created a custom portlet (a JSR 168 portlet) and I'm using a tag library that I previously developed. Normally it works fine, but sometimes I get a ClassCastException. Once I redeploy the portlet everything works again. This is Oracle Portal 10.1.4.
    Has anybody encountered similar problems?
    Here's the exception:
    taglib exception:
    java.lang.ClassCastException at timecardreminderportlet.html._view._jspService(_view.java:201) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source) at org.mitre.isis.trs.reminder.portlet.TimecardReminderPortlet.doDispatch(TimecardReminderPortlet.java:108) at javax.portlet.GenericPortlet.render(Unknown Source) at oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499) at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230) at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153) at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

  • Help! Problem with Struts tag html:errors/

    Hi everybody,
    In my JSP page called addUser.jsp, i have the different Struts Tag
    <html:errors/>
    <html:form action="/addUser" focus="firstName">
    </html:form>
    I have of course the ApplicationResources.properties file with differents Struts properties:
    errors.footer=</ul><hr>
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    errors.ioException=I/O exception rendering error messages: {0}
    and an other one:
    error.fieldsNeeded=<font color="#FF0000">Some fields are missing.</font>
    when I call the addUser form, my JSP page display:
    null Some fields are missing. null
    Have u any suggestion about my prob?
    tx a lot
    s.

    Hi,
    can u post the java code where u are actually adding the error to the action errors. may be there is something wrong with that. I dont see any problem with the jsp or the applicationsResources.properties.
    Thanks
    Latha

  • How to use standard tags in JSP

    Hi all,
    Just wanted to know how to use standard tags of endeca in JSP ... say for example to display Dimension Name using standard tags.
    Thanks
    --Sam                                                                                                                                                                                                                                                                                                                       

    i was just checking whether we can use endeca TAG'S ( typo mistake in my earlier post not the JSTL standard library )....in my JSP
    We cannot use endeca TAG ...as they are for different purpose.
    Sameer

  • Performance problem using OBJECT tag

    I have a performance problem using the java plugin and was wondering if anyone else was has seen the same thing. I have a rather complex applet that interacts with java script in a web page using the LiveConnect API. The applet both calls javascript in the page and is called by java script.
    Im using IE6 with the java plugin that ships with the 1.4.2_06 JVM. I have noticed that if I deploy the applet using the OBJECT tags, the application seems the trash everytime I call a java method on the applet from javascript. When I deplot the same applet using the APPLET tag the perfomance is much better. I would like to use the OBJECT tag because it applet bahaves better and I have more control over the caching.
    This problem seems to be on the boundaries of IE6, JScript, the JVM and my Applet (and I suppose any could be the real culprit). My application is IE5+ specific so I can not test the applet in isolation from the surround HTML/JavaScript (for example in another browser).
    Does anyone have any idea?
    thanks in advance.
    dennis.

    I have a performance problem using the java plugin and was wondering if anyone else was has seen the same thing. I have a rather complex applet that interacts with java script in a web page using the LiveConnect API. The applet both calls javascript in the page and is called by java script.
    Im using IE6 with the java plugin that ships with the 1.4.2_06 JVM. I have noticed that if I deploy the applet using the OBJECT tags, the application seems the trash everytime I call a java method on the applet from javascript. When I deplot the same applet using the APPLET tag the perfomance is much better. I would like to use the OBJECT tag because it applet bahaves better and I have more control over the caching.
    This problem seems to be on the boundaries of IE6, JScript, the JVM and my Applet (and I suppose any could be the real culprit). My application is IE5+ specific so I can not test the applet in isolation from the surround HTML/JavaScript (for example in another browser).
    Does anyone have any idea?
    thanks in advance.
    dennis.

  • Bussines rules problems using Struts + BC4J

    Hi, I'm using struts + bc4j and I have some problems with the validations made on the entities.
    Looks like sometimes, struts didn't shows the error message until the commit is made. But the problem is that on the navigator shows me the stack trace of the exception, but only when I do the commit of the transaction.
    In the test of the application module, the business rules works perfectly.
    If somebody can help me i will aprecciate it.
    Thanks
    Daniel Gonzalez

    There are already some threads on this topic.
    Unfortunately, they don't give solutions - not yet ;)
    Custom Method Validator
    addVetoableChangeListener for attribute doesn't seem to get fired
    HTH,
    Adrian

  • Problem using @section tag.

    Hi,
    I am using for-each@section tag.
    I want a column to be reset in the header part whenever a new section changes, and I am able to acheive this using @section tag. But by using this tag it restarts the page numbering whenever a new section starts. I want the page number to be continued from the previous section. How can I acheive this?
    Thanks

    @section is going to introduce new page and start the page numbering from 1.

  • Error in using struts tag library

    Platform information:
    Windows XP
    BEA Weblogic Server 8.1 (Developer)
    Struts 1.1
    I am unable to compile the following JSP in weblogic because it says there is
    an error using the struts-html tag library. (Details about the error are mentioned
    after the JSP)
    My JSP file is:
    ===================================================================
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ page import="com.hipaaccelerator.runtime.HARuntime" %>
    <jsp:useBean id='logonForm' scope='request' class='com.hipaaccelerator.hipaax.form.LogonForm'/>
    <html:html>
    <head>
    <title>Logon</title>
    <link rel='stylesheet' href="<html:rewrite page='/styles/default.css'/>" type='text/css'
    >
    <script language='javascript' src="<html:rewrite page='/scripts/default.js'/>"
    type='text/javascript'></script>
    </head>
    <body>
    <html:form action='/logon.do' >     
         <table border='0' align='center' >
              <tr><td height='10'></td></tr>
              <tr>
    <td align='center'>
    <html:img src='/images/Logo.gif' height='70'
    width='449'/>
    </td>
    </tr>
              <tr><td height='10'></td></tr>
         </table>
         <table align='center' width='100%' >
         <tr><td height='10'></td></tr>
         <tr>
         <td height='20' width='10%'> </td>
         <td height='20' colspan='3' align='center' style="font-size: 18pt; color:
    blue;
    background-color: white; text-align:center">PAC
    </td>
         <td height='20' width='10%'> </td>
         </tr>
         <tr><td height='10'></td></tr>
         <tr>
         <td height='20' width='10%'> </td>
         <td height='20' width='8%'> </td>
         <td height='20' align='center' style="border-style:solid; border-width:2pt;
    font-
    size: 10pt; color: red; background-color: white; text-align:center">
    <%= HARuntime.instance().getConfig().getProperty("logonAnnouncement")
    %>
    </td>
         <td height='20' width='8%'> </td>
         <td height='20' width='10%'> </td>
         </tr>
         <tr><td height='10'></td></tr>
         </table>
         <table border='0' align='center' >               
         <tr>
    <td class='formfieldname' ><b>User Name: </td>
         <td class='formfield'>
         <html:text property='username' maxlength='20' size='20'/>
         </td>
         </tr>
         <tr><td class='formfieldspacer'></td></tr>
         <td class='formfieldname' ><b>Password:</b> </td>
         <td class='formfield'>
         <html:password property="password" size="20" maxlength="20"
    redisplay="false"/>
         </td>
         </tr>
         <tr><td class='formfieldspacer'></td></tr>
         <tr>
    <td colspan='2' align='middle'>
         <html:image src='/images/login.gif' onclick='document.forms[0].submit();
    return false;' />     
         </td>
    </tr>
    </table>
    <br><br>
    </html:form>     
    </body>
    </html:html>
    ===================================================================
    The translation of this page fails with the following error:
    <Dec 16, 2003 5:06:13 PM MST> <Error> <HTTP> <BEA-101045> <[ServletContext(id=4595,name=hipaax,context-path=/hipaax)]
    translation of /logon.jsp failed:
    weblogic.servlet.jsp.JspException: (line 1): Error in using tag library uri='/WEB-INF/struts-html.tld'
    prefix='html': The Tag class 'org.apache.struts.taglib.html.BaseTag' has no setter
    method corresponding to TLD declared attribute 'server', (JSP 1.1 spec, 5.4.1)>
    ===================================================================
    I have struts.jar in /web-inf/lib. I have taglib (uri and location) definitions
    in web.xml.I have all the struts tld files under /web-inf. Is there anything
    else I have to do?
    Any help would be greatly appreciated.
    Thank you.
    Sharmila

    Update: I just looked up the WL version and it's 8.1 sp3
              So, I guess, JSTL 1.1 (which includes jstl fn tags) is not supported by WL.... Someone correct me if I am wrong.
              Thanks,
              pal :)

  • How to use struts in a jsp where controls are dynamically decided

    Hi,
    In My JSP...
    I don't know how many text field,listbox,radio button i need to display...
    Depending on the user naviagation it is dynamically decided ... how many all the above mentioned control (text field,listbox,radio ) need to display.
    Here the problem is all the name of the control (text field,listbox,radio ) are dymaically decided..so in this case how do i wirte setter and getter in the Action Form.
    Thanks
    balaji

    indexed or mapped fields... For example, in the form, you have this:
         private HashMap map = new HashMap();
         public Object getField(String key) {
              return (map.get(key));
         public void setField(String key, Object value) {
              map.put(key, value);
         }Then in the JSP:
    <html:text property="field(fieldName)" /> Where the "field(.." part is the property name (get/setField) and the "..(fieldName)" part is a unique key for the map. This can be simply done as field(text1), field(text2), etc.
    There are also index fields, where you use an Object array (I think) and field[index] as the name (field[0], field[1], etc.). You can use <%= %> scriptlets to write the property value for the tag, of course.

  • Problem using a bean in JSP on Tomcat 5.0.28

    Hi,
    I'm new to JSP, I've installed Tomcat 5.0.28 and I'm able to run JSP but when I try an asp wich uses a bean it gives me this error, the directory structure is
    testingProject with the first.jsp
    testingProject\WEB-INF\classes\myPackage with the test.class
    the first.asp
    <%@ page import="myPackage.Test" %>
    <html><head><title>Test</title></head>
    <body bgcolor=white>
    <jsp:useBean id="list" class="myPackage.Test"> </jsp:useBean>
    <jsp:getProperty name="list" property="value1" />
    <%=list.value1%>
    <p>
    </body></html>
    the Test.java
    package myPackage;
    public class Test{
    String value1="testinggggggggg";
    public void Test(){
    public String getValue1(){ return value1}
    the error
    thanks in advance
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 6 in the jsp file: /first.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 5.0\work\Catalina\localhost\testingProject\org\apache\jsp\first_jsp.java:60: cannot resolve symbol
    symbol : variable value1
    location: class myPackage.Test
    out.print(list.value1);
    ^
    1 error
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)

    There are two ways of getting info from the bean.
    1) the jsp:getProperty tag, which seems correct in your code
    2) the <%= ... tag. In that case you must write a valid java expression. In your case: list.getValue1()

Maybe you are looking for

  • Verify Your Payment message when i log into my account....

    Hi, I found out my iTunes account was hacked last year as a hacker using a trojan horse backdoor program remotely controlled my computer. Long story short...i got a better anti-virus program scanned my computer and quarantined it. However, up until t

  • A problem about ALG_DES_CBC_ISO9797_M2 cipher

    I am doing a test for DES encryption/decryption using cref. Looks like only few cipher algorithms are support by Java card OS. I use ALG_DES_CBC_ISO9797_M2. The problem is as below: I use RMI. I think the operation block is 8 bytes. I want to encrypt

  • HTMLLoader.pdfCapability showing "wrong" error. Help?!

    Hello all, Just started trying to use the AIR HMTL component with its HTMLLoader. Tried to load/view a pdf doc. Seems to recognize the doc, but all it displays is a black region. In other words, the HTMLLoader area goes from white to black after atte

  • Problems with PSE 11 and Filter Forge

    Is anyone else having problems launching Filter Forge from PSE 11?  It used to work, but now freezes after a very partial load.  FF still works with PSE 9, and yes, I have the latest version of PSE 11 installed on a 64-bit version of Win 7 Pro.

  • BO Report Mobile - date filter

    Hello! I have a report in BO Mobile developed with web intelligence tool with two fields of sales values​​, one daily and one monthly. I'm having the following problem: when I select a specific date to the monthly values ​​are equal to the daily valu