Tomcat problems

2000-05-11 Thread Pete Walsh

Hi,

I'm very new to Java and JSP.  I am having problems running JSP pages with
the Tomcat Webserver.  (I hope somebody is familiar with this)  When I set
up Tomcat in NT and go to one of the example JSP pages it comes up with an
Error 500 in Netscape and a bunch of errors on the console.  I'm pretty sure
I just forgot to set up something, but any advice you can give would help
alot.  Remember I am absolutly new to Java and JSP, so I might have forgot
to install something.

FYI, the only things I installed were
Sun JDK 1.3
Jakarta Tomcat

Thanks

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Problems with Tomcat

2000-05-12 Thread Pete Walsh

Hi,
I'm trying to set up Tomcat, the apache java servlet and jsp server on an
NT machine.  I installed the JDK 1.3 from sun and then the most recent
Tomcat from Jakarta and thats it.  When I go to view the example pages they
have set up, the servlet pages work fine, but the jsp ones cause errors in
the browser (in both Netscape and IE) and on the server's console window.
I'm its something on the setup side that I haven't done yet, but I dont know
what I should do.  Any help would be appreciated greatly.

I already tried copying tools.jar into the tomcat\lib folder as someone
suggested, but I'm still getting the same errors.
If it helps I've put the errors from the server side below.  I'm pretty new
to java so it might be somethign really dumb I forgot.

Thanks,
Pete


Unhandled error! You might want to consider having an error page to report
such
errors more gracefully
java.lang.NoClassDefFoundError: sun/tools/javac/Main
at
org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.ja
va:128)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:238)
at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessar
y(JspServlet.java:149)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspSer
vlet.java:161)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:2
61)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.ja
va:503)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559
)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.j
ava:338)
at java.lang.Thread.run(Unknown Source)

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



JavaBeans Compile?

2000-05-17 Thread Pete Walsh

Ok I am starting to use JavaBeans with JSP pages.  I've never made a 'bean'
before and I was wondering how to do it.  When I try to recompile the code
to a bean I dont get errors (using normal javac 'filename') but when the jsp
pages comes up it has errors.  The code isnt messed up because I am using
the code for an example that works.  Is compiling a bean different than
compiling normal Java code?

Also do I need Java Enterprise Edition SDK 1.2.1?  I have the Standard
Edition SDK 1.3.  (When I tried to install the J2EE it didnt have javac in
it and I was all confused)  Please explain if this is the reason.  I just
started programming in java and don't know the basics.  Thanks.

Thanks

Pete

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



JSP Login Help

2000-05-19 Thread Pete Walsh

Hi,

I'm very new to JSP and Beans.  I have to create something that users will log
into from a jsp page and a bean (i suppose) keeping track of who is logged
into the system.  (There can be multiple people at once)  I think the best way
would be to create an collection (like a vector) of HttpSession objects, one
for each person logged in, but I'm not sure.  Also, I just can't figure out how
to do this.  I read the information on HttpSession objects that came with
Jakarta-Tomcat server, but I dont get how to implement it.

If anyone can suggest a better way to do this, or knows some example code I
could look at please email me.  Thanks.

Pete Walsh

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Sessions???

2000-05-22 Thread Pete Walsh

Can somebody explain to me how I can track a user's session.  I truely tried
reading the docs and stuff but I do not get it.  If anyone knows of any example
code online please (!!!) send me a link.  (Or if anyone has the time, post an
explanation)  Thanks.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Please Help

2000-05-25 Thread Pete Walsh

Ok I am new to JSP (excuse for not knowing this)  I just put all my JSP pages
and beans into one directory.  I'm using Jakarta-Tomcat.  Now the JSP pages
cannot fin the beans.  For example




Neither of these two beans are in a package.  So what am I doing wrong?  Tomcat
gives the following error in konsole to make me think that it is not finding
these beans...

Java.lang.NoClassDefFoundError: LoginBean (wrong name: admin/LoginBean)

