tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Collins" <michael_collin...@hotmail.com>
Subject RE: HELP WITH FIRST APPLICATION............Anyone?.
Date Sat, 20 Jan 2001 18:59:42 GMT
<html><DIV>
<P>Here is the .java file (bean). There is a getPrice method and it is declared public.</P></DIV>
<DIV>package Price;</DIV>
<DIV>public class PriceHandler{</DIV>
<DIV>&nbsp;&nbsp;&nbsp; private String thePrice;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp; public PriceHandler() {&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thePrice
= null;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;public void setPrice( String
Price ) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
thePrice = Price; <BR>&nbsp;&nbsp;&nbsp; }&nbsp; <BR>&nbsp;&nbsp;&nbsp;
public String getPrice() {&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return thePrice;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;
}</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here is what I have in the JSP file</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;%@ page import="Price.PriceHandler" %&gt;</DIV>
<DIV>&lt;jsp:useBean id="pricebean" scope="page" class="Price.PriceHandler" /&gt;<BR>&lt;jsp:setProperty
name="pricebean" property="*" /&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>?????</DIV>
<DIV></DIV>
<DIV></DIV>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&gt;From: Damian Penney <DPENNEY@ISLCO.COM></P>
<DIV></DIV>&gt;Reply-To: tomcat-user@jakarta.apache.org 
<DIV></DIV>&gt;To: tomcat-user@jakarta.apache.org 
<DIV></DIV>&gt;Subject: RE: HELP WITH FIRST APPLICATION............Anyone?.

<DIV></DIV>&gt;Date: Sat, 20 Jan 2001 10:42:10 -0800 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Okay well tomcat is working fine the problem lies in the code,
have you 
<DIV></DIV>&gt;imported the PriceHandler bean ? Does it have a getPrice method
? Is the 
<DIV></DIV>&gt;method public ? 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Damian 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; Error: 500 
<DIV></DIV>&gt; Location: /project/jsp/set_cost.jsp 
<DIV></DIV>&gt; Internal Servlet Error: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;org.apache.jasper.JasperException: Cannot find any information
on property 
<DIV></DIV>&gt;'Price' in a bean of type 'Price.PriceHandler' 
<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.jasper.runtime.JspRuntimeLibrary.getReadMethod(JspRuntimeLibrary.

<DIV></DIV>&gt;java, Compiled Code) 
<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerato

<DIV></DIV>&gt;r.java:101) 
<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(J

<DIV></DIV>&gt;spParseEventListener.java, Compiled Code) 
<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventLi

<DIV></DIV>&gt;stener.java, Compiled Code) 
<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseE

<DIV></DIV>&gt;ventListener.java:175) 
<DIV></DIV>&gt; at org.apache.jasper.compiler.Compiler.compile(Compiler.java,
Compiled 
<DIV></DIV>&gt;Code) 
<DIV></DIV>&gt; at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)

<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)

<DIV></DIV>&gt; at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)

<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe

<DIV></DIV>&gt;rvlet.java:152) 
<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja

<DIV></DIV>&gt;va:164) 
<DIV></DIV>&gt; at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)

<DIV></DIV>&gt; at org.apache.jasper.servlet.JspServlet.service(JspServlet.java,
Compiled 
<DIV></DIV>&gt;Code) 
<DIV></DIV>&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

<DIV></DIV>&gt; at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)

<DIV></DIV>&gt; at org.apache.tomcat.core.Handler.service(Handler.java:286)

<DIV></DIV>&gt; at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79

<DIV></DIV>&gt;7) 
<DIV></DIV>&gt; at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)

<DIV></DIV>&gt; at 
<DIV></DIV>&gt;org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC

<DIV></DIV>&gt;onnectionHandler.java:210) 
<DIV></DIV>&gt; at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,

<DIV></DIV>&gt;Compiled Code) 
<DIV></DIV>&gt; at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,

<DIV></DIV>&gt;Compiled Code) 
<DIV></DIV>&gt; at java.lang.Thread.run(Thread.java:479) 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; &gt;From: Damian Penney 
<DIV></DIV>&gt; &gt;Reply-To: tomcat-user@jakarta.apache.org 
<DIV></DIV>&gt; &gt;To: tomcat-user@jakarta.apache.org 
<DIV></DIV>&gt; &gt;Subject: RE: HELP WITH FIRST APPLICATION............Anyone?.

