SQLJ embedded in JSP

I want to embed SQLJ in a javaserver page. But JDeveloper doesn't understand that this is a SQLJ file unless I change the extension of the file from .jsp into .sqlj
I heard from an extension .sqljsp, but if I use that, Jdeveloper crashes.
Does anybody know a solution for this?
null

JDeveloper doesn't automatically translate any SQLJ code embedded in a JSP - you'd have to translate your SQLJ code outside of JDeveloper.
The best solution is to put your SQLJ code in a web bean.
Thanks
Blaise

Similar Messages

  • Debug applet embedded in jsp using tomcat and eclipse

    I am trying to debug applet embeded in jsp. I have deployed my application on tomcat.
    The steps I followed
    1. Added JVM rumtime parameters in Java plugin control panel
    -Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8000,suspend=n
    2. Added JPDA_ADDRESS = localhost:8000 and JPDA_TRANSPORT=dt_socket to catlina.bat
    3. I start my server from commandline prompt "catalina.bat JPDA start"
    4.I have made a new configuration for remote debug in eclipse debug>new> connection type (socket attach) >port 8000
    5. when I open my application url in browser browser closes and command prompt displays "*Debugger failed to attach , timeout before handshake*"
    Any help on this ?
    Thanks in advance

    Personally, I have no knowledge about Applet but have you checked this link?
    [http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101|http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101]

  • Can I use SQLJ instead of JSP ?

    Hi:
    Can I use SQLJ instead of JSP to work with Oracle Mobile / Wireless ?
    Thanks

    You can use any language that can output XML - There is a Tag Glossary for the Oracle9iAS Wireless XML on http://studio.oraclemobile.com .
    Regards,
    Kalle
    [email protected]
    Hi:
    Can I use SQLJ instead of JSP to work with Oracle Mobile / Wireless ?
    Thanks

  • Applet embedded in JSP doesn't run on browser with older than JRE-1.6

    I have embeded an Applet in my JSP Page which used JDK1.6's getHardwareAddress() method to get user's physical address.
    I have embeeded this into a JAR file and used it in my JSP where this applet run on onload() event of the form --> runs the applet --> and gets physical address of user machine and prints it in one of the text boxes on the form.
    Now, the issue is that the applet doesn't run on browser that doesn't support JRE 1.6
    My concern is that how can I run this (if at all possible) in browsers that support lower versions of JRE or is it possible to check that if the browser doesn't support JRE 1.6 then load the basic version of form without running the applet. Can i actually check the version of browser JRE somehow and stop to execute the applet. Because what happens as of now is that if the applet doesn't execute, the complete form fails to load.
    The last option is that I give a message on my web page that redirects user to Sun Java site and asks them to update their browsers.

    Personally, I have no knowledge about Applet but have you checked this link?
    [http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101|http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101]

  • Applets embedded in JSP

    Hi,
    Another newbie question here sorry.
    I have the following directory structure in my web app:
    root_dir
    root_dir/JSP_dir1/JSP_sub_dir1/main.jsp
    root_dir/WEB-INF/lib
    main.jsp has an embedded apple - the markup looks like this:
    <applet
      code="com.somepackage.somesubpackage.Class"
      archive="../WEB-INF/lib/myjar1.jar,
            ../WEB-INF/lib/myjar2.jar,
         ../WEB-INF/lib/myjar3.jar,
         ../WEB-INF/lib/myjar4.jar,
         ../WEB-INF/lib/myjar5.jar"The problem is that when I access main.jsp the applet doesn't show up - instead there are errors and JavaConsole shows the following:
    load: class com.somepackage.somesubpackage.Class not found.The relevant JAR's are in the WEB-INF/lib folder. Given the directory structure I mentioned above is it possible that the class could not be found because I am pointing to the location incorrectly? If that is not the case could anyone please suggest what the issue might be?
    Thanks.

    Thanks, this is very helpful. I guess the other part of my question is, if my JSP's are in the following directory structure:
    App-Root/JSP/JSP_subfolder/main.jsp.
    And the AppletJars folder is:
    App-Root/AppletJars/And the applet is embedded in main.jsp, the libs I reference out of that JSP, does their dir path have to be preceded by../../ or only ../. In other words, JSP's that are located two directories down, do they have to look two directories up?
    It may sound like a stupid question, but it is not obvious to me that after the JSP gets compiled into a Servlet it keeps its directory tree. I also think I encountered a situation recently where even though the JSP was nested within 2 folders it had to look only one directory up for something. Am I wrong?

  • Is this possible: images from 9i through ejb physically embedded in jsp

    I am trying to determine whether this is possible...
    I would like to store a number of images in an Oracle 9i db in CLOB/BLOB
    fields. So far everything is ok. Now for the fun part.
    Using an EJB I would like to retrieve the image, and embed it in a JSP page,
    contents and all. Rather then the image physically being downloaded as a
    separate resource, I'd like to embed the contents right in the document. Is
    this possible via the object html tag, or some other tag - has anyone done
    anything like this? Although the image would be embedded, I would like it
    to display as normal in the browser. Please help! In the end, I'd be
    looking for a file like:
    <body>
    <h2>below is the image</h2>
    <object params>1294574599445BE3049AAACCEDDAAFFF023...etc</OBJECT>
    <h2>above is an image being displayed by the browser</h2>
    </body>
    It seems like a pretty nutty thing to do, but we have a few requirements,
    and large enough connect/teardown time to make it worthwhile if its
    possible. Any ideas as to whether this is doable?
    Thanks,
    Chris

    Hi Chris,
    You may use ServletResponse to setContentType to
    image/jpeg
    image/gif
    image/ief
    image/tiff
    And then write corresponding binary image data to the stream.
    Corresponding tag in the html page could look like
    <img src="http://my/image.jsp"/>
    Hope this helps,
    Slava Imeshev
    "Chris Hettinger" <[email protected]> wrote in message
    news:[email protected]..
    I am trying to determine whether this is possible...
    I would like to store a number of images in an Oracle 9i db in CLOB/BLOB
    fields. So far everything is ok. Now for the fun part.
    Using an EJB I would like to retrieve the image, and embed it in a JSPpage,
    contents and all. Rather then the image physically being downloaded as a
    separate resource, I'd like to embed the contents right in the document.Is
    this possible via the object html tag, or some other tag - has anyone done
    anything like this? Although the image would be embedded, I would like it
    to display as normal in the browser. Please help! In the end, I'd be
    looking for a file like:
    <body>
    <h2>below is the image</h2>
    <object params>1294574599445BE3049AAACCEDDAAFFF023...etc</OBJECT>
    <h2>above is an image being displayed by the browser</h2>
    </body>
    It seems like a pretty nutty thing to do, but we have a few requirements,
    and large enough connect/teardown time to make it worthwhile if its
    possible. Any ideas as to whether this is doable?
    Thanks,
    Chris

  • How to set TabIndex in jsp fragments embeded in jsp

    After googling a little bit I can find a way to set the tabIndex in my jsp fragments which are embeded in a jsp. I'm working with JSF and project woodstock.
    I have embeded the fragment like this:
    <div style="border-bottom: solid rgb(5, 5, 158) 1px; top: 1289px; position: absolute">
        <jsp:directive.include file="myFragment.jspf"/>
    </div>I'll be really gratefull for your help.

    try this:
    your.jsp
    <html>
    <SCRIPT>function buttonClick()
    {document.compform.submit();}
    </SCRIPT>
    <body>
    <form name=compform method=post action='your.jsp'>
    <%
    //write your code which you want to execute once the button is submitted
    String submit;
    submit=request.getParameter("mysubmit");
    if ((submit != null) && (! submit.equals("")))
    %>
    <input type=hidden name=mysubmit value="submit">
    <input type=button value=add onclick='buttonClick()'>
    </form></body></html>

  • Flex2.0 embedded in jsp page 

    Hi,
    I'm developping a web application using jsp nad I want to
    include a flex2.0 datagrid inside my jsp page. is that possible?
    and how? In flex1.5 I know how to do ,but in flex 2.0,I can't!
    Thank s

    I mean's i want to desgin a datagrid user flex2.0,and let it
    in jsp .do you know

  • Embedding JSP in Javascript - filtering newlines

    I'm embedding some JSP tags in a Javascript function.
    It's all working fine except that <html:options> insists on emitting
    a newline after each <option></option> that it generates. So I can't embedd this
    in a Javascript string.
    Can I make <html:options> not produce an newline after each <option></option> ?
    Can I make <html:options> add on a "\" javascript continuation after each <option></option>?
    Can I write a filter tag that I can embed the <html:options> tag in?
    Is there a standard tag that will do what I need?
    Thanks
    Message was edited by:
    jgc94131

    OK, I'm going to post the solution that I've used.
    First off the tag causing the problem is from the struts taglib.
    What I've ended up doing was to use the Jakarta Project: String Tag library,
    which in turn depends on the apache String Utils package.
    The solution looks like this:
    <script language=javascript>
    function foo () {
      document.getElementById("foobar").innerHTML = '<tr><td>\
        <html:select property="searchCategorySelectedOne" value="<%=  CatalogForm.getSearchCategorySelectedOne()%>">\
        <html:option key="CatalogForm.searchCategory.displayname" value=""/>\
        <str:replace replace="NL" with="" newlineToken="NL"><str:replace replace="CR" with="" carriageToken="CR"><html:options collection ="CategoriesHolderList" property="value" labelProperty="label" /></str:replace></str:replace></html:select>\
        <\td><\tr>';
    </script>This example has been simplified to give the gist of the solution, which is
    wrap the <html:options> tag with two calls to <str:replace>.
    Message was edited by:
    jgc94131

  • SQLJ and JSP

    Hello,
    I have generated a sqlj wrapper class for a package, and now I want to execute a method that calls the pl/sql procedure inside the .sqlj program thru JSP. How do I do that?
    I tried <%=methodgenerated() %>, but doesn't work.
    It's a stored procedure not a function. I looked for an example and I just found the runQuery() example everywhere, but didn't find an example about running a procedure from JSP.
    I also did the steps about language="sqlj" and import.... but I need an example about doing this action.
    Could you please help me with this?
    Thanks in advance.

    I will answer myself, so people that has the same problem can see this:
    Make a jsp page (callingprogram.jsp) that calls the following file: EXECUTESQLJ.jsp (the file name could be whatever):
    -- CALLINGPROGRAM.JSP --
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    jsp to execute a pl/sql (sqlj)
    </TITLE>
    </HEAD>
    <BODY>
    Ejecutar un PL/SQL es cuestion de colocar el codigo en JAVA respectivo:
    <FORM method="post" action="executesqlj.jsp" onreset="alert('LA FORMA ES REINICIADA')">
    Presione el boton --><INPUT type="submit" value="Ejecutar">
    <BR>
    Para Reiniciar valores presione ---> <INPUT type="reset" value="Reiniciar"></TD>
    </FORM>
    </BODY>
    </HTML>
    Then, the file EXECUTESQLJ.JSP should has a look like this:
    <%@ page language="sqlj"
    contentType="text/html;charset=windows-1252"
    import="oracle.jbo.*,
    java.sql.SQLException,sqlj.runtime.ref.DefaultContext,
    sqlj.runtime.ConnectionContext,java.sql.Connection,
    oracle.sqlj.runtime.Oracle,mypackage1.java2" %>
    <-- mypackage1.java2 is the wrapper sqlj that the JDEV has created with the option GENERATE JAVA... -->
    <HTML>
    <HEAD>
    <TITLE>
    Executing sqlj....
    </TITLE>
    </HEAD>
    <BODY>
    <% // Codificacion de Java para llamar el procedimiento.
    Oracle.connect(new java2().getClass(), "connect.properties");
    <% /* remember creating the file connect.properties in your package directory
    The file has to be like this:
    sqlj.url=jdbc:oracle:thin:@servidor:1521:ORCL
    # User name and password here (edit to use different user/password)
    sqlj.user=scott
    sqlj.password=tiger
    */ %>
    java2 execsql = new java2();
    execsql.testjava();
    %>
    <jsp:forward page="callingprogram.jsp" />
    </BODY>
    </HTML>
    Hope this could help the jdevs guys!.

  • SQLJ Not Seen

    Hi,
    I am very new in JSP. I wrote a JSP as follows in JDeveloper (Version 10.1.2.1.0).
    <%@page language="sqlj" import = "sqlj.runtime.*, sqlj.runtime.ref.*, java.sql.*,
    oracle.sqlj.runtime.*, java.applet.Applet, java.awt.event.*,
    java.awt.geom.Point2D, java.math.*, java.util.*, java.awt.*,
    java.awt.image.*" %>
    <%
    #sql iterator myIteraClass(String, double, double, double, double, double,
    double, double, double, double, double,
    double, double, double, double, double,
    double, double);
    public class myClass0 {
    public void init( ){
    myIteraClass myIteraClassObj; <----------
    } // End init
    } // End myClass0.
    %>
    JDeveloper said Class "myIteraClass" not found in the line with arrow.
    Could anybody please tell what the problem is. Thanks in advance.
    -M

    M:
    JSP is html with server-side scripts in pure java. Embedded sql statement in java as in sqlj is not supported in JSP (in general, just to be on the safe side). JSP spec has never mentioned anything regarding to sqlj or any other java language extension. So it is only fair to say that one should not expect Jdeveloper to recognize your sqlj statements in JSP. Do you know any other IDE that recognizes sqlj in jsp files?
    That being said, oc4j (please note, I am not saying Jdeveloper) did support a file format with extension .sqljsp or .SQLJSP, which is the same as jsp file but also allows sqlj instead of only java. I tried a few genuine .sqljsp files. They do work even on latest oc4j. Sqlj itself was desupported by Oracle at one time, only to be re-supported later. It is not totally clearly whether Oracle is supporting sqljsp in the next Application Server release and in the future.
    I believe that Jdeveloper has never supported .sqljsp file. You can not create a file with extension .sqljsp as a jsp file.
    So if you do want to use sqlj in JSP, try developing directly on oc4j. You have to use ".sqljsp" as your file extension using Jdeveloper wizards; or if you use ".jsp" as your file extension, add <%@ page language="sqlj" %> at the top of your jsp file. (it seems this sqlj language directive will not be effective in Jdeveloper, either)
    Another workaround is to use JDBC instead of sqlj.
    I hope this note is helpful to you.

  • Report generation using jsp

    I am developing a website using jsp on tomcat.The site required a number of online report generation option from database(mysql).
    My problem is-
    1.how to generate different types of report other than simple html tag embedded within jsp .
    2.How to store all those reports in a file(.txt or .doc).
    N.B I dont want to use any reporting tool.

    Mantosh,
    Have you seen this developer zone article which details accessing Citadel Data using COM+ and ADO?
    http://zone.ni.com/devzone/conceptd.nsf/webmain/725A6C3843F13C8786256EA600633724#6
    Also, this KB article provides more detail on how to access Citadel data using SQL commands and I think will help answer your question:
    http://digital.ni.com/public.nsf/websearch/C7D32F9A59D4637086256A7200692F30?OpenDocument
    --Paul Mandeltort
    Automotive and Industrial Communications Product Marketing

  • Justifications needed for using tags in JSP, Please reply

    Hi forum
    My question is to those java people who have also done JSP. I m sound in java server side (servlet programming), now I have asked by my project manager to do server side programming in JSP using tagLibraries (as these are used by those ppl who didnt have much java knowledge). I have worked inserver side java, then my question is y should I start working on tags,
    On the other hand I can do all the work in java embedding in JSP (on some extent, seperated by diffrent helper/util classes to reduce the thickness of JSP page).
    so I want to ask u ppl that should a java programmer needs to use tag libraries to code a JSP page, however he can code it in java directly.
    I will feal great pleasure if u will write ur opinions and help me to ease my life.
    thanx in advance
    Best Regards
    Tahir

    You should use tag libraries whenever you can because:
    1) They increase code re-useability. You can insert the same tag in many pages using just a few lines to do complex tasks, as opposed to writing a lot of scriptlet code in each JSP.
    2) Enhance your ability to seperate logic from display. Everything in your tags is logic. Everything in your JSP is display - with the tags bridging the logic to the display.
    3) Make the JSPs cleaner and easier to maintain. They read easier with tags than with a lot of scriptlets. Non-java people can be used to update the look and feel of the web page, or to debug the HTML later on, relieving the Java programmers for the tag work, or other jobs more suited to them.
    4) Your boss said to do tags, so do tags.

  • The content item may be in webless storage (JSP)

    Hi.
    I have a problem about UCM 10g and the embedded Tomcat (JSP).
    My goal is run a wabapp (.war file). I had already checked the security group policy and every time that I get the "JSP Web App Administration" page I read "The content item may be in webless storage" near my .war. and every possible actions are disabled.
    Could someone give me an hint?
    Maurizio

    I tried to copy the .WAR and it didn't work. I also tried to upload the webapp folder of and it didn't work.
    I have to say that if I upload a simple JSP it work. Now to solve the situation I decide to move all the logic inside my componente but it is a bit hard. I have a problem to solve my requirements.
    Crate a PDF and send it as responce
    Thanks Maurizio

  • How To Pass the value from JSP to Applet

    plz reply how can we pass the value from the JSP to Applet ...the applet is embedded in JSP page....

    Hi,
    <applet codebase = "."
    archive = foo.jar"
    code = "com.bar"
    name = "bar"
    id = "bar"
    width = "<%=Request["width"] %>"
    HEIGHT = "<%=Request["appHeight"] %>"
    hspace = "0"
    vspace = "0"
    align = "middle"
    alt     = "Applet is Loading..."
    >
         <param name="LANGUAGE"                value="<%=Request["lan"] %>">          
         <param name="LOGOUT_USER_URL"           value="EndSession.asp">
         <param name="DATA_READ_INTERVAL"      value="10000">
         <param name="REFRESH_INTERVAL"           value="5000">     
         <param name="DEFAULT_FONT"           value="Arial">
    </applet>
    pass values @ ur html or jsp page to Applet as parameters.
    Refer above code. By using getParameter() method of Applet, u can take values inside applet.

Maybe you are looking for

  • Restoring iPod then it's not recognized by iTunes

    HELP?!! I have restored this 80GB classic 6 times, and after I load all the songs on it, and disconnect, iTunes tells me it can not read it when I reconnect. And Now, also, after I have loaded ALL the songs, the iPod says "no Music"...but then it wil

  • How to recover from one corrupted redo log file in NOARCHIVE mode?

    Oracle 10.2.1. The redo log file was corrupted and Oracle can't work. When I use STARTUP mount, I got no error msg. SQL> startup mount ORACLE instance started. Total System Global Area 1652555776 bytes Fixed Size 1251680 bytes Variable Size 301991584

  • Kde startup error

    my install of kde is not working. when i try to log in i get this error Kstartupconfig4 does not exist or fails. this is error code 3. check ... i dont know what to do... maybe a uninstall and fresh install... i dont know.. thanks ,,, i know this is

  • Elements 12 organizer

    I was able to download photoshop elements 12, but the Elements 12 Organizer portion won't open. Can my os system except the editing portion but not the organizer section? I downloaded a second time with the same results.

  • Setting Beans in Application Scope

    How do I set beans in application scope at the start of a JSF web app? I'd like to be able to do something similar to the Struts plugin.