tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Casas, Claudia" <cca...@utep.edu>
Subject RE: bean problem
Date Tue, 22 Jun 2004 20:20:17 GMT
Actually, my real problem was that tomcat was running my html and jsp's
and apache only html. Since my jsp's contained some html, I thought they
were working, but the jsp part was not really being processed.

Here is a sample of my jsp code:
<%@ page language="java" %>
<%@ page import="java.sql.*" %>

<jsp:useBean id="DB" class="tools.DBBean" scope="session" />

<html>

<head><title>Administration Section</title></head>

<body link="#000066" vlink="#000066" alink="#000066" leftmargin="0"
topmargin="0">

<%
        DB.connect();
        String query = new String ("select name, age from persons");
        ResultSet rset = DB.executeQ(query);
%>

<div align="center">
 <center>
<table border="0" cellspacing="1" style="border-collapse: collapse"
bordercolor="#C0C0C0" width="760" id="AutoNumber1">
<tr>
        <td width="400" class="title"><b> Name</b></td>
        <td width="330" class="title"><b>Age</b></td>
        <td width="30">&nbsp;</td>
 </tr>
</table>

<table width="760" border="1" cellspacing="0" cellpadding="0"
style="border-collapse: collapse" bordercolor="#C0C0C0">
<%
    while (rset.next()){
        String myname=(rset.getString(1));
        String age=(rset.getString(2));
%>
<tr>
        <td width="400"><%= myname%>&nbsp;</td>
        <td width="330"><%= age%>&nbsp;</td>
</tr>
<%}%>
</table>
 </center>
</div>

</body>
</html>

-----Original Message-----
From: shiv juluru [mailto:shivjuluru@yahoo.com] 
Sent: Tuesday, June 22, 2004 12:13 AM
To: Tomcat Users List; deepak shripat mane
Subject: Re: bean problem

i am also gr\etting the same problem like u,
using tomcat jsps and htmls are working,but using apache onlu jsps are
working but not htmls.if u find the solution plz send me that solution.
 
thanks in advance,
shiva

deepak shripat mane <deepakmane2002@rediffmail.com> wrote:

Hii..

Can u tell me Wat is scope of beans in ur JSP Page. Can u send me ur
source code. If u not specified scope of beans then u have to specify
scope of beans


Deepak


On Mon, 21 Jun 2004 Casas,Claudia wrote :
>Hello everyone,
>I have managed to install tomcat4.1.30, apache2.0.49 and the jk1.2.5
>connector.
>I included inside my server.xml file a new context path so that I can
>run my jsp application through my user directories.
>Here is what I included:
>>reloadable="true" crossContent="true">
>
>So now, I am able to run under /home/myuser/wwwdocs/test.jsp as
follows:
>http://my.domain.com:8080/myuser/test.jsp or
>http://my.domain.com/myuser/test/jsp
>The both work ok.
>
>I also have a jsp called list.jsp that uses a bean to connect to an
>oracle database. When I run
>http://my.domain.com:8080/myuser/admin/list.jsp everything works
perfect
>and I get an html table with list of my records from my database. But
if
>I run http://my.domain.com/myuser/admin/list.jsp, then the jsp works,
>but I do get my html table but I do not get any records back at all.
>
>The bean is inside
>/home/myuser/wwwdocs/WEB-INF/classes/tools/dbbean.java, while the
>list.jsp is only inside /home/myuser/wwwdocs/admin
>
> Does anyone know what is going on in here?
>
>
>>"Technology does not drive change -- it enables change. " -- >
>











    [input]        [input]    [input] 





 [input]   






















Copyright (c) 2004 Rediff.com India Limited. All Rights Reserved.









		
---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message