Cannot use jstl tag for jsp page which generated from Human Task

Hi
Plz help me.
I have tried to using jstl in jsp which generate from Human Task and I deploy it to server( by ant on Jdev ) to see task detail in Oracle Worklist application. But when i submit task and then I access to worklist to see task detail, the error has show in page that "OracleJSP: An error occurred. Consult your application/system administrator for support. Programmers should consider setting the init-param debug_mode to "true" to see the complete exception message. " .
I access server to see application.log to see error and I see error show "workflowform: JspServlet: unable to dispatch to requested page: Exception:oracle.jsp.parse.JspParseException: /Header1.jsp: Line # 3, <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> "
How do I fix this error?
PS. I tried to us jstl because I need to connet to database which jstl tag(sql) if somebody has another solution for connect database in task detail page, Please help suggest me.
Thanks
user520932

Is the jstl tag libray loaded in the appsserver?
Can you use jdbc connection like
DataSource ds = ic.lookup("java:comp/env/jdbc/myDB");
Connection con = ds.getConnection();
DataSource ds = (DataSource) org.apache.derby.jdbc.ClientDataSource()
ds.setPort(1521);
ds.setHost("localhost");
ds.setUser("APP")
ds.setPassword("APP");
Connection con = ds.getConnection();
http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html

Similar Messages

  • Use JSTL tags for ATG droplets and beans

    Hi,
    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tag
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>

    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tagIn the <dsp:importbean> use var to give an EL variable name to the component you are importing.You can also set its scope attribute to page, request, session, or application with page scope being the default. You can then access it as a page scoped attribute. So this should do:
    <dsp:importbean var="profileFormHandler" bean="/atg/userprofiling/ProfileFormHandler" />
    <c:out value="${pageScope.profileFormHandler.ProfileJSON}" />In case you change the scope in importbean you can accordingly use pageScope, requestScope, sessionScope or applicationScope.
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>Any ATG droplet is nothing but a servlet which is also a Nucleus component. So essentially you want to call a servlet from JSTL which as such shouldn't be done in a well written script-less JSP. You can probably try to use the droplet as a bean and use JSTL on top of it but since ATG droplets also have different types of parameters like input, output and open so you will have to specially handle those.

  • Use jstl tags in jsf page

    I have h:dataTable in each row of which i'd like to output row data as text, inputfield or link depending on row data type
                        <h:dataTable id="pnlHistory" value="#{UserOrdersBean.orderLineWrappers}" var="wrapper" rendered="#{UserOrdersBean.isBasicUser}"
                                     columnClasses="history_col1, history_col2, history_col3, history_col4, history_col5" width="100%" cellpadding="5" >
                            <h:column>
                                <f:facet name="header">
                                    <h:commandLink action="doRefresh" actionListener="#{UserOrdersBean.doSort}">
                                        <h:outputText value="#{msg.userorders_itemName}">
                                            <f:param value="orderLineWrappers"/>
                                            <f:param value="itemName"/>
                                        </h:outputText>
                                    </h:commandLink>
                                </f:facet>
                                <h:outputText value="#{wrapper.itemName}" styleClass="itemdescription"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:commandLink action="doRefresh" actionListener="#{UserOrdersBean.doSort}">
                                        <h:outputText value="#{msg.userorders_data}">
                                            <f:param value="orderLineWrappers"/>
                                            <f:param value="data"/>
                                        </h:outputText>
                                    </h:commandLink>
                                </f:facet>
                                <c_rt:choose>
                                    <c_rt:when test="#{wrapper.type==0}">
                                        <h:outputText value="#{wrapper.data}" styleClass="basic_thin"/>
                                    </c_rt:when>
                                    <c_rt:when test="#{wrapper.type==1}">
                                        <h:inputText value="#{wrapper.data}" styleClass="basic_thin" style="width:160px"/>
                                    </c_rt:when>
                                    <c_rt:when test="#{wrapper.type==2}">
                                        <h:outputLink value="#{wrapper.data}">
                                            <h:outputText value="#{msg.userorders_link}" styleClass="basic_thin"/>
                                        </h:outputLink>
                                    </c_rt:when>
                                </c_rt:choose>
                            </h:column>
                         </h:dataTable>trying to use jstl tags but unsuccessfull. Is it ever possible user jstl tags in jsf tags like listed above

    Replace the c:choose block by<h:outputText value="#{wrapper.data}" styleClass="basic_thin" rendered="#{wrapper.type == 0}" />
    <h:inputText value="#{wrapper.data}" styleClass="basic_thin" style="width:160px" rendered="#{wrapper.type == 1}" />
    <h:outputLink value="#{wrapper.data}" rendered="#{wrapper.type == 2}">
        <h:outputText value="#{msg.userorders_link}" styleClass="basic_thin"/>
    </h:outputLink>

  • I can't use JSTL tag for read rss.

    I want to read rss from another web. but I can't read rss . I use Netbeans and I add JSTL Library already. I can use forEach tag but every time when I use xml tag it show error. This is my code for read rss. I don't know how to read rss with JSTL tag please help me.
    <h6><!-- Filename: ShowStudents.jsp -->
    <%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <HTML>
    <BODY>
    <c:import var="xmlDoc" url="http://www.manager.co.th/RSS/Home/Breakingnews.xml"/>
    <x:parse var="parsedDocument" xml="${xmlDoc}"/>
    <table>
    <tr>
    <th>Title : </th>
    <th>Link : </th>
    </tr>
    <x:forEach select="$parsedDocument/channel/item"> // This code I ever been change to $parsedDocument/rss/channel/ and $parsedDocument/rss/channel/title ,but it show same error.
    <tr>
    <td> <x:out select="title" /> </td>
    <td> <x:out select="link" /> </td>
    </tr>
    </x:forEach>
    </table>
    </BODY>
    </HTML></h6>
    when I run this code it show error like this. how to read rss with JSTL tag please help me.
    <h6>
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:527)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Filter.ThaiRequest.doFilter(ThaiRequest.java:38)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
    org.apache.jsp.test_jsp._jspService(test_jsp.java:101)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Filter.ThaiRequest.doFilter(ThaiRequest.java:38)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    root cause
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
    com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSource(ParseSupport.java:227)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSourceWithFilter(ParseSupport.java:193)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseReaderWithFilter(ParseSupport.java:199)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseStringWithFilter(ParseSupport.java:206)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.doEndTag(ParseSupport.java:138)
    org.apache.jsp.test_jsp._jspx_meth_x_005fparse_005f0(test_jsp.java:150)
    org.apache.jsp.test_jsp._jspService(test_jsp.java:80)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Filter.ThaiRequest.doFilter(ThaiRequest.java:38)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    </h6>
    Edited by: user12864851 on 15 ม.ค. 2554, 22:59 น.

    Ok, I did a bit more experimenting, and web searching, and found you are the victim of the UTF-8 BOM bug.
    Basically the java UTF-8 reader does not recognise a BOM at the start of a UTF-8 stream, and it has to be discarded manually.
    For details: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
    Here is a 'fixed' JSP for you.
    <%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <%@ page contentType="text/html; charset=UTF-8"%>
    <HTML>
    <BODY>
         <c:import var="xmlDoc"
              url="http://www.manager.co.th/RSS/Home/Breakingnews.xml"
              charEncoding="UTF8" />
         <%--
            JSTL hack to work around the UTF-8 BOM bug in JDK.
            http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
         --%>
         <c:set var="testChar" value="fn:substring(xmlDoc, 0, 1)}"/>
         <c:if test="${testChar != '<'}">
           <c:set var="xmlDoc" value="${fn:substring(xmlDoc, 1, fn:length(xmlDoc))}" />
         </c:if>
         <table>
              <tr>
                   <th>Title :</th>
                   <th>Link :</th>
              </tr>
              <x:parse var="parsedDocument" doc="${xmlDoc}" />
              <x:forEach select="$parsedDocument/rss/channel/item">
                   <tr>
                        <td><x:out select="title" /></td>
                        <td><x:out select="link" /></td>
                   </tr>
              </x:forEach>
         </table>
    </BODY>
    </HTML>cheers,
    evnafets

  • How to use messagebar tag in jsp page

    i am working with "messagebar" control presents in the htmlb controls.
    my aim is to display the message after pressing some button. how to give link for that.
    if anybody have smple code for it please send me with component,jsp page and bean(if used)......
    ragards,
    ajoy

    Hi,
    If I understood you right, then you want to update the message shown in your messgebar, when user clicks on button.
    To achieve this, have a MessageBar with no message text. And when ever a button is clicked in the event handling method of your button set message text to your messagebar.
    public void showMessage(String message, MessageType type) {
            messageBar.setMessage(type, message);
    public void onClick(Event event) throws PageException {
          showMessage("Clicked Button", MessageType.INFO);
    Greetings,
    Praveen Gudapati
    [Points are always welcome for helpful answers]

  • Posting huge data on to JSP page using JSTL tags

    Hi,
    I have one application where I have to post huge data (approximately 2000 rows of data) into JSP page. I am using JSTL tags and running on Tomcat 5.
    It is taking almost 20 to 25 seconds to load the entire page.
    Is it the optimal time to load or it could be improved?
    Please let me know.
    Thanks,
    --Subbu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Evnafets,
    Thank you for the response.
    Here are the tasks I am doing to display the data on JSP.
    0. We are running on Tomcat 5 and the memory size is 1024MB (1GB).
    1. Getting the data - I am not performing any database queries. The data is stored in the static cache memory. So the server side response is so quick - less than a milli second.
    2. Using Java beans to pass data to the presentation layer (JSP).
    3. 10 'if' conditions and 2 'for' loops and 2 'choose' statements are being used in the JSP page while displaying the data.
    4. Along with the above, there are 4 javascript files are being used.
    5. The jsp file size after rendering the data, is aprox. 160 kb
    Hope this information helps you to understand the problem.
    Thanks,
    --Subbu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to write this java code in jsp using jstl  tags?

    Can anybody help me on this?
    I dont know how to check the containsKey using jstl tags?
    <%
         LinkedHashMap yearMap     =     (LinkedHashMap)request.getAttribute("yearMap");
         TreeSet nocSet               =     (TreeSet)request.getAttribute("nocSet");
         Iterator     yearMapIt     =     yearMap.keySet().iterator();
         while(yearMapIt.hasNext())
              int yearValue               =     (Integer)yearMapIt.next();
    %>
    <tr>
              <td><%=yearValue%></td>
    <%
              LinkedHashMap monthMap     =     (LinkedHashMap)yearMap.get(yearValue);
              Iterator     nocSetIt     =     nocSet.iterator();
              while(nocSetIt.hasNext())
                   String nCase=(String)nocSetIt.next();
                   if(monthMap.containsKey(nCase))
                        String count     =     (String)monthMap.get(nCase);
    %>
                        <td> <%= count %> </td>
    <%            }
                   else
    %>          
                        <td> 0 </td>     
    <%          
    %>
    </tr>
    <% } %>Edited by: avn_venki on Feb 18, 2008 11:54 PM

    <c:forEach var="yearMap" items="${requestScope.yearMap}">
         <th> <c:out value="${yearMap.key}"/> </th>
    <bean:define id="monthMap" value="${yearMap.value}"/>
    <c:forEach var="nocSet" items="${nocSet}">
    then how to write containsKey using tags??

  • 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

  • Object tag for JSP

    Hi all,
    I have a JSF code which is using <af:objectMedia> tag(supplied by Oracle ADF faces) for emdeding windows media player. But now i have to implement the same in JSP.
    So, is there any JSTL tag in JSP that embed any media player?? I don't want to use html object or embed tags.
    Please help me out in this.

    Hi Galileo,
    In place of XXXX could you pls try using the following and see if it works.
    #{SessionBean1.<Session Property>} or
    #{SessionBean1.<Session Property>.value}
    I hope this helps.
    Cheers :-)

  • Using JSTL variables in JSP or Javascript. Possible ?

    Hi All,
    Is it possible to share or use the variables which are declared are used by JSTL in JSP expression or scriplet code and in Java Script.
    Example:
    This Works:
    <fmt:set var="test" value="JSTL" />
    <fmt:out value="${test}" />
    But, this gives error:
    <% out.println(test) %>
    And passing the value of variable 'test' to Java Script code also gives error.
    How to use JSTL variables in JSP and in Javascript ?
    Yours,
    Sankar.B

    By default, JSTL variables are kept in servlet
    attributes. Default is to store it in the page
    context. You can make it request/session/application
    scope as required by an attribute of the set tag.Hi there,
    Can anyone advise how to access JSP variables in JSTL?
    Can it be done as the same method through request/session/application scope?
    Thnks...

  • Using JavaBeans in a JSP Page

    I wan't to know the advantages and disadvantages of using JavaBeans in a JSP page.
    Like for example general traditional approach for a database connection
    is to create a connection and access the database from that and close the connection
    at the end of the page, instead of the If I use a common connection bean for making connections,
    is that suggestable and then when should i close the connection then.
    One good application of JavaBeans is using a Set and Get methods for form fields in
    a registration form to get back the values.
    So may i know how best can we use the JavaBeans other than this application.
    ThanX in advance,
    kiran
    [email protected]

    I believe putting processing and query code in the JavaBean was one of the reasons for putting JavaBeans support in JSP in the first place. The original idea was to use the setXXX methods to populate the bean's data from the posted form, then do the processing (or database query), then use the getXXX methods to display the bean's data.
    Efficiency-wise, it's exactly the same as putting all the code in-line in the JSP page (actually, it might be a bit slower, because of the reflection required to do it.) Code-wise though, it makes the JSP easier to read.
    Of course, we have EJBs now too, which tie very closely and can match database queries almost one-to-one, one way to incorporate these is inside the JavaBean you reference from the JSP, another way from a servlet you redirect the JSP to, etc...

  • 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");

  • Can i use Custom Tags for Database retrieval (as per MVC pattern)?

    In our project we are dealing with database, and i've used the Cutom Tags for database retrieval (as per the Article from Mr Faisal Khan) and it is working fine. But i have a doubt if it affects the performance in any way . I wanted to know if its recommendable to use Custom Tags for the DB retrieval as per MVC Pattern or shall i create a intermediate bean and then call the bean in custom tag.
    Thanks
    Prakash

    Putting database code in your JSPs certainly couples your view to the database. That's usually not good.
    If it's a simple app, it might be justified.
    When you start having lots of pages and complex business logic it becomes less attractive. - MOD

  • Problem in using JSTL tag libs

    Hi there,
    I am trying to use JSTL tag libs in my web app, but i get the following error message:
    org.apache.jasper.JasperException: /index.jsp(22,0) According to TLD or attribute directive in tag file, attribute test does not accept any expressions
    as it might be clear i am using Tomcat and line 22 of the code for index.jsp is:
    <c:if test="${user.role > 0 }">
    Please help my identify whats wrong in there. I suspect that it is because of my web.xml file, but i am not sure.
    thanx in advance,
    Capitan Haddock

    try to use gt instead of >

  • Is it possible todeclare primitive variable by using JSTL tag

    Hi friends..........
    I have to use jstl tags in my project , so i have to know how to declare primitive variables with jstl tag. Is it possible with <c:set > jstl tag........
    Hope i get the answer...........
    Thanks in advance...............

    JSTL variables are attributes in the page, request, session and application scopes.
    As such, they can only be objects, because you can't store a primitive value as an attribute.
    However you shouldn't need to declare primitive variables. You should hardly need to declare any variables.
    JSTL is not a programming language. It is a language to aid the display of a JSP. Therefore most of its attention is geared towards outputting things, with a much lesser concern on setting them.
    Cheers,
    evnafets

