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.

Similar Messages

  • It is question on portlet pdk struts tags link

    hi:
    <td>
    <jsp:useBean id="rowEditSet" class="java.util.HashMap"/>
    <c:set target="${rowEditSet}" property="event" value="setCurrentRowWithKey"/>
    <c:set target="${rowEditSet}" property="Arg0" value="${Row.rowKeyStr}"/>
    <pdk-html:link action="/browseCustomers.do" name="rowEditSet">Select
    </pdk-html:link>
    result:
    Select
    dont use

    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.

  • Pdk struts jsp tags not working.

    The problem we have hited is that pdk-struts tags are not rendered corectly:
    From next piece of code:
    <pdk-html:form action="/auth_portlet/doLogin.do" name="loginFormBean" type="passport_portlets.auth_portlet.loginFormBean">
    <%--<pdk-html:errors/>--%>
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>Username:</td>
        <td><pdk-html:text property="username"/></td>
    </tr>
    <tr>
        <td>Password:</td>
        <td><pdk-html:text property="password"/></td>
    </tr>
    <tr>
        <td></td>
        <td><pdk-html:submit value="Login"/></td>
    </tr>
    </table>
    </pdk-html:form>We recieve next output in the browser window:
    <form name="loginFormBean" method="post" action="/passport_portlets/auth_portlet/doLogin.do">
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>Username:</td>
        <td><input type="text" name="username" value=""></td>
    </tr>
    <tr>
        <td>Password:</td>
        <td><input type="text" name="password" value=""></td>
    </tr>
    <tr>
        <td></td>
        <td><input type="submit" value="Login"></td>
    </tr>
    </table>
    </form>But it's wrong output, there aren't any qualifiing naming prossed, as much as no hidden fields included into form. We don't receive any kind of errors, just such simple output in browser.

    to be more detailed and specific, source follows
    provider.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
       <session>true</session>
       <passAllUrlParams>false</passAllUrlParams>
       <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
          <id>1</id>
          <name>AuthPortlet</name>
          <title>portlet name</title>
          <description>description</description>
          <timeout>40</timeout>
          <showEditToPublic>false</showEditToPublic>
          <hasAbout>false</hasAbout>
          <showEdit>false</showEdit>
          <hasHelp>false</hasHelp>
          <showEditDefault>false</showEditDefault>
          <showDetails>false</showDetails>
          <renderer class="oracle.portal.provider.v2.render.RenderManager">
             <renderContainer>true</renderContainer>
             <renderCustomize>true</renderCustomize>
             <autoRedirect>true</autoRedirect>
             <contentType>text/html</contentType>
             <showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">
             <defaultAction>/auth_portlet/doDefault.do</defaultAction>
             </showPage>
          </renderer>
       </portlet>
    </provider>
    web.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
        <description>web.xml file for passport portlets package</description>
      <context-param>
        <param-name>oracle.portal.log.LogLevel</param-name>
        <param-value>4</param-value>
      </context-param>
      <servlet>
        <servlet-name>SOAPServlet</servlet-name>
        <servlet-class>oracle.webdb.provider.v2.adapter.SOAPServlet</servlet-class>
      </servlet>
      <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>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>SOAPServlet</servlet-name>
        <url-pattern>/providers</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>SOAPServlet</servlet-name>
        <url-pattern>/providers/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
        <session-config>
            <session-timeout>35</session-timeout>
        </session-config>
        <mime-mapping>
            <extension>html</extension>
            <mime-type>text/html</mime-type>
        </mime-mapping>
        <mime-mapping>
            <extension>txt</extension>
            <mime-type>text/plain</mime-type>
        </mime-mapping>
    </web-app>
    struts-config.xml
    <?xml version="1.0" encoding="windows-1251" ?>
    <!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-beans>
        <form-bean name="loginFormBean"
                   type="passport_portlets.auth_portlet.loginFormBean">
          <form-property name="username" type="java.lang.String"/>
          <form-property name="password" type="java.lang.String"/>
        </form-bean>
      </form-beans>
      <action-mappings>
        <action path="/auth_portlet/doDefault"
                type="passport_portlets.auth_portlet.doDefaultAction">
          <forward name="loged" path="/auth_portlet/showLoginState.jsp" redirect="true"/>
          <forward name="notloged" path="/auth_portlet/showLoginForm.jsp" redirect="true"/>
        </action>
        <action path="/auth_portlet/doLogin"
                type="passport_portlets.auth_portlet.doLoginAction"
                name="loginFormBean"
                scope="request"
                validate="true"
                input="/auth_portlet/showLoginForm.jsp">
          <forward name="success" path="/auth_portlet/showLoginState.jsp" redirect="true"/>
          <forward name="failure" path="/auth_portlet/showLoginForm.jsp" redirect="true"/>
        </action>
      </action-mappings>
      <message-resources parameter="passport_portlets.ApplicationResources"/>
    </struts-config>
    showLoginForm.jsp
    <%@ page contentType="text/html;charset=windows-1251"%>
    <%@ taglib uri="http://xmlns.oracle.com/portal/pdk/struts/tags-html" prefix="pdk" %>
    <pdk:xhtml/>
    <pdk:form action="/auth_portlet/doLogin.do" name="loginFormBean" type="passport_portlets.auth_portlet.loginFormBean" method="post">
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>Username:</td>
        <td><pdk:text property="username"/></td>
    </tr>
    <tr>
        <td>Password:</td>
        <td><pdk:text property="password"/></td>
    </tr>
    <tr>
        <td></td>
        <td><pdk:submit value="Login"/></td>
    </tr>
    </table>
    </pdk:form>all works fine, except the problem that pdk-struts tags in jsp page aren't processed correctly, they output simple html output, which is not formated to inline rendering rules (qualified naming of fields, hidden fields with all values, etc).
    Maybe I'm missing something?

  • PDK-Struts Application requires pdkstruts.jar & pdk-struts-html.tld

    Hi All,
    Scenario is this, that I've created a pdk-struts application via JDeveloper with normal struts taglibs, and deployed it to Oracle Portal 10.1.4. default-action tags specified action.do is working fine and displays the welcome page within portlet region but after clicking any button within that welcome page opens a new browser page within same window and the URL pattern changes too.
    I want this to be executed within portlet region.
    Another problem is this, when I tried to use pdk-struts-html.tld within application;
    first warning within JDeveloper is this; Metadata Namespace for pdk-struts-html is not loaded, all entries are fine, and within Portal after successful deployment it gives an error (500 Server Listener Error) on viewing that portlet body.
    I want these issues to be resolved as soon as possible.
    Or if anybody knows about pdkstruts.jar and pdk-struts-html.tld with latest versions, plz do tell me the site-url to download these things.
    Plz help me out about these issues.
    Thanks in advance.

    Look in the Building Struts Portlets with Oracle Jdevelper section of the Oracle Application Server Portal Developers Guide. You need additional jar files besides the pdkstruts one. Also, look in the server logs to see more detailed messages about why it failed, it will help you debug.

  • PDK Struts HTML API Listing

    Hi,
    Can you guide me in locating the PDK Struts HTML API listing, i am unable to find any documentation regarding these tags and how they can be used.
    Any pointers to some detailed documentation on these tags would be greatly
    appreciated!!
    Thanks,
    Srikarthik

    Srikarthik ,
    There is not a seperate doc for the Struts API. As far as I can tell, the basis of these tags are Struts 1.1. You can find documentation on Struts 1.1 at http://struts.apache.org//struts-doc-1.1/index.html . Please be aware that there apparently are some limitations compared to normal struts. According to metalink note #357760., the hidden and textareas values are lost on submit.
    Eric

  • 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

  • JDeveloper 10.1.3.2 pdk-struts taglib doesn't work

    Hi all,
    I just installed new jDev version (10.1.3.2) and I migrated all projects and setting from 10.1.3.1, but I still got a little/big problem with PDK-Struts taglib.
    In the previous jDev version portlet add-in wasn't include and to use pdk-struts integrate in the IDE I managed it as a JSP TagLib and everythings works fine.
    In new version the taglib in native and ready (it doesn't required to be registered!) to use but when I'm building the project I found and exception
    Error: java.lang.NoClassDefFoundError: org/apache/struts/taglib/html/FormTag
    mind!!!
    - the same project in version 10.1.3.1 has no problem to build
    - I checked and seleted all the libraries required
    Anyone knows why the new jDev version doesn't work??
    please someone helpMe!!!!
    Regards
    spig@

    Yea, I had those "is not a registered namespace in TLD" errors too, but regarding Struts HTML... I had to go to the Project properties and add the library.. (It went missing during conversion)
    Its frustrating and I know how you feel. Try this, try that and still doesnt work. My advice is to remove taglibs. Close Jdev. Open Jdev add them again. It have to work. Also it might help to delete class directories. Also be aware that some libraries are kept in "\WEB-INF\lib" and during conversion they remained (those libraries were from old Jdev you have to replace them with new version)
    So, all in all keep tryng, it have to work :)
    Good luck...

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

  • 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

Maybe you are looking for

  • Licensing serial number required every time I open Aperture

    I have recently purchased a new iMac and transferred my Aperture over to this new computer. Now every time I open Aperture it asks me to enter the licensing serial number before opening the program. How can I stop this from happening?

  • Adobe Certified Course material

    Hi Team, I was trying to get information on where to buy the adobe course material if I am teaching Flex DRCA and Integration with Data and Messaging. It will be great if some ACI can share this information. Thanks in advance, Mohan

  • Custom folders - IOS 7.

    Any way to increase the number of apps (9) in a custom folder- so that I DONT have to scroll thru the pages. One folder has the full 20.  With IOS6 - all 20 on one page.  I miss that  in IOS7 !

  • Oracle 9i core library improvements

    Hi All, I'm currently preparing for the Oracle 9i dba exam. The test content checklist contains the following : 'List the benefits of core library improvements' Does anybody know more about this ? I searched the 9i docs but cannot find any reference

  • Unable to download images from Card reader on Vista Premier Computer

    I have been trying to download (Import) .cr2 Raw images and .jpgs from a card reader using LR's downloader with a Vista Premium OS. I have this set to dual boot with XP Media Center 2005 as the other OS. I installed LR directly on the Vista boot "com