9.0.3 ojspc and JSPs with JSTL

I tried using ojspc to pre-compile my jsps, as such: #ojspc myApp.war and got the following error:
Detected archive, now processing contents of myApp.war...
Setting up temp area...
Expanding archive in temp area...
Parse error in index.jsp:
oracle.jsp.parse.JspParseException: Line # 2, <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
Error: java.io.FileNotFoundException: /tmp/tmp10045/http:/java.sun.com/jstl/core (No such file or directory)
Removing temp area...
Are there any work-arounds to pre-compile jsps which utilize JSTL (almost all of ours do...)?
Thanks,
Voytek Jarnot

Hi,
Have you mentioned the tag lib mapping in ur web.xml? [Something like this]
<taglib>
<taglib-uri>http://.....</taglib-uri>
<taglib-location>/WEB-INF/jstl-core.tld</taglib-location>
</taglib>
rgds,
Neelesh
OTN Team @IDC

Similar Messages

  • Proxying servlets and JSPs with apache

    We have a couple of servlets within our application, the rest of it
    being JSPs.
    We are having a problems maintaining the session state across links from
    the JSPs to the servlets. It works fine with WL as the web server when
    the servlet picks up the same session as the JSPs, but when we are using
    the apache bridge, the servlet seems to have a new session.
    We are using WL5.1.0 SP6 on solaris.
    The JSPs are proxied by extension, and the servlets by location -
    everything under the servlet directory being directed to a servlet.
    Is there anything we need to do in the configuration to allow this to
    work?
    Thanks,
    Steve

    Core Servlets is pretty good. I have both parts.
    One day I'm actually going to read them.you mean these two right?
    Core Servlets and Javaserver Pages: Core Technologies, Vol. 2 (2nd Edition) (Core) by Marty Hall, Larry Brown, and Yaakov Chaikin
    Core Servlets and JavaServer Pages, Vol. 1: Core Technologies, Second Edition by Marty Hall and Larry Brown
    I should buy the Vol 1 first right?

  • Failed to load jsp with jstl 1.0 when deployed to Weblogic 11g

    The same war is successfully run on weblogic 10.X but failed to run on weblogic 11.x
    JSTL version is 1.0
    Compilation of JSP File failed:
    Exception occurred while processing '/u02/tech/product/otm620/otmapp/weblogic/domains/otm/servers/gc3-scdemo/tmp/_WL_user/ShipConsole/deg7z9/war/xxx.jsp'java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/ConditionalTagSupport
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
         at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:101)
         at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:37)
         at weblogic.servlet.jsp.TagFileClassLoader.findClass(TagFileClassLoader.java:32)
         at weblogic.servlet.jsp.TagFileClassLoader.loadClass(TagFileClassLoader.java:24)
         at weblogic.jsp.internal.jsp.JspScriptTransform.getHandlerInfo(JspScriptTransform.java:1595)
         at weblogic.jsp.internal.jsp.JspScriptTransform.signActionAll(JspScriptTransform.java:619)
         at weblogic.jsp.internal.jsp.JspScriptTransform.addJspService(JspScriptTransform.java:218)
         at weblogic.jsp.internal.jsp.JspScriptTransform.transformPage(JspScriptTransform.java:177)
         at weblogic.jsp.internal.jsp.JspScriptTransform.<init>(JspScriptTransform.java:152)
         at weblogic.jsp.internal.jsp.JspCheckContext.check(JspCheckContext.java:82)
         at weblogic.jsp.internal.jsp.JspAnalyzer.check(JspAnalyzer.java:57)
         at weblogic.jsp.internal.ProxySourceFile._check(ProxySourceFile.java:136)
         at weblogic.jsp.internal.SourceFile.masterCheck(SourceFile.java:762)
         at weblogic.jsp.internal.SourceFile.check(SourceFile.java:314)
         at weblogic.jsp.internal.SourceFile.check(SourceFile.java:335)
         at weblogic.jsp.internal.ProxySourceFile.codeGen(ProxySourceFile.java:224)
         at weblogic.jsp.internal.SourceFile.codeGen(SourceFile.java:327)
         at weblogic.jsp.internal.client.ClientUtilsImpl$CodeGenJob.run(ClientUtilsImpl.java:599)
         at weblogic.jsp.internal.client.Job.performJob(Job.java:83)
         at weblogic.jsp.internal.client.ThreadPool$WorkerThread.run(ThreadPool.java:217)

    I don't have any weblogic.xml its a plain web application.
    i tried in all scenarios like using import command of jstl in web.xml like taglib tag.
    Irrespective of imports always showing the same error like class not found javax/servlet/jsp/jstl/core/ConditionalTagSupport
    May be the search is by some other class loader.
    How to deploy the jstl & standard jar files as shared libraries in weblogic server

  • First Try and JSP with JavaBeans

    Hi:
    I've installed Tomcat 3.3.2, and have made no configuration changes.
    I'm trying to create a JSP that uses a JavaBean. This is my first attempt, and there's nothing exciting about my try.
    Below is the JavaBean, that compiles just fine:
    import java.io.Serializable;
    import java.util.*;
    import java.text.*;
    public class today implements Serializable {
    public String getToday() {
    Date df = new Date();
    String today = DateFormat.getDateInstance().format(df);
    return today;
    The class for this .java file is stored in webapps\exampiles\web-inf\classes
    Here is the JSP file:
    <%@ page language="java" import="today" %>
    <jsp:useBean id="jsp" class="today" scope="session" /></jsp:useBean>
    <html><body>
    Today is: //<%= getToday() %>
    </body></html>
    This is stored in webapps\examples\jsp.
    When I try to run the JSP, I receive the following:
    Method getToday() not found in class jsp.today_3.
    out.print( getToday() );
    I have tried many things, but have not succeeded.
    Any suggestions? Thanks.

    <%@ page language="java" import="today" %>
    <jsp:useBean id="jsp" class="today" scope="session"
    /></jsp:useBean>
    <html><body>
    Today is: //<%= getToday() %>
    </body></html>
    }You're not referencing your bean instance when you're trying to access the getToday() method in the code above. It should be jsp.getToday()

  • How to populate a form based on values in a database with JSTL?

    I know how to write Java code to connect to a database, but where exactly (and how) in my JSP page , using JSTL tags will I actually call the function that connects to the database?
    Should the code to connect and populate the Java Bean fields go into the JavaBean constructor or anther method ( but from what I understand I can't really call the Java Bean's methods through JSTL - unless I did it througha scriplet)

    I know how to write Java code to connect to a
    database, but where exactly (and how) in my JSP page
    , using JSTL tags will I actually call the function
    that connects to the database?You won't. The point of writing JSPs with JSTL is to realize that the purpose of JSP is to produce HTML, and not to do extraneous things like accessing databases. You would write a servlet that connects to the database, extracts the data, and puts it somewhere the JSTL can find it. (Most likely in a List object in request scope.)
    Then the servlet forwards to a JSP, where you use JSTL simply to scan through that List and convert the objects in it into HTML.

  • 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

  • Find out if an integer is a power of two - Servlet and JSP

    Hy all,
    I have to write the following programm using the servlet technology and jsp (with Bean).
    "Read a number from the keyboard (through a html file that send the value to the java.class through GET) and find out if this number is a power of two and if it is print on the screen which power it is".
    I know how to do the HTML part (the page where I input the value) and I also have an algorythm that checks if an integer is a number of two but I am not very sure how to implement this into a servlet or jsp (with Beans).
    Thank you for your help!
    Best regards,
    Raul
    public class PowerOfTwo {  
    public static void main(String args[]){  
    for(int n=0,limit=16; n<Math.pow(2, limit);n++)
    if(isPowerOfTwo(n))
    System.out.println(n);
    private static boolean isPowerOfTwo(int n) {  
    double logNbase2 = Math.log(n)/Math.log(2);
    int logNbase2Integer = (int) (Math.floor(logNbase2));
    if(logNbase2-logNbase2Integer==0)
    return true;
    else
    return false;
    }

    Yes, I know it's a messed up code down there. The value that I am trying to check if it is a power of two is sent via the variable "m" to the java class.
    Can anyone correct this piece of code please?
    Thank you in advance,
    Raul
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Putere2 extends HttpServlet{
         public long putere(long m)
         int other = 1;
         if(((~m) & 1) == 1)
         System.out.println("The number is a power of two");
         else
         System.out.println("The number is a NOT A power of two");
    public void doGet(HttpServletRequest req,HttpServletResponse res)
    throws ServletException,IOException{
    String sm=req.getParameter("m");
    String tip=req.getParameter("tip");
    long m=Long.parseLong(sm);
    long x=putere(m);
    PrintWriter out=res.getWriter();
    if(tip.equals("text/html")){
    String title="Putere";
    res.setContentType("text/html");
    out.println("<HTML><HEAD><TITLE>");
    out.println(title);
    out.println("</TITLE></HEAD><BODY>");
    out.println("<H1>"+title+"</H1>");
    out.println("<P>Puterea este: "+x);
    out.println("</BODY></HTML>");
    else{
    res.setContentType("text/plain");
    out.println(x);
    out.close();
    public void doPost(HttpServletRequest req,HttpServletResponse res)
    throws ServletException,IOException{
    doGet(req,res);
         }

  • How to access and display a Web Service from a WSDL in JSP or JSTL ?

    Dear All,
    We need to access a Web Service which is hosted as WSDL How to access a WSDL file from JSP or JSTL, parse and display the SOAP response in JSP page.
    Any simple example or URL as reference to an example will be useful for me.
    It seems io tags of jakarta is able to send soap message, but how to display it in JSP.
    Yours,
    Sankar.B

    Dear Sir,
    Yes. I would like to know more about the Forte and how to consume WSDL file from JSTL. The following are my querirs.
    1. How to connect the declared JNDI from a JSP page. i.e: the Datasource - ex: booksDS
    2. We connect the Tomcat server using JNDI as jdbc/scott. But, if I give jdbc/scott in JSTL as datasource={jdbc/scott}, we could not able to connect. We use the following code in a JSP page to connect the DB from a JSP page. (Its quite easy to modify, so we use the connection in a JSP page.)
    3. How to Consume a WSDL url from JSTL. Ex: If there is a URL : http://localhost/ws/MathService.asmx?wsdl OR http://www.xmethods.com/test/BabelFish
    4. How to display the result. We tried via SOAP from io taglib of Jakarta, but gives us an SOAP (it also looks like xml) response. But, how to use the value from that soap response in IE client thru JSTL/JSP.
    5. Whether this JSTL tool will be available with Forte Enterprise/Community Edition. If so EE, whats the price.
    Please Reply Immediatly. We tried, trying, going to try to display a wsdl response, but not able to display in IE thru JSP/JSTL. But, weve tested the www.gotdotnet.com examples of asp.net web services, we are thru. Its quite easy it seems in .NET. But, we feel whether even there is not even one example in JSTL/ Java Web Services Dev. Pack to utilise a web service in full cycle. The example which uve given is thru servlets. We dont use servlets. Cos, its very easy to edit JSP pages, instead of compiling the serv. and using it.
    I hope ull reply for all the above queries, since ur from SUN.
    Expecting your fav. reply.
    Yours,
    Sankar.B

  • How to send object arraylist from servlet to jsp and display using jstl

    Hi All....
    I have a simple application and problem with it.
    Once user logged in to system the user will redirect to LoginServlet.java controller.
    Then in LoginServlet I want to redirect user to another page called book_details.jsp.
    this is my login servlet.
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
              PrintWriter out = response.getWriter();
              ArrayList<BankAccountDTO> account_list = new ArrayList();
              ResultSet resultSet = null;
              LowFairAirDB airDB = null;
              try{
                   airDB = new LowFairAirDB();
                   String query = "SELECT account_id, type, description, balance, credit_line, begin_balance, begin_balance_time_stamp FROM bank_account";
                   airDB.sqlSelect(query);
                   resultSet = airDB.getResultSet();
                   while(resultSet.next()){
                        account_list.add(new BankAccountDTO(resultSet.getInt(1),
                                                                     resultSet.getInt(4),
                                                                     resultSet.getInt(5),
                                                                     resultSet.getInt(6),
                                                                     resultSet.getString(2),
                                                                     resultSet.getString(3),
                                                                     resultSet.getString(7)));
              }catch(Exception ex){
              }finally{
                   try{resultSet.close();}catch(Exception ex){}
                   airDB.sqlClose();
         }I set bank account values to BankAccountDTO.java objects and add them to the arrayList.
    Next I want to send this objects arrayList to books_details.jsp and wanna display each objects values using JSTL.
    I still finding a way to go through this.
    1. Can anyone say how can I do it?
    2. Is there any other method to do the same thing without using JSTL?
    thanks in advance,
    Dil.

    Naishe wrote:
    In your servlet,
    request.setAttribute("account_list", account_list);
    requestDispatcher.findForward("/your/display/jsp");
    Good. I would only follow the Java naming conventions. E.g. accountList or accounts instead of the ugly PHP/C conventions.
    In the JSP,
    lst = (List< BankAccountDTO >)request.setAttribute("account_list");
    for(BankAccountDTO b: lst){
    populate your HTML tags or whatever
    Wrong. 1) You need getAttribute() and 2) you should not use scriptlets. Use JSTL c:forEach, e.g.<table>
        <c:forEach items="${accounts}" var="account">
            <tr>
                <td>${account.id}</td>
                <td>${account.type}</td>
                <td>${account.description}</td>
            </tr>
        </c:forEach>
    </table>To the topicstarter: for future JSP/JSTL related questions please use JSP/JSTL forum.
    Here it is: [http://forums.sun.com/forum.jspa?forumID=45].

  • Help: OJSPC can not compile the JSP with struts tag

    Hi,
    I am trying to precompile the JSP page with EAR package but OJSPC can not parse the Struts tags.
    I always get oracle.jsp.parse.JspParseException:
    Error: org.apache.struts.taglib.html.MessgesTei while reading TLD /WEB-INF/tld/struts-html.tld
    My OC4J version is 10.1.3.2 and I did tried putting the struts-taglib.jar to /opt/oracle/product/app10g/j2ee/home/jsp/lib or /lib/taglib
    but still do not work.
    Can anyone tell me how to configure the OJSPC and let it support customerized taglibs?
    Thanks a lot!

    This is a new problem with jdk1.4 when compiling with tomcat.
    The solution is to ensure that any classes in WEB-INF/classes are in a package structure and the relevant jsp calls the same using the package name.
    best
    kev

  • JSTL 1.1 and JSP 2.0

    Hello,
    I just downloaded a 15-day demo (JSP version) and tried to test examples
    with JSTL, but it doesn't seem to work. When I finally checked your web
    page, it says "preview availiable now". What does this mean? Is it only
    available for beta testers?
    Is it going to be available for commercial use in the near future? We need
    it now! ;-)
    What about JSP 2.0? Do you have a release date ready?
    With regards,
    Jon Per

    Hello,
    I just downloaded a 15-day demo (JSP version) and tried to test examples
    with JSTL, but it doesn't seem to work. When I finally checked your web
    page, it says "preview availiable now". What does this mean? Is it only
    available for beta testers?
    Is it going to be available for commercial use in the near future? We need
    it now! ;-)
    What about JSP 2.0? Do you have a release date ready?
    With regards,
    Jon Per

  • Need help with Tomcat and JSP

    Hi
    I'm a complete beginner with JSP, I have experience with Java, Dreamweaver and HTML, but I'm having alot difficulty understanding JSP.
    I tried doing out some of the tutorial examples but they don't seem to come out right on the browser.
    For Example the Code for Date
    <HTML>
    <BODY>
    <%
    // This is a scriptlet. Notice that the "date"
    // variable we declare here is available in the
    // embedded expression later on.
    System.out.println( "Evaluating date now" );
    java.util.Date date = new java.util.Date();
    %>
    Hello! The time is now <%= date %>
    </BODY>
    </HTML>
    Comes out as
    <% // This is a scriptlet. Notice that the "date" // variable we declare here is available in the // embedded expression later on. System.out.println( "Evaluating date now" ); java.util.Date date = new java.util.Date(); %> Hello! The time is now <%= date %>
    I know this probably really sounds like a stupid question but what could be the problem?

    Those it have to saved on the desktop, or in the Tomcat webapps folder or what?It has to be in a web application under tomcat. The easiest one to get up and running with basic jsp is the webapps/ROOT directory which is where the main index page is.
    [url http://www.coreservlets.com/Apache-Tomcat-Tutorial/]This one is a good basic guide to installing/getting it running.
    Also the tomcat documentation itself is reasonable good. Of specific relevance to you would be [url http://tomcat.apache.org/tomcat-5.5-doc/appdev/index.html]Application developers guide which explains the basic layout/structure of a web application.

  • How to upload a file into server using j2ee jsp and servlet with bean?

    How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
    Anyone help me please!

    u don't need j2ee and struts to do file uploading. An example is as such
    in JSP. u use the <input> file tag like
    <input type="file"....>You need a bean to capture the file contents like
    class FileUploadObj {
        private FormFile srcFile;
        private byte[] fileContent;
        // all the getter and setter methods
    }Then in the servlet, you process the file for uploading
        * The following loads the uploaded binary data into a byte Array.
        FileUploadObj form = new FileUploadObj();
        byte[] byteArr = null;
        if (form.signFile != null) {
            int filesize = form.srcFile.getFileSize();
            byteArr = new byte[filesize];
            ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
            bytein.read(byteArr);
            bytein.close();
            form.setFileContent(byteArr);
        // Write file content using Writer class into the destination file in the server.
        ...

  • Creating FOrums with Servlet and JSP

    Hi everyone,
    Is there a good resource that explains how to build a forum using servlets and JSP technology?
    Regards,
    Basil Mahdi

    please let me know here if you find any useful resources...I am in the process of writing my own searchable threaded forum for my company with JSP's/servlets. It's a very slow process at the moment though...if I ever finish it, I'll gladly share it.

  • OC4J: Troubles with characters in Reports 9i and JSP

    We are having troubles with especial characters in OC4J. Those problems appear in JSP's and Reports.
    Some information about it:
    - the especial characters in spanish are replaced by strange characters (2 chars for every especial char).
    - this happens with strings from ApplicationResources.properties (we use Struts framework) and NOT with those chars read from database via JDBC.
    - the problem doesn't happen in JDeveloper. It happens when we deploy the application to iAS 9i R2. With reports, it happens both from RWBuilder and local OC4J + RWServlet
    - When we used iAS R1 core version this didn't happen. When we changed to iAS R2 full installation (to be able to use Reports Server) it began to happen.
    Any help about it ?
    Thanks

    Hi Pozo,
    Have you got the solution for the problem specified. Even I'm facing the same problem with Arabic characters.
    Pl. let me know if you've got the solution.
    Thanks,
    Vinod.

Maybe you are looking for

  • Repost: Where is the Weather widget in the iOS 7 Notification Center?

    I will award ten points to a verified "no" or "yes" with a brief explanation how to enable. I understand it is not a full widget, but that's what Apple used to call it in iOS 5 and 6. Anyway, let me give more information. I cleared all of my notifica

  • Advice on external hard drives for Macbook pro

    I am looking to buy an external hard drive for my macbook pro urgently. I was intending to purchase a time capsule but am really concerned with the reliability concerns of the time capsules where they stop working after 6 months to 18 months as poste

  • Can't open my project in CS5.5

    Help!!!!! I've just exported my old cs5 project in flash builder but it won't open in cs5.5 becaus of an error. I'm not a programer so have no idea what this means. src\Main.mxml (995): Unexpected child: "swfcontroller1". Expected a compatible visual

  • Rentals and video out :(

    Hi all, I just rented my first iTunes Movie (Stardust). I was hoping to play it on my TV with the iPod Universal Dock and the Apple's component A/V cable. Guess what? Yup, rentals can only be watched on the tiny iPod screen. Now that I think about, t

  • What scanners are compatible with a 10.7 series iMac desktop?

    What current flatbed scanners are compatible with an 2011 iMac 10.7 series?