Error using JSP Templates

2003-02-28 Thread Percival Bragg
I am still trying to find my way around JSP and am
trying to use JSP Templates. I have coded all the
template tags and tried accessing it on Tomcat.

The file accessed in the url is DesktopDefault.asp and
the template file is Template.jsp. Both are in the
same folder. I am getting errors as shown in
errors.txt.

I suspect the compiled servlet for Template.jsp is not
being created because the java file in Tomcat is
empty.

I have tried putting the template name in the insert
tag as 'Template.jsp', '/Template.jsp' and
'../Template.jsp', I suspected it could't find the
Template.jsp file.

Any help would be greatly appreciated. I have attached
the files mentioned to this email.

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/HTTP Status 500 - 



type Exception report

message 

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception 

org.apache.jasper.JasperException: tags.templates.InsertTag
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)


root cause 

javax.servlet.ServletException: tags.templates.InsertTag
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:530)
at org.apache.jsp.DesktopDefault_jsp._jspService(DesktopDefault_jsp.java:62)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 

Error using JSP Templates

2003-02-28 Thread Percival Bragg
)





Apache Tomcat/4.1.18
--- Percival Bragg [EMAIL PROTECTED] wrote:
 I am still trying to find my way around JSP and am
 trying to use JSP Templates. I have coded all the
 template tags and tried accessing it on Tomcat.
 
 The file accessed in the url is DesktopDefault.asp
 and
 the template file is Template.jsp. Both are in the
 same folder. I am getting errors as shown in
 errors.txt.
 
 I suspect the compiled servlet for Template.jsp is
 not
 being created because the java file in Tomcat is
 empty.
 
 I have tried putting the template name in the insert
 tag as 'Template.jsp', '/Template.jsp' and
 '../Template.jsp', I suspected it could't find the
 Template.jsp file.
 
 Any help would be greatly appreciated. I have
 attached
 the files mentioned to this email.
 
 __
 Do you Yahoo!?
 Yahoo! Tax Center - forms, calculators, tips, more
 http://taxes.yahoo.com/ HTTP Status 500 - 
 


 
 type Exception report
 
 message 
 
 description The server encountered an internal error
 () that prevented it from fulfilling this request.
 
 exception 
 
 org.apache.jasper.JasperException:
 tags.templates.InsertTag
   at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
   at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   at

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
   at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
   at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
   at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
   at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
   at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
   at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   at

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
   at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
   at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
   at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
   at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
   at

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at

org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
   at

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
   at

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
   at

org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
   at

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
   at java.lang.Thread.run(Thread.java:536)
 
 
 root cause 
 
 javax.servlet.ServletException:
 tags.templates.InsertTag
   at

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:530)
   at

org.apache.jsp.DesktopDefault_jsp._jspService(DesktopDefault_jsp.java:62)
   at

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
   at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
   at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295

Re: More info on custom tag problem

2003-02-24 Thread Percival Bragg
Thanks for your help on the custom tag error problem.
When I move the application from the ROOT/ folder to
the webapps folder everything worked fine. I am new to
JSP and tomcat and have been putting all my
applications under ROOT and everything worked fine
before this. WHY?

--- Bill Barker [EMAIL PROTECTED] wrote:
 
 Percival Bragg [EMAIL PROTECTED] wrote in
 message

