JSTL Not interpreting Tags

Using Windows XP, Tomcat 5.5, jre6. I placed standard.jar and jstl.jar in WEB-INF/lib, but the jstl tags on my webpage don't get interpreted. This page worked before on my old server, which also ran tomcat 5.5, so I think it is something with my new server's configuration. Does anyone have some ideas?

Is it just the JSTL tags that don't work, or is it that its not actually being evaluated as a JSP?
How about:
- Standard jsp tags like <jsp:useBean id="testList" class="java.util.ArrayList"/>?
- Runtime expressions like <%= 1 + 1 %>?
- EL expressions such as ${2 + 2}?
If you put those examples on your page do they get evaluated or echoed straight back out?
Is this an actual jsp page? Does it have the .jsp extension?
Where have you deployed the jsp page to?
How are you accessing it? Via your web browser with url http:localhost:8080/mywebapp/mypage.jsp or similar?

Similar Messages

  • Are not interpreted JSTL tags in a JSP page including in a servlet.

    Hi people,
    I have a project where una page (index.jsp) includes a servlet (MyServlet), that consult a persistence class and get a List of objects (Users),      
    then the servlet passes the List to a Request object and includes another JSP page (showUsers.jsp). And this is conceptually correct, but don´t works, the JSTL tags are not interpreted in showUsers.jsp.
    This is my code...
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <c:out value="Show me some things index.jsp"/>
    <div style="border-color:red; border:solid; padding-left:60px">
          <jsp:include flush="true" page="pepe/MyServlet"/>
    </div>
    </body>
    </html>...and the Servlet...
    public class MyServlet extends HttpServlet
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
              UserManager um = new UserManager();
              List users = um.getUsers(); //This use Hibernate to return a Users List
              request.setAttribute("users", (ArrayList) um.getUsers());
              request.getRequestDispatcher("/showUsers.jsp").forward(request, response);
    }...Finally, we have the showUsers.jsp file....
    <c:out value="Show me some thing showUsers.jsp"/>
    <table>
         <tr>
              <th>ID</th>
              <th>Name</th>
              <th>e-Mail</th>
              <th>Type</th>
         </tr>
         <tr>
              <c:foreach items="${requestScope.users}" var="user">
                   <td><c:out value="${user.id}" /></td>
                   <td><c:out value="${user.name}" /></td>
                   <td><c:out value="${user.email}" /></td>
                   <td><c:out value="${user.type}" /></td>
              </c:foreach>
         </tr>
    </table>This i get as result page...
    ID       Name       e-Mail       TypeFinally, this is the code of showUsers.jsp...
    <c:out value="Show me some thing showUsers.jsp"/>
    <table>
         <tr>
              <th>ID</th>
              <th>Name</th>
              <th>e-Mail</th>
              <th>Type</th>
         </tr>
         <tr>
              <c:foreach items="[src.User@18f729c, src.User@ad97f5, src.User@d38976, src.User@1e5c339, src.User@17414c8, src.User@7a17]" var="user">
                   <td><c:out value="" /></td>
                   <td><c:out value="" /></td>
                   <td><c:out value="" /></td>
                   <td><c:out value="" /></td>
              </c:foreach>
         </tr>
    </table>Somebody can help me?
    Many thanks,
    Gonzalo

    Thanks you all guys,
    I appreciate very much your help. In response to everyone ...
    BalusC wrote:
    Is JSTL taglib declared in top of that JSP page? I don't see it back in the posted code snippet. In this example I stuck...
    request.getRequestDispatcher("/showUsers.jsp").forward(request, response);By mistake, but this is just a test, the original line of my servlet is...
    request.getRequestDispatcher("/showUsers.jsp").include(request, response);As you can see, both (the servlet and the showUser.jsp file) are included in the index.jsp file. So the header...
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>...in the index.jsp file should works (I hope so).
    njb7ty wrote:
    I assume in your web.xml, you have ''pepe/MyServlet' defined as a servlet tag and servlet map tag? Without that, I don't think your JSP will find the servlet. I'm >not sure you need it in web.xml since I never call a servlet from a JSP page.
    I suggest putting System.out.println() throughout your servlet code and out.println() in your JSP pages to see exactly what is called and when.
    As a general rule, JSP files are to display data only, and submit back to a servlet. The servlet does all the business logic and dispatches to the appropriate >JSP page. The JSP shouldn't have any business logic. Including the servlet looks kinda like including business logic. Actually, in a MVC design, your >presentation, control, busines, and database layers have their own isolated responsibilities.
    I suggest the servlet put data as one java bean in request scope via request.setAttribute() and dispatch to the JSP page. The JSP page gets the data via ><useBean> tag. The JSTL gets the variables from the useBean tag and uses the data from there to display it. Really, this is my web.xml file...
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
         <servlet>
              <servlet-name>MyServlet</servlet-name>
              <servlet-class>src.MyServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>MyServlet</servlet-name>
              <url-pattern>/pepe/MyServlet/*</url-pattern>
         </servlet-mapping>
    </web-app>Regarding putting System.out.println() and out.println(), i did it and thats works.
    Respect of your last comment, I am not a expert in MVC, but I understand that the view layer can make calls to the Controller layer, I am wrong?
    evnafets wrote:
    It's not. However thats not code, but the generated HTML.
    As Balusc pointed out it's the result of running this JSP page without importing the tag library at the top.
    Because the tag library is not declared, it treats the <c:forEach> and other tags as template text, and basically ignores them.
    It then evaluates the ${items} attribute as an expression in template text, calling toString() on it.
    Cheers,
    evnafets      The file showUsers.jsp are included into the index.jsp page, that's have the header taglib. Could this works?
    BalusC wrote:
    njb7ty wrote:
    By the way, I dont think this is the correct format for the foreach tag:
    <c:foreach items="[src.User@18f729c, src.User@ad97f5, src.User@d38976, src.User@1e5c339, src.User@17414c8, src.User@7a17]" var="user">You're right friend.
    And that's my problem. Any ideas?
    Thanks everyone,
    Gonzalo

  • Issue with JSTL ( c:import ) tags in Weblogic 9.2

    Hi,
    I'm trying to migrate a struts (1.2.9) application from Weblogic 8.1 to Weblogic 9.2. This application has JSPs with JSTL (1.0) tags.
    I have a JSP page that has multiple (around 7) c:import statements. When I launch my application, only the content from the last c:import statement is being displayed and rest of the c:import tags statements is simply ignored by Weblogic.
    I don't find any errors in the logs. When I comment out last c:import statement in this JSP then the content from the above c:import statement is being displayed. Only one (last one) c:import statement's content is being displayed in that whole page.
    This app worked just fine Weblogic 8.1.
    Any resolutions, hints, insights or workarounds on this issue is appreciated.
    Thanks in advance,
    Mani
    Edited by: mayyalas on Aug 10, 2009 6:13 PM

    Hello,
    You should not need to edit the wlp-light-web-lib.war weblogic.xml file. There are many places where other classes in wlp-light-web-lib are dynamically loading classes (using Class.forName()) from "higher-level" shared library modules (such as wlp-framework-full-web-lib), so I am certain that it works in general. There may just be an issue with how your shared library is set up, or how your webapp deployment descriptors are set up.
    So you mention that you have a shared library module containing your implementation of the AnalyticEventHandler; is this a .war file? And in the webapp you are trying to deploy this in, does your weblogic.xml explicitly include your shared library? If so, is your shared library being included before or after the standard WLP shared libraries?
    If you would like, posting your webapp's weblogic.xml may help to find the problem.
    Kevin

  • Getting img tags to work in sub page using jstl core import tag

    Am trying to bring disparate system page reports together under one web app. This means using the jstl core import tag (I dont want to redirect as I want to hide the urls, this web app provides better security than those it calls).
    Use of the import tag works to a degree but any resources (ie. img tags) don't load.
    Have created a much simplified example that demonstrates..
    So heres the jsp...
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <h3>Delivery Performance Report</h3>
    <c:url value="http://localhost/mycontext/subpage.html" var="myUrl"/>
    <c:import url="${myUrl}" />and a simple sub page (note plain html, no jsp, this mimics my project as the other systems are hidden source, non jsp)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
    <HEAD>
    <TITLE>sub page</TITLE>
    </HEAD>
    <BODY>
         This is the sub page<br>
         <img src="images/banner_image.jpg" />
    </BODY>
    </HTML>While I dont get any errors what I do get is ..
    Delivery Performance Report
    This is the sub page
    ...but image fails to load.
    If I redirect instead of import it works, but as I said I need to hide the url from the user as security is an issue.
    Any help appreciated, really pulling my hair out with this final stage of something that will make a real difference to us!
    regards,
    G.

    Thanks for the answer but Im afraid thicko here doesnt get it.
    The img src is relative to the sub page, and I have tried it with an absolute address (ie. http://localhost/.....) with the same result.
    If I call the sub page direct (get with browser) the image tag works. Its just if the sub page is imported with the jstl core import tag.
    I've not tried a base tag. The real project always returns pages containing absolute urls... http://ourReportServer/reports?....plenty of params so dont belive relevant, please correct me if Im wrong here though.
    thanks, G.

  • CSS not interpreted correctly

    Safari does not interpret standard CSS correctly, but Firefox 1.5, Netscape 7.2 and Opera 9.01 do. Safari does not understand the CSS width and height declarations.
    Is there a workaround?
    How does my page look on a Windows computer with a popular browser?
    Is there any hope that a later version of Safari will understand CSS?
    See the
    tag in <http://homepage.sunrise.ch/homepage/nicoletf/index.html> and the correcsponding CSS declaration in <http://homepage.sunrise.ch/homepage/nicoletf/Muotathal/stylesheets/index2.css>.
    iMac G3, iBook G4, PowerBook G4   Mac OS X (10.4.7)  

    A little correction to your post:
    The width and height properties only fail on images, to all other attributes the CSS values for width and height will just work.
    This bug or "missing feature" has been added in the latest open-source version of the rendering engine. (For download available via: http://nightly.webkit.org/ ). Also OmniWeb 5.5b will support this feature and it will most likely be standard supported in Leopard.

  • Jspf files are not interpretated when included? weblogic 8.1

    Well My problem is that jspf files are not interpretated when included
              into jsp files. stuff such as netui tags are included as text and
              printed as such?
              Does this mean that jspf files are only for pure HTML?

    Hey David
              I discovered the error its the special danish letters (which I cant even
              write here due to the charset). ae,oe,aa (???)
              When used as variable names in a jspf file and included they are
              misinterpreted. This is not the case in a jsp file.
              Its clearly a bug in BEA, but I replaced all occurrences and worked
              myself around it.
              David Karr skrev:
              > It's important to understand that JSP pages are compiled into servlet classes, and then loaded into the JVM. The servlet class is executed when the JSP page is loaded by the application.
              >
              > It's also important to understand the difference between an "include directive", and an "include action". The "directive" includes the text into the JSP page before it is compiled, so any JSP tags in the included text will be compiled as if they were part of the original page. The "action" includes the text at run-time, after the JSP is converted to a servlet and loaded into the JVM. If the result of your "include action" is a string of text with JSP tags, that string will be included in the result as-
              > is, without being compiled.
              >
              > From what you describe, I'm guessing you're using an include action, not an include directive. Reorganize your application to use include directives for your ".jspf" files, and you should be on the right track.

  • Will not read tags

    how do I import a comma delimited file that will read my paragraph styles?

    Does your CSV file have some sort of tags in the text? By definition the CSV file itself has no style that ID would read. Nor will it interpret tags inside the file as anything other than plain text.
    You could import the text, tags and all, and then run a series of find/change operations to find tags and associated text and then apply the approriate style and remove the tags (best done using GREP). This may or may not be a viable solution depending on the tagging and file structure.
    Another possibility would be to try to structure the text file in a way that ID recognizes the tags as tags. ID uses a Tagged Text format for this, and the file includes a lot more information than just the tags, like what they mean, in a header section. You could Google InDesign Tagged Text and see if you can find more information on the structure and how to build one without exporting the text from inside ID (whcih is the only way I've ever worked with the format).
    Perhaps if you explain what you are doing we can give more advice.

  • JSTL c:import tag exception on WAS 6.20

    Hi all,
    has anyone been able to use the c:import jstl 1.0 tag on WAS 6.20?
    Everytime we access it it throws the following error:
    Exception occurs while processing a request to the servlet: jsp.
    javax.servlet.jsp.JspTagException: Since tag handler class org.apache.taglibs.standard.tag.el.core.ImportTag implements BodyTag, it can't return Tag.EVAL_BODY_INCLUDE
    Most, if not all, other tags seem to work fine, just this one doesn't. The same testpage and jstl version works fine on other non-SAP J2EE engines we have tested it on.
    Best Regards,
    Kalle Pokkinen

    Hi,
    This answer is mostly for reference - see OSS 0371142 2004 "JSP Standard 1.2 versus 1.1" for details.
    Best regards,
    Todor

  • Confused - I include library jstl 1.1 Tags but only jstl1.0 tags displayed

    I include library jstl 1.1 Tags in my project.
    Under project properties and jsp tag libraries there are no jstl1.1 tag libraries for me to include but only 1.0 versions?
    Am I misunderstanding something?

    Jdeveloper version 10.1.3.0.4
    For my project I have included libraries JSTL 1.1. and JSTL 1.1 Tags
    If I go to manage libraries under the JSP Tag libraries tab and deselect all JSTL 1.0 versions (checkbox "Show Tag Library in Palette") then these tag libraries disapear from the component pallete as expected.
    However if I select all the JSTL 1.1 versions they do not appear in the componette palette.
    Anyone have any ideas why this is so?

  • " Can not interpret the data in file " error while uploading the data in DB

    Dear All ,
    After running the below report I am getting the " Can not interpret the data in file " error.
    Need to upload the data in DB through excel or .txt file.
    Kindly advise to resolve the issue.
    REPORT  ZTEST_4.
    data : it like ZPRINT_LOC occurs 0 with header line,
    FILETABLE type table of FILE_TABLE,
    wa_filetable like line of filetable,
    wa_filename type string,
    rc type i.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    CHANGING
    FILE_TABLE = filetable
    RC = rc.
    IF SY-SUBRC = 0.
    read table filetable into wa_filetable index 1.
    move wa_filetable-FILENAME to wa_filename.
    Else.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = wa_filename
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = it.
    IF SY-SUBRC = 0.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    insert ZPRINT_LOC from table it.
    if sy-subrc = 0.
    commit work.
    else.
    rollback work.
    endif.
    Regards
    Machindra Patade
    Edited by: Machindra Patade on Apr 9, 2010 1:34 PM

    Dear dedeepya reddy,
    Not able to upload the excel but have sucess to upload the .csv file to db through the below code. Thanks for your advise.
    REPORT  ZTEST_3.
             internal table declaration
    DATA: itab TYPE STANDARD TABLE OF ZPRINT_LOC,
          wa LIKE LINE OF itab,
          wa1 like line of itab.
                       variable  declaration
    DATA: v_excel_string(2000) TYPE c,
           v_file LIKE v_excel_string VALUE    'C:\Documents and Settings\devadm\Desktop\test.csv',  " name of the file
            delimiter TYPE c VALUE ' '.         " delimiter with default value space
         read the file from the application server
      OPEN DATASET v_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    write:/ 'error opening file'.
      ELSE.
        WHILE ( sy-subrc EQ 0 ).
          READ DATASET v_file INTO wa.
          IF NOT wa IS INITIAL.
            append wa TO itab.
          ENDIF.
          CLEAR wa.
        ENDWHILE.
      ENDIF.
    CLOSE DATASET v_file.
    EXEC SQL.
         TRUNCATE TABLE "ZPRINT_LOC"
    ENDEXEC.
    *------display the data from the internal table
    LOOP AT itab into wa1.
    WRITE:/ wa1-mandt,wa1-zloc_code,wa1-zloc_desc,wa1-zloc,wa1-zstate.
    ENDLOOP.
    insert ZPRINT_LOC from table itab.

  • Two columns with footnotes page and paragraph that continues is not correctly tag (for accessibility

    When I have a document with two columns in indesign CS5.5 and footnotes page. If there's a note in the first column, the paragraph that begins in the second column is not correctly tag. This is shown with an automatic tag <P>, and with this symbol "¶"
    Why?
    How I can I solve it?
    thanks

    Hi John,
    My page is not a part of a task flow. The whole app is an Admin app comprising of multiple individual pages navigated using Menu.
    I have tried to run this page individually on my local machine as well as when deployed on the WLS server. The behavior is the same.
    Kindly advice,
    Thanks,
    Ram

  • Html code i have saved in TextEdit as .html is not interpreted by Safari

    I have entered simple html code in a new TextEdit.app document,
    saved it as web page (.html),
    opened as a file from Safari and the
    exact contents of the file are shown in my browser window
    ... it is not interpreted.
    (I was following a "create your first html..." tutorial)

    use textedit-format-Make Plain Text or set the preferences for New Document accordingly
    then save-as html will be unavailable, but you can name the file something.html & Safari should display as expected.

  • Sapscript: Do not interpret two commas in text as tab

    Since Sapscript interprets two commas in a row as a tab, this causes a problem for any form which prints out any text containing two commas. Does anyone know a way to get Sapscript to ignore these commas?

    Hello friend,
    Welcome to SDN.
    The interpretation is different.
    Situation 1
    /: Do,,not,,interpret,,two,,commas,,in,,text,,as,,tab
    "the output will look like below text with tabs in between each word.
    Do  not interpret two commas  in  text  as  tab
    Situation 2.
    "Define two variables in script editor like below and display.
    /: DEFINE text1 = 'Do not interpret two,,commas in text as tab'
    /: DEFINE text2 = ',,Text will be displayed like this'
    /: &text1&,,&text2&
    "The output will be like below
    Do not interpret two,,commas in text as tab ,,Text will be displayed like this
    "It does not care what is there inside program symbols &text1& and &text2&
    I think that you will understand.
    Thanks
    Venkat.O

  • How to remove tags (not color tags)

    How to remove tags (not color tags)
    I love the idea of the tags, however there comes a point when some become irrelevant.  How can I remove them.  I highlighting them in the dialogue box and hitting the delete key, that does not work.  ?

    I accidentally found that you can remove some tags while in the Sidebar view by just draggng them to the trash.
    But after a certain point when you have drug all of tags in the list, you are then left with the "All Tags" button. When you click on that final button, you find that all of the tags you have ever created are still there in the All Tags category. So I guess what I do is just not create any new tags because the list just becomes too long to be useable. I liked the idea of Tags as a management tool, but like so many times before I will just go back to the file name workarounds that I have been using since 1988.  They work because they were developed and tested by an actual user, me.  Just toss a project number into the file name.  Works every time, unlike the undocumented "features" that are apparently not tested.
    But, if what I hear is true that Apple does not monitor these discussions, what was the point of writing this.
    Would like to think they would look at these "discussions" as a resource, but.......

  • In iPhoto 09 Info does not show tags on aperture, time, iso etc. Other tags like place, pixels are shown. There is no little arrow on this info menu to go to full info box. How come ?

    in iPhoto 09 Info does not show tags on aperture, time, iso etc. Other tags like place, pixels are shown. There is no little arrow on this info menu to go to full info box. How come ?

    It does. Photos Menu -> Show Extended Photo Information.
    Then note the disclosure arrows as indictaed in this thread:
    https://discussions.apple.com/message/16512794#16512794
    Regards
    TD

Maybe you are looking for

  • Home Directory and different volume failed generates log in failure

    I'm running OS X server 10.5.2. The set up is still used for test and learning purposes but I'm nearly finishing and knowing what I can and want to do. However, there remains a large issue unresolved. I have several volumes available on me server 1.

  • HT1296 How to transfer an itune license from a computer that is dead?

    My computer (windows) crashed and cannot be salvaged so I purchased a new one. When I went to sync my ipad after installing itunes it wanted to wipe the ipad clean of any music that was not purchased through itunes. It said I didn't have a license on

  • Actionscript for mobile

    Does any one have any good links they can spare with good (pererably video) tuts ect on starting with AS fro mobile within FB rather than flex, I can make a start but it woudl be nice to find out the stuff regarding mobile specific items such as touc

  • Can i make a second window??

    Can i make a second windows, taht appear when i click on a button in my JApplet??? lsomething like a JFrame or ??? sorry for my englsih thx

  • Error: Please install Excel as viewer

    Hello Friends, I am getting error when I try to open Business explorer analyzer. Error description: Please install Excel as viewer. Any help would be appreciated. Regards, Bhavin