<DIV></DIV>&gt; &gt;Date: Sat, 20 Jan 2001 09:40:36 -0800 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;Sounds as though you have covered everything, CVS
is a source control 
<DIV></DIV>&gt;system 
<DIV></DIV>&gt; &gt;that you don't have to worry about, not sure what
build.xml is but my 
<DIV></DIV>&gt;apps 
<DIV></DIV>&gt; &gt;are coming along fine and I've never touched it :)
You may need a web.xml 
<DIV></DIV>&gt; &gt;file in the web-inf dir, just copy one from the examples.

<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;Are you getting any specific errors ? 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;Damian 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;-----Original Message----- 
<DIV></DIV>&gt; &gt;From: Michael Collins [mailto:michael_collins76@hotmail.com]

<DIV></DIV>&gt; &gt;Sent: Saturday, January 20, 2001 9:29 AM 
<DIV></DIV>&gt; &gt;To: tomcat-user@jakarta.apache.org 
<DIV></DIV>&gt; &gt;Subject: Fwd: HELP WITH FIRST APPLICATION............Anyone?.

<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;Hi all, 
<DIV></DIV>&gt; &gt;Im new to tomcat and am unsure of a couple of things.

<DIV></DIV>&gt; &gt;I have installed some of the examples and they work
away on 
<DIV></DIV>&gt; &gt;httP:\\localhost8080 etc. 
<DIV></DIV>&gt; &gt;I have started my own project for which I have developed
all the HTML 
<DIV></DIV>&gt;pages. 
<DIV></DIV>&gt; &gt;I have converted the relevant pages to .jsp developed
beans for one of 
<DIV></DIV>&gt;the 
<DIV></DIV>&gt; &gt;pages and compiled them to .class. I have gone over
the documentation and 
<DIV></DIV>&gt; &gt;just want to know how to structure the directories.

<DIV></DIV>&gt; &gt;Say I put everything into a folder called project
right? 
<DIV></DIV>&gt; &gt;This folder goes into the webapps folder right? 
<DIV></DIV>&gt; &gt;Now inside in the project folder I have my web-inf
folder, inside in that 
<DIV></DIV>&gt; &gt;folder I have a classes folder and inside in that
I have my beans (.java 
<DIV></DIV>&gt;and 
<DIV></DIV>&gt; &gt;.class) in there? 
<DIV></DIV>&gt; &gt;I modify server.xml to look like this 
<DIV></DIV>&gt; &gt; &gt; docBase="c:/tomcat/webapps/project" 
<DIV></DIV>&gt; &gt; debug="0" 
<DIV></DIV>&gt; &gt; reloadable="true" 
<DIV></DIV>&gt; &gt; trusted="false" &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;Is this all I have to do? 
<DIV></DIV>&gt; &gt;I read the documentation and there is all other weird
stuff that I dont 
<DIV></DIV>&gt; &gt;understand. 
<DIV></DIV>&gt; &gt;Whats the build.xml thing about and the cvs, do I
have to do something 
<DIV></DIV>&gt;with 
<DIV></DIV>&gt; &gt;them? 
<DIV></DIV>&gt; &gt;Could someone please just give me a step in the right
direction, once I 
<DIV></DIV>&gt;get 
<DIV></DIV>&gt; &gt;one application working, Ill be delighted. 
<DIV></DIV>&gt; &gt;A big thanks in advance, 
<DIV></DIV>&gt; &gt;Michael 
<DIV></DIV>&gt; &gt;_________________________________________________________________________

<DIV></DIV>&gt; &gt;Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com. 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;---------------------------------------------------------------------

<DIV></DIV>&gt; &gt;To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org

<DIV></DIV>&gt; &gt;For additional commands, email: tomcat-user-help@jakarta.apache.org

<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt;---------------------------------------------------------------------

<DIV></DIV>&gt; &gt;To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org

<DIV></DIV>&gt; &gt;For additional commands, email: tomcat-user-help@jakarta.apache.org

<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;----------------------------------------------------------------------------

<DIV></DIV>&gt;-- 
<DIV></DIV>&gt; Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; ---------------------------------------------------------------------
To 
<DIV></DIV>&gt;unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For 
<DIV></DIV>&gt;additional commands, email: tomcat-user-help@jakarta.apache.org

<DIV></DIV><br clear=all><hr>Get Your Private, Free E-mail from MSN
Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p></html>

Mime
View raw message