JDeveloper 3.1 and JSP problems

Hello everybody.
I present myself. I am a French student in computer sciences who makes a training course in a French company. (You will excuse the bad quality of my English)
I have some difficulties in the use of Oracle JDeveloper tool.
1st problem:
I encountered this problem during the creation of a JSP page for a simple Intranet application connected to an Oracle database.
JDeveloper doesnt want to take into account the fact that one of my tables has two primary (composite) keys;(Each of these two keys is primary key of another table). That results on the one hand in an error during the loading of the default edition form (" JBO-25030: Failed to find or invalidate owning entity ") and in addition by impossibility of consulting the recordings of this table according to one of the two key parameters (selected in RowSetBrowser). Nevertheless, this last aspect works within the Oracle Business Component Browser.
2nd problem:
Imagine, for example, the following simplified conceptual diagram:
Racks ---> Files ---> Sheets (they are tables)
How on a JSP page, can I display in the easiest way (with a JSNavigatorTab and a RowSetBrowser), the recordings of the table Sheets of a particular File, without to use a selection at the table Racks level.
(You choose directly, with a ComboBox or a RowSetBrowser, a File to display all the corresponding Sheets, without to choose a Rack before.)
In fact, I try to have an application as simple and ergonomic as possible.
I thank all those who will be able to inform me on these obscure points which slow down my project considerably.
Regards.
Guillaume Vidal
null

Hi,
* For your 1st problem, try to uncheck the "composite association" checkbox in the association object linking your tables together, should work better.
* For the second one,
when you create the application module containing the rack/file and sheet views, add the file view at root level (i.e do not use the view link relationship, which would include it as a detail view for the racks view), then add the sheet view through the file/sheet viewLink.
This way you'll be able to browse the entire file and sheet list in a basic master/detail view.
Good luck, Remi
by Guillaume Vidal:
Hello everybody.
I present myself. I am a French student in computer sciences who makes a training course in a French company. (You will excuse the bad quality of my English)
I have some difficulties in the use of Oracle JDeveloper tool.
1st problem:
I encountered this problem during the creation of a JSP page for a simple Intranet application connected to an Oracle database.
JDeveloper doesnt want to take into account the fact that one of my tables has two primary (composite) keys;(Each of these two keys is primary key of another table). That results on the one hand in an error during the loading of the default edition form (" JBO-25030: Failed to find or invalidate owning entity ") and in addition by impossibility of consulting the recordings of this table according to one of the two key parameters (selected in RowSetBrowser). Nevertheless, this last aspect works within the Oracle Business Component Browser.
2nd problem:
Imagine, for example, the following simplified conceptual diagram:
Racks ---> Files ---> Sheets (they are tables)
How on a JSP page, can I display in the easiest way (with a JSNavigatorTab and a RowSetBrowser), the recordings of the table Sheets of a particular File, without to use a selection at the table Racks level.
(You choose directly, with a ComboBox or a RowSetBrowser, a File to display all the corresponding Sheets, without to choose a Rack before.)
In fact, I try to have an application as simple and ergonomic as possible.
I thank all those who will be able to inform me on these obscure points which slow down my project considerably.
Regards.
Guillaume Vidal
null