news:[EMAIL PROTECTED]
  The following are the current files and the error
 from
  tomcat that I received in trying my first custom
 tag.
 
   The following is the java class for the custom
 tag.
  package com.braggonline.portal;
 
  import java.io.*;
  import javax.servlet.jsp.tagext.*;
  import javax.servlet.jsp.*;
 
  public class bannerTag extends TagSupport {
 
  public int doEndTag() throws JspException {
 
  StringBuffer out = new StringBuffer();
 
  out.append(table width=quot;100%quot;
  cellspacing=quot;0quot; class=quot;HeadBgquot;
  border=quot;0quot;);
  out.append(tr valign=quot;topquot;);
  out.append(td colspan=quot;3quot;
  class=quot;SiteLinkquot;
  background=quot;images/bars.gifquot;
  align=quot;rightquot;);
  out.append(span
  id=quot;Banner_WelcomeMessagequot;
  style=quot;color:#EE;quot;/span);
  out.append(a href=quot;index.htmlquot;
  class=quot;SiteLinkquot;Braggonline Home/a);
  out.append(span
  class=quot;Accentquot;|/span);
  out.append(a href=quot;index.htmlquot;
  target=quot;_blankquot;
  class=quot;SiteLinkquot;Site Map/a);
  out.append(span
  class=quot;Accentquot;|/span);
  out.append(a href=quot;index.htmlquot;
 

target=quot;_blankquot;class=quot;SiteLinkquot;Logoff/a);
  out.append(nbsp;nbsp;/td/tr);
  out.append(trtd width=quot;10quot;
  rowspan=quot;2quot;nbsp;/td);
  out.append(td height=quot;40quot;);
  out.append(span
 id=quot;Banner_siteNamequot;
  class=quot;SiteTitlequot;BraggOnline
  Portal/span/td);
  out.append(td align=quot;centerquot;
  rowspan=quot;2quot;nbsp;/td/tr);
  out.append(trtd);
  out.append(table id=quot;Banner_tabsquot;
  class=quot;OtherTabsBgquot;
  cellspacing=quot;0quot; border=quot;0quot;
 
 style=quot;border-collapse:collapse;quot;tr);
  out.append(td class=quot;TabBgquot;
 

style=quot;border-width:1px;border-style:solid;height:25px;quot;);
  out.append(nbsp;span
 

class=quot;SelectedTabquot;Home/spannbsp;/td);
  out.append(td
 

style=quot;border-width:1px;border-style:solid;height:25px;quot;nbsp;a
 

href=quot;http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=1tabid
 =2quot;
  class=quot;OtherTabsquot;JSP/a/td);
  out.append(td
 

style=quot;border-width:1px;border-style:solid;height:25px;quot;nbsp;a
 

href=quot;http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=2tabid
 =3quot;
  class=quot;OtherTabsquot;JavaBeans/a/td);
  out.append(td
 

style=quot;border-width:1px;border-style:solid;height:25px;quot;nbsp;a
 

href=quot;http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=3tabid
 =4quot;
 
 class=quot;OtherTabsquot;Discussions/a/td);
  out.append(td
 

style=quot;border-width:1px;border-style:solid;height:25px;quot;nbsp;a
 

href=quot;http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=4tabid
 =5quot;
  class=quot;OtherTabsquot;About the
  Portal/a/td);
  out.append(/tr/table);
  try {
  pageContext.getOut().print(Got Here);
  } catch (Exception e) {
  throw new JspException(e.toString());
  }
  return EVAL_PAGE;
  }
  }
 
  The following is the TLD file.
  ?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-version1.0/tlib-version
  jsp-version1.2/jsp-version
  short-namePortalTags/short-name
  descriptionTags for dynamic creation of portal
  pages./description
  tag
  namebanner/name
 
 

tag-classcom.braggonline.portal.bannerTag/tag-class
  /tag
  /taglib
 
  The following is the JSP file
  %@ taglib uri=WEB-INF/portalTags.tld
  prefix=portal %
 
  %
 
 /* The DesktopDefault.jsp page is used to load
 and
  populate each Portal View.  It accomplishes
 this by reading the layout configuration of the
  portal from the Portal Configuration
 system, and then using this information to
  dynamically instantiate portal modules
 (each implemented as a custom tag), and then
 inject
  them into the page. */
 
  /* This scriplet capture the request parameters
  passed and uses them to
 determine how to process the page. */
 
  String tabIndex =
 request.getParameter(tabIndex);
  String tabId = request.getParameter(tabId);
 
  if (tabIndex == null){
  session.setAttribute(tabIndex, 0);
  }else{
  session.setAttribute(tabIndex, tabIndex);
  }
 
  if (tabId == null){
  session.setAttribute(tabId, 0);
  }else{
  session.setAttribute(tabId, tabId);
  }
 
  %
 
  html
  head
  titleBraggOnline Portal/title
  link href=braggonline.css
 type=text/css
  rel=stylesheet /
  /head
  body leftmargin

More info on custom tag problem

2003-02-23 Thread Percival Bragg
The following are the current files and the error from
tomcat that I received in trying my first custom tag.

 The following is the java class for the custom tag.
package com.braggonline.portal;

import java.io.*;
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.*;

public class bannerTag extends TagSupport {

public int doEndTag() throws JspException {

StringBuffer out = new StringBuffer();

out.append(table width=quot;100%quot;
cellspacing=quot;0quot; class=quot;HeadBgquot;
border=quot;0quot;);
out.append(tr valign=quot;topquot;);
out.append(td colspan=quot;3quot;
class=quot;SiteLinkquot;
background=quot;images/bars.gifquot;
align=quot;rightquot;);
out.append(span
id=quot;Banner_WelcomeMessagequot;
style=quot;color:#EE;quot;/span);
out.append(a href=quot;index.htmlquot;
class=quot;SiteLinkquot;Braggonline Home/a);
out.append(span
class=quot;Accentquot;|/span);
out.append(a href=quot;index.htmlquot;
target=quot;_blankquot;
class=quot;SiteLinkquot;Site Map/a);
out.append(span
class=quot;Accentquot;|/span);
out.append(a href=quot;index.htmlquot;
target=quot;_blankquot;class=quot;SiteLinkquot;Logoff/a);
out.append(nbsp;nbsp;/td/tr);
out.append(trtd width=quot;10quot;
rowspan=quot;2quot;nbsp;/td);
out.append(td height=quot;40quot;);
out.append(span id=quot;Banner_siteNamequot;
class=quot;SiteTitlequot;BraggOnline
Portal/span/td);
out.append(td align=quot;centerquot;
rowspan=quot;2quot;nbsp;/td/tr);
out.append(trtd);
out.append(table id=quot;Banner_tabsquot;
class=quot;OtherTabsBgquot;
cellspacing=quot;0quot; border=quot;0quot;
style=quot;border-collapse:collapse;quot;tr);
out.append(td class=quot;TabBgquot;
style=quot;border-width:1px;border-style:solid;height:25px;quot;);
out.append(nbsp;span
class=quot;SelectedTabquot;Home/spannbsp;/td);
out.append(td
style=quot;border-width:1px;border-style:solid;height:25px;quot;nbsp;a
href=quot;http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=1tabid=2quot;
class=quot;OtherTabsquot;JSP/a/td);
out.append(td
style=quot;border-width:1px;border-style:solid;height:25px;quot;nbsp;a
href=quot;http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=2tabid=3quot;
class=quot;OtherTabsquot;JavaBeans/a/td);
out.append(td
style=quot;border-width:1px;border-style:solid;height:25px;quot;nbsp;a
href=quot;http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=3tabid=4quot;
class=quot;OtherTabsquot;Discussions/a/td);
out.append(td
style=quot;border-width:1px;border-style:solid;height:25px;quot;nbsp;a
href=quot;http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=4tabid=5quot;
class=quot;OtherTabsquot;About the
Portal/a/td);
out.append(/tr/table);
try {
pageContext.getOut().print(Got Here);
} catch (Exception e) {
throw new JspException(e.toString());
}
return EVAL_PAGE;
}
}

The following is the TLD file.
?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-version1.0/tlib-version
jsp-version1.2/jsp-version
short-namePortalTags/short-name
descriptionTags for dynamic creation of portal
pages./description
tag
namebanner/name

tag-classcom.braggonline.portal.bannerTag/tag-class
/tag
/taglib

The following is the JSP file
%@ taglib uri=WEB-INF/portalTags.tld
prefix=portal %

%

   /* The DesktopDefault.jsp page is used to load and
populate each Portal View.  It accomplishes
   this by reading the layout configuration of the
portal from the Portal Configuration
   system, and then using this information to
dynamically instantiate portal modules
   (each implemented as a custom tag), and then inject
them into the page. */

 /* This scriplet capture the request parameters
passed and uses them to
   determine how to process the page. */

String tabIndex = request.getParameter(tabIndex);
String tabId = request.getParameter(tabId);

if (tabIndex == null){
session.setAttribute(tabIndex, 0);
}else{
session.setAttribute(tabIndex, tabIndex);
}

if (tabId == null){
session.setAttribute(tabId, 0);
}else{
session.setAttribute(tabId, tabId);
}

%

html
head
titleBraggOnline Portal/title
link href=braggonline.css type=text/css
rel=stylesheet /
/head
body leftmargin=0 bottommargin=0
rightmargin=0 topmargin=0 marginheight=0
marginwidth=0
form
table width=100% 

custom tag problems

2003-02-22 Thread Percival Bragg
I am trying to create my first custom tag and I am
getting an Unable to load class banner. I believe I
have the .tld file coded properly and the java class
corresponding to banner in the right directory
corresponding to the package. The CLASSPATH and PATH
envoronment variables seem to be correct. Any thoughts
would be greatly appreciated.

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavaBean problem

2003-01-29 Thread Percival Bragg
I am a bit confused about creating packages for
javabeans. I am working thru a book titled JSP
Weekend Crash Course which mentions nothing about
compiling the bean into a package or using an include
statement in the JSP page. Is the book incorrect or is
this also a viable solution.

--- Wilson Snook [EMAIL PROTECTED]
wrote:
  So, instead of WEB-INF/classes/MyBean, it would
 be something like
 WEB-INF/classes/com.mypackage.MyBean 
 
 What works for me is:
 
 MyBean:
 (declaration at top of bean class file)
 package com.mypackage;
 
 Directory structure:
 WEB-INF
 = classes
 = com
 = mypackage
 = MyBean
 
 Note that the package declaration uses fullstops
 (periods in American) and
 the directory path has a separate directory for
 com and mypackage, the
 bean residing in the latter.
 
 Does
 WEB-INF
 = classes
 = com.mypackage
 = MyBean
 
 also work?
 
 Regards,
 
 Wilson (newbie)
 
 - Original Message -
 From: Jacob Kjome [EMAIL PROTECTED]
 To: Tomcat Users List
 [EMAIL PROTECTED]
 Sent: Wednesday, January 29, 2003 4:34 AM
 Subject: Re: JavaBean problem
 
 
 
  Is the bean in an actual defined package or the
 default package (no
  package).  It *must* be in a package.  So, instead
 of
  WEB-INF/classes/MyBean, it would be something like
  WEB-INF/classes/com.mypackage.MyBean
 
  Now import the com.mypackage.MyBean bean into your
 jsp.  Things should
 work
  better now.
 
  Jake
 
  At 05:38 PM 1/28/2003 -0800, you wrote:
  I have just created and compiled my first
 JavaBean
  into
 tomcat-install\webapps\ROOT\WEB-INF\classes and
  am tying to access it from a jsp page in
  tomcat-install\webapps\ROOT directory. I am
 getting
  jsp compile errors because the jsp page cannot
 find
  the class defined in the JavaBean.
  
  Any help would be appreciated. My version of
 tomcat is 4.1.18.
  
 
 __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
  http://mailplus.yahoo.com
  
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: JavaBean problem

2003-01-29 Thread Percival Bragg
Thaks for your help on this problem.

--- Erik Price [EMAIL PROTECTED] wrote:
 
 
 Percival Bragg wrote:
  I am a bit confused about creating packages for
  javabeans. I am working thru a book titled JSP
  Weekend Crash Course which mentions nothing about
  compiling the bean into a package or using an
 include
  statement in the JSP page. Is the book incorrect
 or is
  this also a viable solution.
 
 Your book might be somewhat dated.  As of JDK1.4,
 it's recommended that 
 all classes be placed into packages, and you can't
 import a class from 
 the non-package (default package) namespace into a
 package.
 
 You can read a few more details here:
 
 http://mindprod.com/jglosspackage.html
 
 
 Erik
 
 PS: I only know this b/c I ran into a similar
 problem.  I vowed never to 
 write an unpackaged class in Java again!
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




More Help With Beans Please

2003-01-29 Thread Percival Bragg
I have compiled 'myBean' into a 'package' and in the
JSP page I import the package with 

%@ page import=package.* %
jsp:useBean id=myid class=myBean /

The bean is located in 
tomcat-install\webapps\ROOT\WEB-INF\classes\package
directory and the JSP page is located in the ROOT
directory.

The above declaration doesn't work but the following
works

jsp:useBean id=myid class=package.myBean /

WHY???


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: More Help With Beans Please

2003-01-29 Thread Percival Bragg
If what you say is correct why bother with the import
directive at the begenning of the JSP page as the
fully qualified name should work without this
directive.

--- Filip Hanik [EMAIL PROTECTED] wrote:
 
 because the class attribute is what is used to
 instantiate the bean.
 class=package.myBean
 and for that it needs a fully qualified name,
 otherwise in case you have more than one import
 statement, it will not know which class you are
 referring to.
 
 
 Filip
 
 
 -Original Message-
 From: Percival Bragg
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 29, 2003 5:19 PM
 To: Tomcat-Users-Group
 Subject: More Help With Beans Please
 
 
 I have compiled 'myBean' into a 'package' and in the
 JSP page I import the package with 
 
 %@ page import=package.* %
 jsp:useBean id=myid class=myBean /
 
 The bean is located in 

tomcat-install\webapps\ROOT\WEB-INF\classes\package
 directory and the JSP page is located in the ROOT
 directory.
 
 The above declaration doesn't work but the following
 works
 
 jsp:useBean id=myid class=package.myBean /
 
 WHY???
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
 http://mailplus.yahoo.com
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




JavaBean problem

2003-01-28 Thread Percival Bragg
I have just created and compiled my first JavaBean
into tomcat-install\webapps\ROOT\WEB-INF\classes and
am tying to access it from a jsp page in
tomcat-install\webapps\ROOT directory. I am getting
jsp compile errors because the jsp page cannot find
the class defined in the JavaBean.

Any help would be appreciated. My version of tomcat is 4.1.18.

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Newbie to Tomcat needs help

2003-01-23 Thread Percival Bragg
I have installed Tomcat on my Windows XP system and
changed the port from 8080 to 80. I can get to the
Tomcat page with http://localhost/ and also server up
other html pages. I am using Tomcat to help in my
learning of JSP.

I created my first servlet and the compiled class is
in the tomcat-install\webapps\ROOT\WEB-INF\classes
directory. I then try access the servlet with
http://localhost/servlet/classname (no .class) but
this fails with the page unavailable error.

What am I doing wrong. I am running tomcat 4.1.18.

My thanks for any help.

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Newbie to Tomcat needs help

2003-01-23 Thread Percival Bragg
Thanks for the info. I will try it.
--- Shapira, Yoav [EMAIL PROTECTED] wrote:
 Howdy,
 Uncomment the servlet-mapping element for the
 invoker servlet in
 tomcat-install\conf\web.xml.  This servlet is
 commented out by default
 in tomcat 4.1.18 for security purposes.
 
 Alternatively, make an entry in your web.xml file
 (under ROOT/WEB-INF)
 for your servlet, e.g.;
 servlet
   servlet-nameMyServletName/servlet-name
   servlet-classclassname/servlet-class
 /servlet
 
 servlet-mapping
   servlet-nameMyServletName/servlet-name
   url-pattern/MyServlet/url-pattern
 /servlet-mapping
 
 You can then access your servlet at
 http://localhost/MyServlet.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Percival Bragg
 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 23, 2003 9:01 AM
 To: [EMAIL PROTECTED]
 Subject: Newbie to Tomcat needs help
 
 I have installed Tomcat on my Windows XP system and
 changed the port from 8080 to 80. I can get to the
 Tomcat page with http://localhost/ and also server
 up
 other html pages. I am using Tomcat to help in my
 learning of JSP.
 
 I created my first servlet and the compiled class
 is
 in the
 tomcat-install\webapps\ROOT\WEB-INF\classes
 directory. I then try access the servlet with
 http://localhost/servlet/classname (no .class) but
 this fails with the page unavailable error.
 
 What am I doing wrong. I am running tomcat 4.1.18.
 
 My thanks for any help.
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
 http://mailplus.yahoo.com
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:tomcat-user-
 [EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]