Maybe you are looking for

  • Unable to create web app with PowerShell - An update conflict has occurred

    I am trying to create a new Web Application using PowerShell. I need to use PowerShell because I need to create the Web App using classic authentication and not Claims authentication. the first time I created the Web App, everything went great. Ever

  • To prepare daily production report in grade wise

    Hi, Need your help regarding grade wise Finish Goods. My finish goods product code is in database 1601001. When bulk receipt from production how to separate grade wise quantity. Example: My production order quantity is 100000 pcs and receipt from pro

  • Error 7 occurred at Open/Creat​e/Replace File in Open Config Data.vi

    I have a .vi that was working fine with Labview 7.0.  I now have upgraded to Labview Professional 8.0, and I am trying to build a stand alone  executable.  When I build the executable, build an installer, and then try to install it on another compute

  • Adobe Bridge CS5 Thumbnail

    We are using Adobe Bridge CS5. How do you display the lens used to take the photo (70-200mm, 17-40mm, 400mm, 24-120mm, etc.) on thumbnail before editing? 

  • Apache FOP configuration with Oracle XE

    Hi, I have installed Oracle XE on my laptop and upgraded Apex to 3.2. I am now trying to install Apache FOP for PDF printing. I am following Section 5 of the following document: http://www.oracle.com/technology/products/database/application_express/h