Similar Messages

  • Taglib and JSP problem

    Hi!
    I cannot determine why I'm getting the following error:
    I've installed Apache Tomcat/4.0.6
    "PARSE error at line 6 column 19
    org.xml.sax.SAXParseException: Element type "taglib" must be declared."
    Can you tell why the parser does not recognize it?
    Appreciate any help.
    ele
    [my JSP]
    <%@ page language="java" import="java.lang.*,java.util.*,javax.servlet.jsp.*,java.io.PrintWriter,javax.servlet.http.HttpServletResponse,javax.servlet.jsp.JspWriter" %>
    <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
    [my web.xml]
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <display-name>SegDis</display-name>
    <description></description>
    <servlet>
    <servlet-name>ScriviPunto</servlet-name>
    <servlet-class>ScriviPunto</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>lanciaScriviPunto</servlet-name>
    <jsp-file>/lanciaScriviPunto.jsp</jsp-file>
    </servlet>
    <servlet>
    <servlet-name>segnalazione</servlet-name>
    <jsp-file>/segnalazione.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
    <servlet-name>ScriviPunto</servlet-name>
    <url-pattern>/scriviPunto</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>lanciaScriviPunto</servlet-name>
    <url-pattern>/lanciaScriviPunto.jsp</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>segnalazione</servlet-name>
    <url-pattern>/segnalazione.jsp</url-pattern>
    </servlet-mapping>
    <taglib>
         <taglib-uri>/WEB-INF/c.tld</taglib-uri>
         <taglib-location>/WEB-INF/c.tld</taglib-location>
    </taglib>
    </web-app>
    [the .tld file (downloaded from Sun)]
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>c</short-name>
    <uri>http://java.sun.com/jstl/core</uri>
    <display-name>JSTL core</display-name>
    <description>JSTL 1.0 core library</description>
    <validator>
    <validator-class>
         org.apache.taglibs.standard.tlv.JstlCoreTLV
    </validator-class>
    <init-param>
         <param-name>expressionAttributes</param-name>
         <param-value>
         out:value
         out:default
         out:escapeXml
         if:test
         import:url
         import:context
         import:charEncoding
         forEach:items
         forEach:begin
         forEach:end
         forEach:step
         forTokens:items
         forTokens:begin
         forTokens:end
         forTokens:step
         param:encode
         param:name
         param:value
    redirect:context
    redirect:url
         set:property
         set:target
         set:value
         url:context
         url:value
         when:test
         </param-value>
         <description>
         Whitespace-separated list of colon-separated token pairs
         describing tag:attribute combinations that accept expressions.
         The validator uses this information to determine which
         attributes need their syntax validated.
         </description>
    </init-param>
    </validator>
    <tag>
    <name>catch</name>
    <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
    <body-content>JSP</body-content>
    <description>
    Catches any Throwable that occurs in its body and optionally
    exposes it.
    </description>
    <attribute>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>choose</name>
    <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
    <body-content>JSP</body-content>
    <description>
    Simple conditional tag that establishes a context for
    mutually exclusive conditional operations, marked by
    <when> and <otherwise>
    </description>
    </tag>
    <tag>
    <name>out</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.OutTag</tag-class>
    <body-content>JSP</body-content>
    <description>
         Like <%= ... >, but for expressions.
    </description>
    <attribute>
    <name>value</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>default</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>escapeXml</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>if</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.IfTag</tag-class>
    <body-content>JSP</body-content>
    <description>
    Simple conditional tag, which evalutes its body if the
    supplied condition is true and optionally exposes a Boolean
    scripting variable representing the evaluation of this condition
    </description>
    <attribute>
    <name>test</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>import</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.ImportTag</tag-class>
    <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
    <body-content>JSP</body-content>
    <description>
         Retrieves an absolute or relative URL and exposes its contents
         to either the page, a String in 'var', or a Reader in 'varReader'.
    </description>
    <attribute>
    <name>url</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>varReader</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>context</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>charEncoding</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>forEach</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.ForEachTag</tag-class>
    <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
    <body-content>JSP</body-content>
    <description>
         The basic iteration tag, accepting many different
    collection types and supporting subsetting and other
    functionality
    </description>
    <attribute>
         <name>items</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>begin</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>end</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>step</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>var</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>varStatus</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>forTokens</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.ForTokensTag</tag-class>
    <body-content>JSP</body-content>
    <description>
         Iterates over tokens, separated by the supplied delimeters
    </description>
    <attribute>
         <name>items</name>
         <required>true</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>delims</name>
         <required>true</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>begin</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>end</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>step</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>var</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
         <name>varStatus</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>otherwise</name>
    <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
    <body-content>JSP</body-content>
    <description>
         Subtag of <choose> that follows <when> tags
         and runs only if all of the prior conditions evaluated to
         'false'
    </description>
    </tag>
    <tag>
    <name>param</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.ParamTag</tag-class>
    <body-content>JSP</body-content>
    <description>
         Adds a parameter to a containing 'import' tag's URL.
    </description>
    <attribute>
    <name>name</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>value</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>redirect</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.RedirectTag</tag-class>
    <body-content>JSP</body-content>
    <description>
         Redirects to a new URL.
    </description>
    <attribute>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>url</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>context</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>remove</name>
    <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
    <body-content>empty</body-content>
    <description>
         Removes a scoped variable (from a particular scope, if specified).
    </description>
    <attribute>
    <name>var</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>set</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.SetTag</tag-class>
    <body-content>JSP</body-content>
    <description>
         Sets the result of an expression evaluation in a 'scope'
    </description>
    <attribute>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>value</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>target</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>property</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>url</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.UrlTag</tag-class>
    <body-content>JSP</body-content>
    <description>
         Prints or exposes a URL with optional query parameters
    (via the c:param tag).
    </description>
    <attribute>
    <name>var</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>scope</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>value</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>context</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>when</name>
    <tag-class>org.apache.taglibs.standard.tag.el.core.WhenTag</tag-class>
    <body-content>JSP</body-content>
    <description>
    Subtag of <choose> that includes its body if its
    condition evalutes to 'true'
    </description>
    <attribute>
    <name>test</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    </taglib>

    this is a wild guess, but make sure the taglib text you added to your web.xml doens't contain funky characters you may have copied from some web page. i.e. retype it by hand if you copied it.
    If that isn't it.. sorry i don't see a problem.

  • Struts and JSP problem..help needed

    Hi,
    I am trying to use request.setParameter("formatName") from the JSP page into the ACtion class to display the user entered values.
    I have my struts action classes tagged to be in session scope since the UI is a wizard and i want the values to be carried on until they click finish. on the wizard.
    I want the formatName floating across the wizard, I have another value called."Category" floating since its a dynamically generated variable using the formbean.
    ***************ACTION class****************
    public class CreateFormatReportDefinitionAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response)
    throws Exception {
         final Logger logger = Logger.getLogger(this.getClass());
    ActionErrors errors = new ActionErrors();
    ActionForward forward = new ActionForward(); // return value
    ClarityReportDefinitionFormBean rdFormBean = (ClarityReportDefinitionFormBean) form;
              HttpSession session = request.getSession();
              List fList = new ArrayList();
              FormatDAO fDAO = new FormatDAO();
              Format fmt = null;
    try {
              logger.log(Level.INFO, "Entering CreateFormatReportDefinition Action...");
              Person person = PersonUtil.getCurrentUser(request);
              logger.debug("Category is: "+rdFormBean.getCategory());
              List formats = fDAO.findFormatsForCategory(rdFormBean.getCategory());
              for(int i=0;i < formats.size(); i++) {
                   fmt = (Format)formats.get(i);
              if(fmt.getOwner().getEmailaddr().equals(person.getEmailaddr())){
              fList.add(fmt);
              rdFormBean.setUserFormatList(fList);
              logger.log(Level.DEBUG,"sessionObject for formName is: "+session.getAttribute("formatName"));
    } catch(Exception e) {
    // Report the error using the appropriate name and ID.
    errors.add("name", new ActionError("id"));
    // If a message is required, save the specified key(s)
    // into the request for use by the <struts:errors> tag.
    if (!errors.isEmpty()) {
    saveErrors(request, errors);
    // Write logic determining how the user should be forwarded.
    forward = mapping.findForward("success");
    // Finish with
    return (forward);
    ***********JSP form for the class****************
    <html:form action="/createFilterAction" >
    <table>
    <tr><td>
    <html:text property="formatName" />
    </td></tr>
              <tr>
                   <td>
    <html:select property="myFormats" onchange="insertSelectedMyFormat()">
    <html:option value="">Select user Formats</html:option>
    <c:forEach var="formats" items="${reportDefFormBean.userFormatList}">
    <html:option value="${formats.name}"><c:out value="${formats.name}"/></html:option>
    </c:forEach>
    </html:select>
    </td>
              </tr>
    </table>
    </html:form>
    ***********JAVASCRIPT**********
    var box = document.reportDefFormBean.myFormats;
    function insertSelectedMyFormat()
         var hisFormat = box.options[box.selectedIndex].value;
         document.reportDefFormBean.formatName.value = hisFormat;
    ********STRUTS_CONFIG.XML*****************
    <form-beans>
         <form-bean name="reportDefFormBean"
                   type="com.ibm.ads.reports.web.formbeans.ClarityReportDefinitionFormBean"></form-bean>
    </form-beans>
    <action name="reportDefFormBean" path="/createFormatReportDefinition"
                   type="com.ibm.ads.reports.web.actions.reportDefinition.CreateFormatReportDefinitionAction"
                   scope="session" validate="false">
                   <forward name="success" path="/createFormatReportDefinition.jsp"/>
    </action>
    I am getting a null for Session.getAttribute("formatName") or even if i change the scope to request, i use request.getPArameter("formatName"), i get null again.
    I dunno what iam missing in this regard, but if anyone has found anything wrong with my code...please help me out.
    any time spent will be appreciated.
    Thank you and regards,
    dev

    Hi,
    I am trying to use request.setParameter("formatName") from the JSP page into the ACtion class to display the user entered values.
    I have my struts action classes tagged to be in session scope since the UI is a wizard and i want the values to be carried on until they click finish. on the wizard.
    I want the formatName floating across the wizard, I have another value called."Category" floating since its a dynamically generated variable using the formbean.
    ***************ACTION class****************
    public class CreateFormatReportDefinitionAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response)
    throws Exception {
    final Logger logger = Logger.getLogger(this.getClass());
    ActionErrors errors = new ActionErrors();
    ActionForward forward = new ActionForward(); // return value
    ClarityReportDefinitionFormBean rdFormBean = (ClarityReportDefinitionFormBean) form;
    HttpSession session = request.getSession();
    List fList = new ArrayList();
    FormatDAO fDAO = new FormatDAO();
    Format fmt = null;
    try {
    logger.log(Level.INFO, "Entering CreateFormatReportDefinition Action...");
    Person person = PersonUtil.getCurrentUser(request);
    logger.debug("Category is: "+rdFormBean.getCategory());
    List formats = fDAO.findFormatsForCategory(rdFormBean.getCategory());
    for(int i=0;i < formats.size(); i++) {
    fmt = (Format)formats.get(i);
    if(fmt.getOwner().getEmailaddr().equals(person.getEmailaddr())){
    fList.add(fmt);
    rdFormBean.setUserFormatList(fList);
    logger.log(Level.DEBUG,"sessionObject for formName is: "+session.getAttribute("formatName"));
    } catch(Exception e) {
    // Report the error using the appropriate name and ID.
    errors.add("name", new ActionError("id"));
    // If a message is required, save the specified key(s)
    // into the request for use by the <struts:errors> tag.
    if (!errors.isEmpty()) {
    saveErrors(request, errors);
    // Write logic determining how the user should be forwarded.
    forward = mapping.findForward("success");
    // Finish with
    return (forward);
    }***********JSP form for the class****************
    <html:form action="/createFilterAction" >
    <table>
    <tr><td>
    <html:text property="formatName" />
    </td></tr>
    <tr>
    <td>
    <html:select property="myFormats" onchange="insertSelectedMyFormat()">
    <html:option value="">Select user Formats</html:option>
    <c:forEach var="formats" items="${reportDefFormBean.userFormatList}">
    <html:option value="${formats.name}"><c:out value="${formats.name}"/></html:option>
    </c:forEach>
    </html:select>
    </td>
    </tr>
    </table>
    </html:form>***********JAVASCRIPT**********
    var box = document.reportDefFormBean.myFormats;
    function insertSelectedMyFormat()
    var hisFormat = box.options[box.selectedIndex].value;
    document.reportDefFormBean.formatName.value = hisFormat;
    }********STRUTS_CONFIG.XML*****************
    <form-beans>
    <form-bean name="reportDefFormBean"
    type="com.ibm.ads.reports.web.formbeans.ClarityReportDefinitionFormBean"></form-bean>
    </form-beans>
    <action name="reportDefFormBean" path="/createFormatReportDefinition"
    type="com.ibm.ads.reports.web.actions.reportDefinition.CreateFormatReportDefinitionAction"
    scope="session" validate="false">
    <forward name="success" path="/createFormatReportDefinition.jsp"/>
    </action>I am getting a null for Session.getAttribute("formatName") or even if i change the scope to request, i use request.getPArameter("formatName"), i get null again.
    I dunno what iam missing in this regard, but if anyone has found anything wrong with my code...please help me out.
    any time spent will be appreciated.
    Thank you and regards,
    dev

  • JDeveloper and JSP

    I am a new person to JDeveloper technology.
    I wanted to know that if I create JSP using JDeveloper 3.0, and then upload the JSP pages on a UNIX server, will I need application server.
    What is JServer ?

    Anny,
    You can developer Java Server Pages using JDeveloper and deploy them to any platform.
    If your deployment platform is UNIX, you will need an application server that supports the Servlet API. Apache plus Tomcat is a good option. You can learn more about it at www.apache.org.
    JServer is the VM that runs inside the Oracle8i database. You can learn more about it on the Oracle8i page of OTN.
    Laura

  • Jsp and JPanel problem

    Hello. I've been to this forum many times, but have always been a bit gunshy about posting anything of my own. Now I have a problem I haven't seen before, so here goes. I have a JPanel in a java program that has all sorts of other componants added to it. I am trying to display the whole thing in a jsp page. This is what I am doing in the java file to return the image ("display" is the JPanel):
    public byte[] getImage(){
        int w = display.getWidth();
        int h = display.getHeight();
        BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        display.paint(img.createGraphics());
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        ImageIO.write(img, "jpeg", os);
        return os.toByteArray();
    }and then in the jsp page I say:
    <%@ page contentType="image/jpeg" %>
    <%@ page import="myPackage.MyClass" %>
    <%
         MyClass picture = new MyClass();
         byte[] b = picture.getImage();
         OutputStream os;
         os = response.getOutputStream();
         os.write(b);
         os.flush();
    %>And the problem is that the page is displaying a blank JPanel and none of the componants that were added to it. If I save the the JPanel as a jpeg in the java program, though, it does contain all the componants, so I am not sure what I am doing wrong here. If there is some way to get the all the JPanel componants returned, that would be great to know. Thanks for any help.

    nope, that didn't work.
    Maybe I am going about solving the problem all wrong. The JPanel and its componants are kind of like a template. When a user of the system submits their information it automatically puts the data into the template and displays it on screen as a jpg. It works when I save the jpg as a file from the java program but not when i send the byte array to the jsp server. It just shows the blank panel....
    Is there a better way to go about doing this?

  • JSP and Tomcat Problem

    Folks,
    My apologies if this is off-topic for this forum, but I've been having this problem using Tomcat and JSP. I'm fairly new to Java.
    Basically, I'm writing a webapp that uses servlets and JSP together. The servlet and backend classes all compile fine. Now, basic frontend page is called Console.jsp, and one of the commands that it runs is <%@ page import="DJUser">
    Here's the problem: Console.jsp is in $CATALINA_HOME/webapp/
    DJUser (and the rest of the classes I'm using) are in $CATALINA_HOME/webapp/WEB-INF/classes
    When I attempt to run Console.jsp I get this error:
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    The import DJUser cannot be resolved
    An error occurred at line: 9 in the jsp file: /Console.jsp
    Generated servlet error:
    DJUser cannot be resolved to a type
    An error occurred at line: 11 in the jsp file: /Console.jsp
    Generated servlet error:
    user cannot be resolved
    An error occurred at line: 11 in the jsp file: /Console.jsp
    Generated servlet error:
    DJUser cannot be resolved to a type
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    The ROOT CAUSE is listed as:
    java.lang.ClassNotFoundException: org.apache.jsp.Console_jsp
         java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         java.security.AccessController.doPrivileged(Native Method)
         java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
         org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
         org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    I'm running Tomcat 5.5.12 on Mac OS X 10.4. Could this be a permissions issue somehow? For right now (testing purposes only) I have tomcat running under my (non root) account.
    I've been scouring the web for a while, and I can't really find anything on this. I'd appreciate any help you could give me.
    Thanks!
    Dylan

    Put the DJUser java file in a package (say com.myClasses) and recompile. Then put the DJUser class file under the WEB-INF/classes directory in the proper package structure (WEB-INF/classes/com/myClasses/DJUser). Stop and restart the server to pick up the new classes. Make sure to change the jsp import statement ( <%@ page import="com.myClasses.DJUser">)

  • Upgrading JDeveloper 9052 to 1012 and centrino problems?

    I have recently purchased a new laptop with the following specification:
    Dell 9300
    Centrino 1.8
    1Gb DDR2
    ATI x300 128Mb
    60Gb Hard Drive
    Windows XP SP2 + all updates
    to replace my previous development machine.
    I have experienced the following problems when running JDeveloper on it and I'd appreciate your assistance in rectifying them.
    1. I installed JDeveloper 9052 on my laptop and tried to run an ADF based application that I have got running on many other development machines and a 904 server. When I ran the application on my laptop it worked fine until it reached the point within the application that created an inputStream from a URL - where it failed. I know that it fails exactly at this point after spending some time debugging the code. I found this very strange as I could successfully view the content of the URL in a web browser.
    2. In an attempt to find a solution to point 1. (see above) I installed version 1012 of JDeveloper. I tried to open the existing project that I had created in 9052 and when prompted agreed to convert it to the new format. Then without opening or editing any of the files I successfully ran the applicaiton by right clicking on the view controller within the project (applicaiton navigator panel) and selecting run from the context menu. The application ran successfully without any problems at this stage.
    HOWEVER, I then opened up the struts-config pageflow diagram and tried running it from there, the project failed.
    After studying the struts-config file both before and after I had opened it within 1012 I found the following discrepancy:
    BEFORE: - - - - -
    <action path="/getParams" className="oracle.adf.controller.struts.actions.DataActionMapping" type="view.GetParamsAction" name="DataForm">
    AFTER: - - - - -
    <action path="/getParams" className="oracle.adf.controller.struts.actions.DataActionMapping" type="view.GetParamsAction" name="DataForm" parameter="unknown">
    After manually removing this line of code I was able to get the application to run again. However every time I edit/view the struts config file or indeed save changes and reboot JDeveloper the parameter="unknown" line is added again and prevents the project from running.
    3. After further investigative work following point 2. I came across what I believe to be a further bug.
    When I reopened JDeveloper I noticed that the struts-config pageflow diagram had changed. A dataAction had been replaced by a dataPage as well as the extra line of code being added as described in point 2. The pageflow diagram should be dataPage --> dataAction --> dataPage but now it was dataPage --> dataPage --> dataPage.
    After further investigation I found a descrepancy in the following file before and after I had opened it in 1012. The nominalHeaderXml4\ViewController\model\StrutsPageFlow.oxd_struts file changed from this ....
    <shape name="/getParams">
    <elemRef name="" value="3d2b2d0e-0104-1000-8008-c222e564ea8e::/getParams::StrutsDataAction" type="StrutsDataAction" class="o:b:CID"/>
    </shape>
    to this when I had opened it 1012.
    <shape name="/getParams">
    <elemRef name="" value="51d65a60-0104-1000-8003-c222e56470a8::/getParams::StrutsDataForwardAction" type="StrutsDataForwardAction" class="o:b:CID"/>
    </shape>
    I have speant the last 2 days looking into these problems. I have found that both points 2 and 3 happen consistantly when opening 9052 projects in the 1012 environment. And have elimated the following things when trying to get JDeveloper 9052 to work correctly, firewalls, antivirus, windows updates, and software conflicts. The only difference that I can identify is that my new machine uses a centrino chip and my old one used a P4.
    I hope that someone will be able to shed some light on these problems for me as soon as possible. Thanks in advance for your help.
    David
    David Ferguson

    The struts-related observation is noted in the JDeveloper 10.1.2 Release Note Addendum:
    http://www.oracle.com/technology/products/jdev/htdocs/10.1.2.0.0/readme_10.1.2.0.0_addendum.html#jan1
    For the 1st issue, I'd recommend opening a TAR with metalink so our worldwide support engineers can help diagnose the problem. I've not heard of any Centrino specific issues to date.

  • Hot swap and JSP debugging for Weblogic in exploded format?

    Hi,
    I'm trying to use JDeveloper for JSF development to be deployed to a weblogic server.
    I must say JDeveloper is a great tool for JSF development as none of the free IDE in the market can do what JDeveloper does.
    However, I have a question on hot swap and JSP debugging.
    I have managed to setup JDeveloper to debug my JSF application deploy to my Weblogic server's applications folder in exploded format.
    I can step through the java code.
    However, I didn't manage to do a hot swap and the break point set in the JSF-JSP does not seems to take effect.
    I would appreciate any advice on the problem.
    Thanks.
    Han Ming

    How did you setup the server to handle exploded format? Appreciate the help. Sorry can't help with your question though.
    Thnx.
    Soni

  • JDeveloper 10g: Preserving Translated JSP when making?

    Hello,
    Can anyone tell me how to get JDeveloper 10g to preserve JSP page translations (in the \classes\.jsps\ folder) when there is an error in the compile of the generated servlet?
    I am new to JSP development and I am getting an error when making a JSP page that says that the request and session variables are not available when using something like:
    <%! String var=(String) session.getAttribute("someAttribute"); %>
    I have not dissabled sessions using a page directive.
    I am hoping that I will gain a lot more insight by looking at the generated servlet code.
    Thank you,
    Rich

    Hi, the compilation of the JSPs before building the WAR file is a there to help you finding problems/errors before deployment. You should take them serious and resolve them before the deployment.
    What kind of errors do you get?
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • JDeveloper 10.1.3 encoding problem

    Hi,
    I'm from Brazil and while testing the new JDeveloper 10.1.3, this problem occurred when i started migration from JDeveloper 10.1.2.
    All my JSPs suddenly became strange, with weird characters, where supposed to be special characters, (like accents). I'm using encoding default on JDev(10.1.2), which was CP1252, in the version 10.1.3 the java classes are ok, but the jsp not. I already tried modifying the encoding options of the JDev but none work. The only solution i found is to open all the JSPs and replace those characters, this way JDev recognize them, which i insist are ok in other tools. Only in 10.1.3 i found these problems. In the help i found something related to the encoding of the files, which must be preserved, but it was pointless since i couldn't find any options for doing such thing
    thanks in advance

    Just one more statement to the thread since I am having similar trouble with greek encoding on Linux.
    First of all I think that it makes no difference how much you tamper with the environment --> encoding setting in JDev. In my case all parameters had the same value but the JSP text appeared mangled.
    As far as I have tested I found out that the only safe way to migrate JSP's from pervious versions of JDeveloper is
    a) Use a different editor (Kate from Linux KDE is just perfect) to verify that the encoding of the file is correct. In my case that would be Greek iso8859-7)
    b) Modify the JSP so that the first line looks like <%@ page contentType="text/html;charset=iso8859-7" %>
    c) Save the file making sure that it gets the right encoding.
    After that the file may be opened and modified correctly in the JDeveloper editor. I have found that was to only way to make DataEditComponent.jsp pages created with JDev 9i for BC4J projects run on 10.1.3
    The funny thing is that if you look at the property inspector, it still says that loadEncoding and saveEncoding have a value of UTF-8, which is probably false but ....
    Thanassis

  • Servlet and JSP in OAS

    I'm developing web application with OAS
    4.0.8.1 and JDeveloper 3.0 and I want to call
    JSP from servlet using "RequestDispatcher".
    I downloaded JSP for OAS from www.olab.com.
    In the Release note, there is a description
    about RequestDispatcher, but I cannot
    understand about details.
    In what configuration can I use servlet and
    JSP together with RequestDispatcher. Anyone
    scceeded about that?
    null

    wan (guest) wrote:
    : Hi everyone,
    : I am using OAS 4.0.8 on Solaris 2.6. After viewing servlet
    : and JSP samples, I am kind of confuse whether OAS supports the
    : following options
    : 1. JSP
    : 2. servlet chaining
    : 3. running JDeveloper DB Servlet wizard
    : (oracle.jdeveloper.servlet.*) and Java Business Objects
    : (oracle.jbo.rt.cs)
    : Thank you for your time.
    I found a white paper 408newfead.pdf, that says under "Future
    Directions" that it will add jsp support. I read somewhere (I
    can't remember where exactly :( ) that said 4.0.8.1 would
    support
    JSPs. I don't know if this release is out yet.
    I wish Oracle would get with the times and put out a product that
    is consistent with the technology they are touting as the
    future.
    Having us download Suns server to run servlets and JSP is
    ridiculous for the worlds second largest software company!
    null

  • Login Box example and source code on adf struts and JSP

    Dear all..
    I want to make application using ADF struts and JSP using oracle 10g Jdeveloper.
    The user should login into the login box and verify everyone who has right to enter the home.jsp.
    Anybody could help me with the source code as well as the step by step explanation...
    I'm looking forward the help...

    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/reviewer/viewlets/reviewer_struts_viewlet_swf.html

  • Are Oracle Java Serlet and JSP samples working in Oracle9i?

    Oracle web site provides many good Servlet and JSP samples. All
    the instructions talk about Oracle8i. Does anybody know for sure
    they are working under Oracle9i or not?
    Thanks!
    H.

    OTN has sample applications that demonstrate a range of JSP techniques, from basic to advanced. OTN provides two versions of the samples: one version is built to the Servlet 2.0 specification and runs under Oracle9iAS-JServ or JDeveloper, the other verion is built to the Servlet 2.2 specification and runs under the Oracle Servlet Engine (OSE) built into the Oracle8i database or the mod_ose module of Oracle9iAS.
    Regards,
    -rh

  • Dbc file and Jsp error

    Dear all,
    I am trying to do multinode installtion on AIX 5.3 HACMP . During post installation i am getting this error.
    Dbc file and Jsp error
    Updating Server Security Authentication
    java.sql.SQLException: Io exception: Invalid number format for port number
    Database connection to jdbc:oracle:thin:@host_name:port_number:database failed
    Updating Server Security Authentication failed with exit code 1
    adgendbc.sh exiting with status 1
    ERRORCODE = 1 ERRORCODE_END
    SQLPLUS Executable : /mglapp/oramgl/mglora/8.0.6/bin/sqlplus
    SP2-0642: SQL*Plus internal error state 2165, context 4294967295:0:0
    Unable to proceed
    ERRORCODE = 1 ERRORCODE_END
    Thanks in advance

    Maybe you have problem with the date format, please ensure that NLS_DATE_FORMAT env variable is set to a valid value.
    Please view SP2-0642: Sql*Plus Internal Error State 2165, Context 4294967295:0:0 Doc ID: Note:396154.1.
    Hope it helps.
    Adith

  • InterMedia Java Classes for Servlets and JSPs and Netscape

    I am using the interMedia Java Classes for Servlets and JSPs to upload and retrieve multimedia data. I have found that it is much more performant in Internet Explorer (5.5) than in Netscape Communicator (4.7). In fact, I cannot upload images larger than 10K at all using netscape. However, the same image can be uploaded into the same application using IE. Is this a known issue?
    Thanks in advance.

    Hi,
    We have successfully uploaded multimedia data in the giga-byte range (Quicktime and AVI files) at the same speed with both the Netscape (4.7n) and MS IE (4.n and 5.n) browsers. One thing we have noticed is that its very important to set the manual proxy settings correctly if you have an environment with a proxy server. If you don't, then uploads can go via the proxy server and, for some reason, that seems to take considerably longer. For example, suppose you are in the www.xyzco.com domain and are connecting to a host named webserver.www.xyzco.com, then specify webserver and webserver.www.xyzco.com (to cover both cases) in the "Do not use proxy servers for..." box in the manual proxy server configuration screen. Also, if you're using a tool such as JDeveloper that uses the host IP address in the debugger environment, then you also need to add the numeric-based (nnn.nnn.nnn.nnn) IP address to this list.
    Hope this helps.
    In order to better understand the variety of ways in which our customers are using interMedia, we'd be very interested in knowing a little more about your application, the interMedia functionality that you are using, and how you are developing and deploying your application. If you are able to help us, please send a short email message with some information about your application, together with any comments you may have, to the Oracle interMedia Product Manager, Joe Mauro, at [email protected] Thank you!
    Regards,
    Simon
    null

Maybe you are looking for

  • Adobe Reader 11.0.04 incompatible with Windows 7

    Downloaded Adobe Reader 11.0.04 it is incapatible with Windows 7 professional (64 bit).  When starting the program, it  will open for about 2-3 seconds then closes.  unable to access the edit tab or other tabs to change settings.  already tried with

  • Is there a workaround for bug 6648001 ?

    In the evaluation part of the description of the bug a "suggested fix" is mentioned. But what is this fix? I currently have an Applet which tries to access a password protected resource. If I click cancel in the password dialog, leave the page and go

  • Final Cut Studio - Adding Transitions

    First off, I'm really new to Final Cut Pro... but very experienced in most other pro level Photo and Vector software. I'm following a video tutorial to learn the software, but I keep getting the "Dropped Frames" Error when I add effects. The way I'm

  • FLAC audio files in iTunes - How should I convert?

    I want to put some FLAC recordings/audio/songs I have in my iTunes. Unless I'm misunderstanding something, iTunes will not accept that format. Does anyone have a suggestion for the best way to re-format those files to something iTunes will accept (li

  • How to use PIVOT for varchar field

    Have data (records) as such: Joe, Smith, PersonType1 Joe, Smith, PersonType2 Joe, Smith, PersonType3 Joe, Smith, PersonType4 Joe, Smith, PersonType5 However need to present it within ONE row per/Person with the PersonType in columns within this same