Struts tags

Hi there
I am new to struts. I was trying to test a logon system, and I got some problems with invoking struts tags.
I created "pages" fold and "tags" fold under my WEB-INF fold. I copied and pasted all tlds in tags fold including struts-html.tld. In pages fold, there is a Logon.jsp, which has <%@ taglib uri="/tags/struts-html" prefix="html" %> at the top.
However, the system gives me an error message below
File "/tags/struts-html" not found
If I change it to <%@ taglib uri="/tags/struts-html.tld" prefix="html" %>, the errors becomes to
java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TageAttributeInfo.<init>(Ljava/lang/...................
Does anyon know how to fix it?
Cheers
Weiming Chen

Hi there
I am new to struts. I was trying to test a logon
system, and I got some problems with invoking struts
tags.
I created "pages" fold and "tags" fold under my
WEB-INF fold. I copied and pasted all tlds in tags
fold including struts-html.tld. In pages fold, there
is a Logon.jsp, which has <%@ taglib
uri="/tags/struts-html" prefix="html" %> at the top.
However, the system gives me an error message below
File "/tags/struts-html" not found
If I change it to <%@ taglib
uri="/tags/struts-html.tld" prefix="html" %>, the
errors becomes to
java.lang.NoSuchMethodError:
javax.servlet.jsp.tagext.TageAttributeInfo.<init>(Lja
a/lang/...................
Does anyon know how to fix it?
Cheers
Weiming ChenDear Weiming Chen,
Try this,
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic"%>
..........

Similar Messages

  • How to prepare Custom tag with scope as  session  like Struts tag

    Hi
    All Struts tags having the feature of Automatic Scoping.
    Automatic Scoping: Struts tags check all contexts (namely page, request, session, application) and use the first instance found. Developers do not have to explicitly "retrieve" objects from a particular scope. They may, however, specify a context.
    same as like struts tag I want to preapre 'select custom tag'.which will retrieve its previous selected value automatically and display.And one important thing is I dont want to set the selected value of custom tag in session expicitly.I mean the custom tag it self should take care to set the session vale and retrieve the sesion value and display like Struts tag . For struts select tag we wont set any selected value in session though it will retrieve the previous value and display when scope of form = session
    regards
    jagan

    Hi
    All Struts tags having the feature of Automatic Scoping.
    Automatic Scoping: Struts tags check all contexts (namely page, request, session, application) and use the first instance found. Developers do not have to explicitly "retrieve" objects from a particular scope. They may, however, specify a context.
    same as like struts tag I want to preapre 'select custom tag'.which will retrieve its previous selected value automatically and display.And one important thing is I dont want to set the selected value of custom tag in session expicitly.I mean the custom tag it self should take care to set the session vale and retrieve the sesion value and display like Struts tag . For struts select tag we wont set any selected value in session though it will retrieve the previous value and display when scope of form = session
    regards
    jagan

  • Passing struts-tag value to java / javascript variable in JSP

    Hello all,
    Im trying to pass the value got from the struts-tag to the java variable in the Jsp. However Im not able to get the o/p. Can u guys help me on this pls...
    <logic:notEmpty name="TreeBean" property="list">
        <logic:iterate id="Type" name="TreeBean" property="list" indexId="i">
         <br/><bean:write name="Type" />
        </logic:iterate>
    </logic:notEmpty>Here the list can be populated in the jsp page. However i want the values into jsp list. Im not able to populate the same..
    <% List jspList = null;
    %> I want the values into the jspList variable for further processing. Can u guz pls help me on this....

    Which do you want it in?
    A java variable for use in <% scriptlet code %> or a javascript variable for use on the client end?
    scriptlet:
    <jsp:useBean id="TreeBean" type="java.util.List" class="java.util.ArrayList" scope="?????" />
    Having scriptlet code on the page is considered bad coding style.
    What is it you are trying to accomplish by making the value accessible?
    What are you trying to do in java / javascript that can't be done with JSP tags?

  • Struts tag problems in weblogic 5.1 sp12

              Hello,
              I am deploying a struts application in weblogic 5.1 sp 12. When I load any jsp
              page with a struts tag, e.g. <html:html>, it will throw exceptions as follows:
              Parsing of JSP File '/Feedback.jsp' failed:
              /Feedback.jsp(-1): Error in tag library at: 'bean': error introspecting class:
              'org.apache.struts.taglib.bean.CookieTag': weblogic.servlet.jsp.JspException:
              (line -1): Error in tag library at: 'bean': class org.apache.struts.taglib.bean.CookieTag
              doesn't implement javax.servlet.jsp.tagext.Tag
              probably occurred due to an error in /Feedback.jsp line -1:
              any comment is highly appreciated! I am following the directions posted on apache
              website about instaling struts with weblogic 5.1.
              

              Hello,
              I am deploying a struts application in weblogic 5.1 sp 12. When I load any jsp
              page with a struts tag, e.g. <html:html>, it will throw exceptions as follows:
              Parsing of JSP File '/Feedback.jsp' failed:
              /Feedback.jsp(-1): Error in tag library at: 'bean': error introspecting class:
              'org.apache.struts.taglib.bean.CookieTag': weblogic.servlet.jsp.JspException:
              (line -1): Error in tag library at: 'bean': class org.apache.struts.taglib.bean.CookieTag
              doesn't implement javax.servlet.jsp.tagext.Tag
              probably occurred due to an error in /Feedback.jsp line -1:
              any comment is highly appreciated! I am following the directions posted on apache
              website about instaling struts with weblogic 5.1.
              

  • Problem compling JSP with struts tags on Weblogic 8.1

    I have deployed a web application in Weblogic 8.1. However, I am facing a problem while the JSPs are getting compiled. The JSPs ahve taglib declarations referring to Struts tag library files that are present in WEB-INF folder.
    Stacktrace:
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209: cannot resolve symbol
    probably occurred due to an error in /approve/approve_home.jsp line 53:
    <logic:notPresent name="<%=JobBean.ID%>" scope="request">
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[ /approve/approve_home.jsp; Line: 53]
    I believe other people have also faced this issue with Weblogic8.1 and struts. Any solutions???
    Thx
    KP

    KP,
    Does this code run in the development environment but not in production? How
    was this code compiled?
    - john
    "KP" <[email protected]> wrote in message
    news:405b9b56$[email protected]..
    I have deployed a web application in Weblogic 8.1. However, I am facing aproblem while the JSPs are getting compiled. The JSPs ahve taglib
    declarations referring to Struts tag library files that are present in
    WEB-INF folder.
    Stacktrace:
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\m
    yserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209:
    cannot resolve symbol
    probably occurred due to an error in /approve/approve_home.jsp line 53:
    <logic:notPresent name="<%=JobBean.ID%>" scope="request">
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\m
    yserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209:
    cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[/approve/approve_home.jsp; Line: 53]
    >
    I believe other people have also faced this issue with Weblogic8.1 andstruts. Any solutions???
    >
    Thx
    KP

  • Struts tag for request.setAttribute() in a jsp page

    Hello All
    Does anyone know struts tag that can be used for request.setAttribute() in a jsp page?
    Thanx in advance.

    Well
    <bean:define id="foo" name="newsIdAttribute" scope="request" type="java.lang.String" />is equivalent to
    <%
    (java.lang.String) foo = (java.lang.String)request.getAttribute("newsIdAttribute");
    %for setting bean properties you might have to use
    <jsp:setProperty/> or <c:set/> tags in JSP / JSTL respectively.
    Hope this might answer your question :)
    REGARDS,
    RaHuL

  • 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.

  • Struts tags preferences

    is there a preference file for Struts tags such that the HTML code it generates can be customized? For example I have the following Struts tag code:
    <s:form
         action="upload" method="POST" enctype="multipart/form-data">
         <s:file name="upload" label="File" />
         <s:submit id="upload" name="submit"/>
    </s:form>and the HTML it generates automatically put everything into tables. What annoys me is that the Submit button is placed in its own row. Why?? The form looks frickin' ugly now.
    <form id="upload" name="upload" onsubmit="return true;" action="upload.action" method="POST" enctype="multipart/form-data"><table class="wwFormTable">
         <tr>
        <td class="tdLabel"><label for="upload_upload" class="label">File:</label></td>
        <td
    <input type="file" name="upload" value="upload_upload" =""/></td> </tr>
         <tr>
        <td colspan="2"><div align="right"><input type="submit" id="uploadIcon" name="submit" value="Submit" />
    </div></td>
    </tr>
    </table></form> Is there a solution to customize this? thank you

    Maybe just don't use the struts tag then?

  • Struts tag library instead of JSTL

    My developers here are not very well versed with JSTL .
    Is it advisable to use the Struts tag library instead of JSTL.

    For JSTL you need two jar files in your web-inf/lib directory.
    standard.jar
    jstl.jar
    You only mentioned standard.jar - make sure the other is there as well.
    There are also some libraries requried. I think they were included with JDK1.4, but am not entirely certain.
    Check out the requirements on this page:
    http://jakarta.apache.org/taglibs/doc/standard-1.0-doc/standard-1.0/GettingStarted.html
    Particularly those related to JAXP.
    I am think EOFException might be a trouble with parsing the c.tld file in the standard.jar
    Hope this helps,
    evnafets

  • PDK Struts tags

    When trying to use the PDK Struts tags in a portlet, I receive the following error message when the portlet has been deployed to a 10g portal:
    [ServletException in:/WEB-INF/jsp/tiles/portal/index.jsp] action'
    Even with debug mode enabled on the server, that's the only detail I get. My config is as follows:
    IN SERVER.XML
    <taglib>
    <taglib-uri>/WEB-INF/tld/pdk-struts-html.tld</taglib-uri> <taglib-location>/WEB-INF/tld/pdk-struts-html.tld</taglib-location>
    </taglib>
    IN THE TAGLIB INCLUDE
    <%@ taglib uri='/WEB-INF/tld/pdk-struts-html.tld' prefix='pdk' %>
    IN THE JSP:
    <pdk:link page="/servlet/letterView">Link text</pdk:link>
    VERIFIED:
    - The portlet works without the tag included.
    - It works using the standard Struts html:link tag, but of course generates the resulting page in it's own screen, outside of the portal container
    - The TLD is indeed in the location listed in the URI
    - The following two JARs are included in the LIB directory: pdkjava.jar, pdkstruts.jar
    - I removed all attributes from the tag and received a more detailed message (Cannot create rewrite URL: java.net.MalformedURLException: You must specify exactly one of "forward", "href", or "page"') so it seems like everything that needs to be in place is indeed in place -- it seems like I'm just misusing the tag.
    Any help would be appreciated. Thanks!

    The problem was an old copy of the struts.jar file, which was missing the calculateUrl() method called by the Oracle tag. With a new struts.jar file, all was good.

  • Strut tags

    Any reasons why struts tags don't get processed? Here is the code placed in a JSP:
    <html:form action="/commitcancel">
    <html:hidden property="billOrderMaterial" value="<%=request.getParameter("billOrderMaterial")%>"/>
         <html:hidden property="useCurrent" value="<%=request.getParameter("useCurrent")%>"/>
         <html:hidden property="processType" value="<%=request.getParameter("processType")%>"/>
    <%String processType=request.getParameter("processType");
    if(processType != null & processType.equalsIgnoreCase("cancelreq")) { %>
    <html:submit styleClass="button" value="Cancel"/>
    <% }
    %>
    </html:form>

    check whether your application is still supporting jsp1.0?
    if so change it to support jsp1.1
    Regards
    Ramesh Kesavanarayanan

  • Referencing beans as bean attributes in struts tags

    Do struts tags allow you access bean attributes when the bean itself is an attribute of another bean?
    If so, what would be the syntax?
    For instance, I have bean A that contains as an attribute another bean B. I want to test for the value of
    an attribute within B. Let's say I have bean A where A has get/set methods for B and B has get/set methods for an attribute called 'amount'. Then can I say something like:
    <logic:equal name="A" property="B.amount" value="1">
    I tried this syntax and also "B.getAmount()", but neither seems to work.
    I have also tried <logic:equal name="A.B" property="amount" value="1">
    but this doesn't work either.

    I've used that x.y syntax before in some tags, but I don't know if logic tags support it... you should be able to do this:
    <bean:define id="B" name="A" property="B" />
    <logic:equal name="B" property="amount" value="1">

  • Extending Struts Tags

    I wanna extend the Struts tags to add my own properties.
    For e.g.,
    In <html:text >, I would like to add my own attributes called "format". How do I customize this scenario in the Struts <html:text> tag.
    Here, I don't want to do any validations. I just need my attribute to be placed / appended with the final <input> tag.
    <input type = "text" name = "XXXX" value="XXXX" format="PHONE"/>
    Here, "format" attribute to be introduced by me.
    How do I able to add this property in the <html:text></html:text>
    Can anyone help me in this..

    No, there is no workaround I am aware of for this.
    I would recommend you just copy the struts tld, map it to a different URI and then add your custom extension stuff to that.

  • JDeveloper editing JSP with Struts tags terribly, terribly slow!?

    I use JDeveloper 10.1.2 and I do not know the reason but it started to take 15min just to change/edit JSP containing Struts tags. RAM memory is 1GB and there is more than 0.5 GB available, but processor usage shows 100% allocated to JDeveloper!? As soon as I do even slight change in a JSP file JDeveloper starts some computations and I have no idea of what it is doing.
    What is JDeveloper computing? It seems it tries to produce some drop-down lists "helping" me to do the editing, add tags and instead I am spending days to just change one small JSP page!
    How can I stop and PREVENT JDeveloper doing ANY "help" during editing of ANY file?
    There must be an option to switch off whatever JDeveloper is doing?
    Many thanks,

    I did that but it is still very slow, it looks like Jdev is doing some intensive calculations whenever I click somewhere on JSP page with tags. Maybe this is related with my other question I posted before this one? Maybe JDev automatically searches for tag libraries it cannot find and copies them to /WEB-INF directory? (other IDEs used in same environment, like Eclipse and IntelliJ, and they do not have this problem)
    Some other strange things: struts-config.xml seems not integrated with CVS from JDev (other files like tiles-config.xml, web.xml etc. are integrated, I can right click and get CVS info on particular file, except struts-config.xml). When I want to check in/out struts-config.xml I have to do it with external tool like WinCVS etc., cannot do that from JDev!

  • 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

Maybe you are looking for

  • How to implement a tree like security realm?

    hi all: i am working on a project . it's a very complex one and most importantly there's so many functions( 1000 or more) and every fuction should be protected resources. so i have to define many roles and map the roles to the many functions. it's a

  • Problem in Xperia Pro after upgrading to Android 4.0.4

    Hi all, I purchased Xperia Pro a couple of weeks back. Android version initially installed was 2.3.4. I went on to upgrade the same to 4.0.4 yesterday (Build no: 4.1.B.0.431). Everything works fine but for my sliding keypad keys. The alphabet keys A,

  • Macbook Pro won't turn on

    Hi, I have a Macbook Pro (not sure the year, maybe 2007 or 2008). It will not turn on. I have tried everything that apple suggests. When I press the button on the bottom on the battery it lights up 5 green circles so am assuming it is fully charged.

  • Capital One Luv or no Luv???

    I have two capital one regular platinum cards. The CL are $1400 and $2000. Utilization is 50% no missed payments.  I recv'd minor ($300) increases on both cards back in March 2015. I hit the love button last week (3 months out) and was denied. Althou

  • Insert a Speakable Phrase in Applescript

    Can anyone tell me how to insert a speakable phrase into an applescript script. I would like to run a script and all it does is speak the pharse I have written in the script. Not run a sound.app or play a recorded clip. But speak a line of text that