If anyone knows what I can do (or what I'm talking about) please helpthanks

Pete

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Custom Tags and Beans

2000-06-01 Thread Pete Walsh

Hi,

I'm try to get a reference to one of my beans inside the code of a Jsp Tag I'm
making.  When I declare the bean's scope to be page, and use the following
statement in my Tag's doStartTag

BeanName log = (BeanName)pageContext.getAttribute("BeanName");
(where BeanName is the name of the bean ;)

everything is ok., but my bean is supposed to have a scope of application.  So
when I switch it to application, and use that line, log is null.  So how can I
get this object?  I guessed that maybe applicationContext.getAttribute would
work but it does not.  Thanks.

Pete Walsh

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Custom Tags and Beans

2000-06-02 Thread Pete Walsh

Thanks, I used the findAttribute and it worked.

-Pete

On Thu, 01 Jun 2000, you wrote:
> Pete Walsh wrote:
>
> > Hi,
> >
> > I'm try to get a reference to one of my beans inside the code of a Jsp Tag I'm
> > making.  When I declare the bean's scope to be page, and use the following
> > statement in my Tag's doStartTag
> >
> > BeanName log = (BeanName)pageContext.getAttribute("BeanName");
> > (where BeanName is the name of the bean ;)
> >
> > everything is ok., but my bean is supposed to have a scope of application.  So
> > when I switch it to application, and use that line, log is null.  So how can I
> > get this object?  I guessed that maybe applicationContext.getAttribute would
> > work but it does not.  Thanks.
> >
>
> You've got a couple of choices:
>
> * Use the findAttribute() method instead of getAttribute(), which looks in
>   progressively larger scopes until it locates the bean.
>
> * Explicitly declare which scope you want with a second argument:
>
> BeanName log = (BeanName) pageContext.getAttribute("BeanName",
> PageContext.APPLICATION_SCOPE);
>
> See the Javadocs for PageContext for more information.
>
> >
> > Pete Walsh
> >
>
> Craig McClanahan
>
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
--

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Tomcat wierdness

2000-06-15 Thread Pete Walsh

You could try using getParameterValues.  This would give you an array of
Strings for all the values of B.

B:<%String b[] = request.getParameterValues("b");
for(int i=0;i

I'm not saying this would work definatly cause I'm using Tomcat without Apache
and Linux, but it works on my system.

On Thu, 15 Jun 2000, you wrote:
> First post for me...  We're running Apache 1.3.12 with Tomcat 3.1 for
> servlets/JSP.  And unfortunately, our development box is NT.  There is
> something strange happening with form submissions - particularly with
> multiple select boxes.  Here is a piece of HTML with a form that submits to
> a JSP that prints out the results with request.getParameter().
>
> test.html:
> 
> 
> 
> 
> 1
> 2
> 3
> 
> 
> 
> 
> 
>
> process.jsp:
> B:<%
> out.println(request.getParameter("b"));
> %>
>
>
> Look folks, it doesn't get any easier than this!  The problem is that
> whenever I select more than one item in the select, getParameter reports
> only one.  This exact piece of code works on our old JavaWebServer 2.0
> server.  What gives?  The production box will run Solaris 2.7 with Apache
> and Tomcat as well, but is still being put together so I can't test it
> there.  Is this just shoddy NT implementation of Apache/Tomcat ?  Any ideas
> would be very helpful.
>
> Dave
>
> Dave Gillies
> Web Programmer
> Learning Technologies Unit
> E230-1970 Ness Avenue
> Phone: (204) 945-7497
> Fax: (204) 945-1704
> EMail: [EMAIL PROTECTED]
>
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
--

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



JSP precompiled

2000-07-05 Thread Pete Walsh

Hi,

Since JSP pages are compiled before being used (I believe), if a user #1 goes
to a page that outputs a list of things from a database, then user #2
goes to that same page, will user #2 get a faster response since the pages is
already compiled, or will the page be compiled again since the DB may have
changed?  If I'm way off base with this question please explain why.  Thanks

Pete

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets