SIMPLE JSP PROBLEM- HELP

I have a jsp with which is created dynamically from a java class, now as I m navigating around I have few other pages with back button, now everytime I try the back button, the browser or my own, it keeps saying session timeout, and referesh the page. this is my back button.
input type="button" value="Back" onClick="history.go(-1)" class="unnamed1">
any ideas why this is happening? I just a little note it happens sometimes and other time its fine.

Sorry just making some changes to the post: I get Warning: Page has Expired , I need to referesh the page. when i press refresh i get the page back i get the page back> the pages is created from a drop downlist which produced more then one page of result if the user goes to 2nd page and presses the back button to come to the orginal page that when I get the warning.

Similar Messages

  • Relativley simple jsp problem

    I'm working in a small project and part of it is when a user registers,
    there details are checked for errors (eg null value). If there is an error
    it should appear on screen if there is not it should forward to
    a confirmation page from the register page. A simple example of the code
    on both pages appears below. At the moment it is not working. I would appreciate
    any help
    JSP #1: exampleregister.jsp
    form name="form1" method="post" action="/exampleregister.jsp">
    <p>USERNAME:
    <input type="text" name="username">
    <p>AGE:
    <input type="text" name="age">
    <p>
    <input type="submit" name="submit" value="submit">
    </form>
    <p>
    <%if (request.getParameter("submit") != null) { %>
    <% if (request.getParameter("username") == null) {%>
    <br>must show user name     
    <% if (request.getParameter("age") == null) {%>
    <br> must show age
    <%}else{%>
         <jsp:forward page="/exampleconfirm.jsp" />
    <% } %>
    <% } %>
    <% } %>
    <p>
    JSP #2: exampleconfirm.jsp
    <body bgcolor="#FFFFFF" text="#000000">
    Details entered =
    <form name="form1" method="post" action="">
    <p>Username:
    <input type="text" name="username" value="<%=request.getParameter("username")%>">
    </p>
    <p>Age:
    <input type="text" name="age" value="<%=request.getParameter("age")%>">
    </p>
    <p>
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    Anybody any ideas where I'm going wrong??

    Hi,
    Try replacing exampleregister.jsp with this code:
    <form name="form1" method="post" action="/exampleregister.jsp">
    <p>USERNAME:
    <input type="text" name="username" value="<%=request.getParameter("submit")==null?"":request.getParameter("username")%>">
    <p>AGE:
    <input type="text" name="age" value="<%=request.getParameter("submit")==null?"":request.getParameter("age")%>">
    <p>
    <input type="submit" name="submit" value="submit">
    </form>
    <p>
    <%
    boolean doForward = true;
    if (request.getParameter("submit") != null) { %>
    <% if (request.getParameter("username").length() == 0) {%>
    <br>must show user name
    <% doForward = false;}
    if (request.getParameter("age").length() == 0) {
         doForward = false;
         %><br> must show age<%
    else doForward = false;
    if (doForward){%>
    <jsp:forward page="/exampleconfirm.jsp" />
    <%}%>
    <p>
    Hope this helps,
    Kurt.

  • LINUX JSP  problem, HELP !!!

              We are running Weblogic 5.1 with Service pack 5 on LINUX
              and are getting the following error , when trying to run the
              JSP which was working on Weblogic 5.1 on NT !
              Mon Oct 02 12:04:18 EDT 2000:<I> <ServletContext-General> Generated java file: /usr/local/weblogic/myserver/vivecaservlets/jsp_servlet/_viveca/_login.java
              Mon Oct 02 12:04:19 EDT 2000:<E> <ServletContext-General> Compilation of /usr/local/weblogic/myserver/vivecaservlets/jsp_servlet/_viveca/_login.java failed: /usr/local/weblogic/myserver/vivecaservlets/jsp_servlet/_viveca/_login.java:92: Wrong number of arguments in constructor.
              throw new ServletException("Caught Exception on JSP: " + getClass().getName(), __ee);
              ^
              1 error
              java.io.IOException: Compiler failed executable.exec([Ljava.lang.String;[/usr/local/jdk1.2.2/bin/javac, -classpath, /usr/local/jdk1.2.2/jre/lib/rt.jar:/usr/local/jdk1.2.2/jre/lib/i18n.    :./lib/weblogic510sp5boot.jar:./classes/boot:./eval/cloudscape/lib/cloudscape.jar:./lib/weblogic510sp5.jar:./classes:./license:./lib/weblogicaux.jar:./myserver/serverclasses:/home/weblogic/testbed:/usr/local/weblogic/myserver/tmp_deployments/ejbjar8364.jar:/usr/local/weblogic/myserver/tmp_deployments/ejbjar8365.jar:/usr/local/weblogic/myserver/tmp_deployments/ejbjar8366.jar:/usr/local/weblogic/classes/com/viveca/cps/uicontroller;/usr/local/weblogic/myserver/servletclasses:/usr/local/weblogic/myserver/vivecaservlets, -d, /usr/local/weblogic/myserver/vivecaservlets, /usr/local/weblogic/myserver/vivecaservlets/jsp_servlet/_viveca/_login.java])
              at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java, Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java, Compiled Code)
              at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:293)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:760)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java, Compiled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              amitiés,
              Gaurav
              

              I knew that we had a problem with the Classpath
              (ServletException(param1,param2) not compiling !!! )
              But i tried changing all the classpath
              a) The SHELL's classpath
              b) The weblogic and java classpath for the startWeblogic.sh
              script
              but it still does not compile ! Any Ideas !!!
              amitiés,
              Gaurav.
              "Cameron Purdy" <[email protected]> wrote:
              >The classpath contains SerlvetException.class (perhaps in a .JAR) that is
              >the wrong version.
              >
              >--
              >
              >Cameron Purdy
              >[email protected]
              >http://www.tangosol.com
              >WebLogic Consulting Available
              >
              >
              >"Gaurav Bora" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> We are running Weblogic 5.1 with Service pack 5 on LINUX
              >> and are getting the following error , when trying to run the
              >> JSP which was working on Weblogic 5.1 on NT !
              >>
              >>
              >> Mon Oct 02 12:04:18 EDT 2000:<I> <ServletContext-General> Generated java
              >file:
              >/usr/local/weblogic/myserver/vivecaservlets/jsp_servlet/_viveca/_login.java
              >> Mon Oct 02 12:04:19 EDT 2000:<E> <ServletContext-General> Compilation of
              >/usr/local/weblogic/myserver/vivecaservlets/jsp_servlet/_viveca/_login.java
              >failed:
              >/usr/local/weblogic/myserver/vivecaservlets/jsp_servlet/_viveca/_login.java:
              >92: Wrong number of arguments in constructor.
              >> throw new ServletException("Caught Exception on JSP: " +
              >getClass().getName(), __ee);
              >> ^
              >> 1 error
              >>
              >> java.io.IOException: Compiler failed
              >executable.exec([Ljava.lang.String;[/usr/local/jdk1.2.2/bin/javac, -classpat
              >h, /usr/local/jdk1.2.2/jre/lib/rt.jar:/usr/local/jdk1.2.2/jre/lib/i18n.
              >:./lib/weblogic510sp5boot.jar:./classes/boot:./eval/cloudscape/lib/cloudscap
              >e.jar:./lib/weblogic510sp5.jar:./classes:./license:./lib/weblogicaux.jar:./m
              >yserver/serverclasses:/home/weblogic/testbed:/usr/local/weblogic/myserver/tm
              >p_deployments/ejbjar8364.jar:/usr/local/weblogic/myserver/tmp_deployments/ej
              >bjar8365.jar:/usr/local/weblogic/myserver/tmp_deployments/ejbjar8366.jar:/us
              >r/local/weblogic/classes/com/viveca/cps/uicontroller;/usr/local/weblogic/mys
              >erver/servletclasses:/usr/local/weblogic/myserver/vivecaservlets, -d,
              >/usr/local/weblogic/myserver/vivecaservlets,
              >/usr/local/weblogic/myserver/vivecaservlets/jsp_servlet/_viveca/_login.java]
              >)
              >> at
              >weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.jav
              >a, Compiled Code)
              >> at
              >weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java,
              >Compiled Code)
              >> at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:293)
              >> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              >> at
              >weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java,
              >Compiled Code)
              >> at
              >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              >, Compiled Code)
              >> at
              >weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              >l.java:760)
              >> at
              >weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              >l.java, Compiled Code)
              >> at
              >weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              >Manager.java, Compiled Code)
              >> at
              >weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java,
              >Compiled Code)
              >> at
              >weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java, Compiled
              >Code)
              >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              >Code)
              >>
              >> amitiés,
              >> Gaurav
              >>
              >
              >
              

  • Help regarding a simple JSP file and servlet file

    Hi all,
    I am trying to develop a web based application using Tomca 5.0.16.I wanted to get to know how a simple jsp page could access a servlet.It would be really very beneficial if if any one can give me a sample code that does the interactions,I could run it and understand it,would help me for further development.
    Any help would be appreciated
    Thanks
    AS

    I think it depends on how you want to access the servlet.
    You can forward or redirect from the JSP page to the servlet, thus making it like you went to the servlet directly from the browser (except of course, before the forward or redirect, some stuff can be done).
    You can use URLConnection objects to call the servlet, much like the browser does.
    It depends on what you are trying to do.

  • Simple OOP Problem. Help!

    This is just a simple OOP problem that i cant decide on a best
    implementation for.
    im passing an object to an instance of, 'TabbedFrame', which is just
    a frame with a Tabbed Pane in it that is holding custom panels.
    however, these custom panels need access to the object being
    passed to 'TabbedFrame' and to some methods in it.
    i cant make them static however so how do i gain access to them?
    is my only option to pass the 'TabbedFrame' to each panel?
    like - jtabbedpane.add( "Panel 1", new mypanel1(this));
    here is code:
    new TabbedFrame( DataObject );
    public class TabbedFrame{
    public TabbedFrame(DataObject do){
    this.do = do;
    jtabbedpane.add( "Panel 1", new mypanel1() );
    DataObject do;
    public class mypanel1{
    public mypanel1(){
    // need access to DataObject of the 'TabbedFrame' object that instantiated
    // this 'mypanel1' and to some of its methods
    }i would just pass the DataObject to evey panel (there are 12) but
    i also need to be able to call methods in the 'TabbedFrame'.
    Any help would be appreciated!

    Modify mypanel1's constructor:
    public class mypanel1{
    TabbedFrame tf;
    public mypanel1(TabbedFrame tf){
    this.tf = tf;
    // need access to DataObject of the 'TabbedFrame' object that instantiated
    // this 'mypanel1' and to some of its methods
    DataObject theDo = tf.getDataObject();
    tf.someMethod(); // Call method on the TabbedFrame
    }In TabbedFrame:
    public TabbedFrame(DataObject do){
    this.do = do;
    // Modify call to constructor to pass "this" TabbedFrame.
    jtabbedpane.add( "Panel 1", new mypanel1(this) );
    }

  • Simple JSP example problems

    Hello, I am new to JSP and I was wondering if I could get some help from some people that know what they are doing. I'm trying to run a simple JSP example that I got out of a book. But I've modified it a bit to just play around with it. But it doesn't want to run. I'm starting to think it's something wrong with the way I'm building/installing the stuff. I'm running IBM WebSphere 4 and JBuilder 8. I was just wondering if you could look at my code just to make sure I'm doing this right.
    It's a pretty simple example. A JSP calls a class to get a message to print out.
    Here's the code for the class: (HelloWorld.java)
    package helloworld;
    public class HelloWorld
    private String message = "No message specified";
    public String getMessage()
    return(message);
    public void setMessage(String message)
    this.message = message;
    =================================================================
    Here's the code for the JSP: (HelloWorld.jsp)
    <html>
    <head>
    <title>Using JavaBeans with JSP</title>
    </head>
    <body>
    <jsp:useBean id="helloWorld" class = "helloworld.HelloWorld" />
    <ol>
    <li>Initial Value (JSP Expression):
    <%= helloWorld.getMessage() %></li>
    <li><jsp:setProperty name="helloWorld"
    property="message"
    value="Hello World" />
    Value after setting property with setProperty:
    <jsp:getProperty name="helloWorld"
    property="message" /></li>
    </ol>
    </body>
    </html>
    I just wanted to be able to test out a JSP hitting a class file. Does someone have a better/easier way to do this? Or do you see anything wrong with my example? Thanks in advance.

    The 1 thing missing in your example is the import directive for the helloworld.HelloWorld class.
    Add the following line somewhere around the start of your jsp and things should be fine
    <%@ page import="helloworld.HelloWorld" %>
    Cheers

  • Help running a simple jsp (with struts and core -sun- taglibs)

    Hi, could somebody help me with this simple JSP?
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:c="http://java.sun.com/jsp/jstl/core"
         xmlns:html="http://struts.apache.org/tags-html">
    <head>
         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    </head>
    <body>
         <html:text property="text">text</html:text>
         <label>hello</label>
         <c:forEach begin="1" end="5">
              <label>inside</label>
         </c:forEach>
    </body>
    </html>When I run it, the c:forEach tag doesn’t work.
    Output shows “text hello inside” instead of desired “text hello inside inside inside inside inside”
    Any hints will be really appreciated.
    Edited by: 792625 on 03-sep-2010 0:15

    Add the JSTL Core tag library.
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

  • Problems with compilation of a Simple JSP

    Hello!
    This is a typical newbie problem with starting off on JDeveloper 3.0 (JDK 1.1.8) and Oracle 8i (8.1.1). When I create a simple JSP (The "Hello World" Jsp given in the File | New | Web Objects option) and try to run it - it gives me the following error :
    java.io.IOException CreateProcess : cmd.exe /C start "" "C:\PROGRAM FILES\ORACLE\JDEVELOPER 3.0\myprojects\WebAppRunner.html" error = 0
    Obviously the JSP does not run.
    Any pointers about what might be wrong?
    Regards
    Mona

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Mona Marathe ([email protected]):
    Hello!
    This is a typical newbie problem with starting off on JDeveloper 3.0 (JDK 1.1.8) and Oracle 8i (8.1.1). When I create a simple JSP (The "Hello World" Jsp given in the File | New | Web Objects option) and try to run it - it gives me the following error :
    java.io.IOException CreateProcess : cmd.exe /C start "" "C:\PROGRAM FILES\ORACLE\JDEVELOPER 3.0\myprojects\WebAppRunner.html" error = 0
    Obviously the JSP does not run.
    Any pointers about what might be wrong?
    Regards
    Mona<HR></BLOCKQUOTE>
    The above error message is likely due
    to JDeveloper looking for the NT command
    interpreter named CMD.EXE .
    I was able to run servlets with JDeveloper
    and Windows 98 by copying COMMAND.COM to
    C:\CMD.EXE, which was much easier to do
    than putting a new OS on my machine.
    Cheers,
    David

  • Help with simple jsp please

    Hi,
    I would like to know how to create a simple jsp to display some data from the database. I was able to create a bean to display the data from a table using the wizard. How do I put this bean's content into the jsp?
    Thanks,
    Charles Li

    Even better are the online tutorials that will take you step by step:
    http://www.oracle.com/technology/obe/obe9051jdev/index.htm
    Try the ADF Workshop one - it will show you most of what you need.

  • My simple jsp doesn't work: hhhelp

    hello i'm new to java.
    I'm testing a simple jsp with a javabean: Fruit.class
    When i test it , it seems there is a problem of package (but i really need help on this)...
    Here's the error i get:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\apache\jsp\confirm_jsp.java:44: cannot resolve symbol
    symbol : class Fruit
    location: class org.apache.jsp.confirm_jsp
    Fruit commandeFruit = null;
    ^
    here's the full error report
    Etat HTTP 500 -
    type Rapport d'exception
    message
    description Le serveur a rencontr� une erreur interne () qui l'a emp�ch� de satisfaire la requ�te.
    exception
    org.apache.jasper.JasperException: Impossible de compiler la classe pour la JSP
    Une erreur s'est produite � la ligne: 2 dans le fichier jsp: /confirm.jsp
    Erreur de servlet g�n�r�e:
        [javac] Compiling 1 source file
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\apache\jsp\confirm_jsp.java:44: cannot resolve symbol
    symbol  : class Fruit 
    location: class org.apache.jsp.confirm_jsp
          Fruit commandeFruit = null;
          ^
    Une erreur s'est produite � la ligne: 2 dans le fichier jsp: /confirm.jsp
    Erreur de servlet g�n�r�e:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\apache\jsp\confirm_jsp.java:46: cannot resolve symbol
    symbol  : class Fruit 
    location: class org.apache.jsp.confirm_jsp
            commandeFruit = (Fruit) _jspx_page_context.getAttribute("commandeFruit", PageContext.PAGE_SCOPE);
                             ^
    Une erreur s'est produite � la ligne: 2 dans le fichier jsp: /confirm.jsp
    Erreur de servlet g�n�r�e:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\apache\jsp\confirm_jsp.java:48: cannot resolve symbol
    symbol  : class Fruit 
    location: class org.apache.jsp.confirm_jsp
              commandeFruit = new Fruit();
                                  ^
    Une erreur s'est produite � la ligne: 16 dans le fichier jsp: /confirm.jsp
    Erreur de servlet g�n�r�e:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\apache\jsp\confirm_jsp.java:71: cannot resolve symbol
    symbol  : class Fruit 
    location: class org.apache.jsp.confirm_jsp
          out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString((((Fruit)_jspx_page_context.findAttribute("commandeFruit")).getNomFruit())));
                                                                            ^
    Une erreur s'est produite � la ligne: 17 dans le fichier jsp: /confirm.jsp
    Erreur de servlet g�n�r�e:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\apache\jsp\confirm_jsp.java:74: cannot resolve symbol
    symbol  : class Fruit 
    location: class org.apache.jsp.confirm_jsp
          out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString((((Fruit)_jspx_page_context.findAttribute("commandeFruit")).getCouleur())));
                                                                            ^
    Une erreur s'est produite � la ligne: 18 dans le fichier jsp: /confirm.jsp
    Erreur de servlet g�n�r�e:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\apache\jsp\confirm_jsp.java:77: cannot resolve symbol
    symbol  : class Fruit 
    location: class org.apache.jsp.confirm_jsp
          out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString((((Fruit)_jspx_page_context.findAttribute("commandeFruit")).getPrix())));
                                                                            ^
    Une erreur s'est produite � la ligne: 19 dans le fichier jsp: /confirm.jsp
    Erreur de servlet g�n�r�e:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\apache\jsp\confirm_jsp.java:80: cannot resolve symbol
    symbol  : class Fruit 
    location: class org.apache.jsp.confirm_jsp
          out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString((((Fruit)_jspx_page_context.findAttribute("commandeFruit")).getPoids())));
                                                                            ^
    7 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    note La trace compl�te de la cause m�re de cette erreur est disponible dans les fichiers journaux de Tomcat.
    --------------------------------------------------------------------------------

    hello i tried what you told me but it steel seems i've
    got 2 errors
    here's the error
    exception
    org.apache.jasper.JasperException: Impossible de
    compiler la classe pour la JSP
    Une erreur s'est produite � la ligne: 5 dans le
    fichier jsp: /confirm.jsp
    Erreur de servlet g�n�r�e:
    [javac] Compiling 1 source file
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\
    pache\jsp\confirm_jsp.java:6: <identifier> expected
    import full.package.name.Fruit;
    ^
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\_\org\
    pache\jsp\confirm_jsp.java:47: cannot resolve symbol
    symbol  : class Fruit 
    location: class org.apache.jsp.confirm_jsp
    Fruit commandeFruit = null;
    ^--------------------------------------
    here's my jsp:
    <%-- confirm.jsp --%>
    <%@ page import="full.package.name.Fruit" %>
    <jsp:useBean id="commandeFruit" class="Fruit" />
    <jsp:setProperty name="commandeFruit"
    property="nomFruit" value="Mangue" />
    <jsp:setProperty name="commandeFruit"
    property="couleur" value="Orange" />
    <jsp:setProperty name="commandeFruit" property="prix"
    value="5.95" />
    <jsp:setProperty name="commandeFruit" property="poids"
    param="saisie_poids" />
    <HTML>
    <body>
    <h1>Votre commande de fruit (confirm.jsp)</h1>
    <br>
    Fruit : <jsp:getProperty name="commandeFruit"
    property="nomFruit"/><br>
    Couleur : <jsp:getProperty name="commandeFruit"
    property="couleur" /><br>
    Prix au kg : <jsp:getProperty name="commandeFruit"
    property="prix" /> Euros<br>
    Quantit� : <jsp:getProperty name="commandeFruit"
    property="poids" /><br>
    Total
    :�<%=commandeFruit.getPrix()*commandeFruit.getPoid
    () %> Euros<p></p>
    Revenir � la commande pour
    la modifier
    </body>
    </html>
    First error is becoz you are using word package which is a standard identifier. So you have to change ur folder name to smething else other than package.
    Second error is becoz of the first error. If the forst error is fixed second error will not occur.
    Thanks
    KM

  • Real simple xslt problem/question

    Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name. i want to use xslt to reproduce exactly the same xml document except with an attribute called "id" added to those elements with a "result" tag name. i'm sure that theres a simple solution to it but i just cant figure it out. any helps greatly appreciated, thanks

    Start with the XSLT identity transform (I don't have it handy and it's fairly long, but you should be able to google it up). Add this:<xsl:template match="result">
      <result id="">
        <xsl:apply-templates>
      </result>
    </xsl:template>

  • Best way to create, modify, XML with JSP ?  HELP

    Hi friends,
    As i am new to XML,
    I know there are two APIs used for XML processing, i want to know as a begineer level, which API
    is easy and good to implement XML with JSP.
    1) SAX
    2) DOM
    i want to make a log file in XML, so on web page it will be displayed on HTML form through XSL.
    Since there is good tutorial on http://www.w3schools.com/dom
    but i think its HTML dom
    I want XML procession through JAVA CODE , what should i use ? and give some good tutorials on XML DOM
    that is used with JAVA / JSP.
    HELP.
    Edited by: Ghanshyam on Sep 19, 2007 3:24 PM

    Well what i think is you gonna checkout with your requirements before implementing any of the popular XML parsing mechnisms.
    If you are intrested in faster processing @sacrifising a gud amount of your Memory,DOM is the one which you are looking for.
    If you are instrested in Managing your memory and but if you are ok with sacrifising speed SAX is the best solution.it works on what is called a push technology.
    and if you think either way you might have to look towards a pull parser which is StAX (Streaming API for XML Parsing)
    it'd be a gr8 idea if you can go through the below article which explians about each of the parsing mechanisms
    http://www.stylusstudio.com/xml/parser.html#*
    coming back to helpful resources as far java is concern checkout the below link which might be of some help.
    and the main thing is that all of these parser there is a defined specification you might find implementations of different vendors on this.
    eg:Sun Provides one with JDK itself,same as IBM provides one,oracle does the same & so on...
    your first task would be to focus on one such implementation which can cater your requirements.
    DOM:*
    Basic Parsing Objects / Interfaces Involved while DOM parsing:
    http://www.w3.org/TR/DOM-Level-2-Core/java-binding.html
    Breif Overview & few important API details:
    http://www.developerlife.com/domintro/default.htm
    Simple Example:
    http://www.brics.dk/~amoeller/XML/programming/domexample.html
    Others:
    http://www.roseindia.net/xml/dom/
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM.html#wp79994
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/dom/1_read.html
    SAX:*
    http://www.javacommerce.com/displaypage.jsp?name=saxparser1.sql&id=18232
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/index.htm
    http://java.sun.com/developer/Books/xmljava/ch03.pdf
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPSAX.html#wp69937
    http://www.onjava.com/pub/a/onjava/excerpt/java_xslt_ch5/index.html?page=6
    StAX:*
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP2.html
    http://javaboutique.internet.com/tutorials/stax/
    http://today.java.net/pub/a/today/2006/07/20/introduction-to-stax.html
    Hope this might be of some help :)
    REGARDS,
    RaHuL
    http://weblogs.java.net/blog/spericas/archive/2006/04/sun_stax_parser.html

  • Another simple classpath problem question

    Hi All
    Yes I know, there are a lots of questions about this matter, but I couldn't found a solution to my problem.
    I have a simple program:
    public class prueba {
            public static void main(String[] args) {
                    System.out.println("Ahi va...");
    }placed in /tmp/javier/prueba.java
    After compiled, I've tried to run it from / and then problems started:
    cd /
    java /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    I said, ok...it could be a classpath problem...then:
    java -cp /tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba
    Damn, another try...
    java -cp .:/tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Jesus Christ....may be the last slash....
    java -cp .:/tmp/javier /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Oh...no.... may be classpath to java classes..
    java -cp .:/usr/java/j2sdk1.4.2_01/lib/jre/:/tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Well, I don't know why this error happens....
    Please, could somebody help me !!!
    Thanks in advance...
    <jl>

    It's not too early to start following the Sun coding
    conventions for Java:
    http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.
    tmlHi
    thanks for your reply.
    Yes, I agree. I use conventions with my programs. But my real problem was with a real application and then I did quickly this simple code to help others to understand the problem and give a fast reply...
    Let me know if that works. (It was fine on my
    machine.) - MODYes it works fine, thanks.... and Damn...Murphys law again, the only option I didn't tried is the solution to my problem... :)
    Thanks again...

  • JDeveloper 3.1 ocijdbc8 problem (help!)

    Hi,
    I am trying to connect to an Oracle databse via JDeveloper 3.1. When I use the menu:
    Tools->Connections->(new window) Edit -> Test connection
    I keep getting an error saying "No ocijdbc8 in java.library.path"
    I am sure this is a simple configuration problem but it just will not go away, no matter where I copy the ocijdbc8.dll file to.
    Can anybody help! I am getting desparate.
    Regards.

    install the Oracle8i client on your machine, and make sure that
    <ORACLE_HOME> is set correctly. (From The Tools->IDE Options and click on the environment TAB ) and select an ORACLE_HOME from the List Box)
    or
    Exit from JDeveloper and edit the jdeveloper.ini file which is located in
    <J Developer Home>\bin.
    Modify the entries:
    JLP=-Djava.library.path=.;%JAVA_ROOT%\bin;%JAVA_ROOT%\jre\bin
    SLP=-Dsun.boot.library.path=.;%JAVA_ROOT%\bin;%JAVA_ROOT%\jre\bin
    to include the Oracle Bin directory. For example:
    JLP=-Djava.library.path=.;%JAVA_ROOT%\bin;%JAVA_ROOT%\jre\bin;D:\ORA8i\BIN
    SLP=-Dsun.boot.library.path=.;%JAVA_ROOT%\bin;%JAVA_ROOT%\jre\bin;D:\ORA8i\BIN
    null

  • Create and deploy simple JSP

    Hi,
    I need to create simple JSP pages and deploy it to SAP J2EE engine.. what is the procedure?...I may later add some businness logic but not needed for now.
    Please help
    Thanks,
    Jai

    Hi Jai Paul,
    You would need to have the Netweaver Developer Studio installed. It is the IDE based on eclipse where you can develop applications and deploy onto the server.
    Chk out the following links. It has some tutorials and also explains the entire process of developing & deploying applications onto the portal.
    http://help.sap.com/saphelp_nw70/helpdata/en/83/4baa42cdccda11e10000000a155106/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0d/1e3d41536ff323e10000000a155106/content.htm
    Regards,
    Abhishek

Maybe you are looking for