Re: Handling apostrophes

2001-10-22 Thread David Treves

Hi there,

you should simply duplicate in every input string the apostrophe.

Meaning that if the input string is:

eee'eee

after manipulating it - BEFORE inserting it to the DB it will be:

eee''eee  (  ' twice, NOT A double quote)

in the DB it will appear as SINGLE apostrophe.


That will work!  :o)
David.

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 22, 2001 10:55 AM
Subject: Handling apostrophes


 Hi all,

 I'm developing an application which uses java servlets and JSPs and
 a MySQL database running on Tomcat 4.0.

 I take user input, store it on the db, then display it again. As
 soon as someone tried inputiing an apostrophe, it all fell over. It seems
 that I have to encode and decode every single text field. Is this correct,
 or is there a better way ?

 Thanks

 Dave






admin context

2001-10-22 Thread David Treves

Hello there,

I tried following the instructions of how to manage the admin context in
Tomcat 3.2.3, yet could not understand what to do...

what is the trusted attribute in the Context tag in server.xml? where do
I need to define users? in tomcat-users.xml? which role does the admin have?


Please link me to a clear explanation page, or list the actions I should
take...   :o)

Thanks in advance!
David.




Re: Handling apostrophes

2001-10-22 Thread David Treves

do you believe that replacement of one char in a string with two chars costs
more than encoding the string?

David.

btw, I believe that prepared statements may solve that issue the best way,
that's in case you do not use JdbcOdbcBridge, from my experience I studied
that it doesn't update varchar fields properly, make sure it won't happen to
you.

Good luck!   :o)


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 22, 2001 11:33 AM
Subject: RE: Handling apostrophes


 Sounds like a bigger overhead than encode

 Dave



 -Original Message-
 From: David Treves [mailto:[EMAIL PROTECTED]]
 Sent: 22 October 2001 10:09
 To: tomcat-user
 Subject: Re: Handling apostrophes


 Hi there,

 you should simply duplicate in every input string the apostrophe.

 Meaning that if the input string is:

 eee'eee

 after manipulating it - BEFORE inserting it to the DB it will be:

 eee''eee  (  ' twice, NOT A double quote)

 in the DB it will appear as SINGLE apostrophe.


 That will work!  :o)
 David.

 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, October 22, 2001 10:55 AM
 Subject: Handling apostrophes


  Hi all,
 
  I'm developing an application which uses java servlets and JSPs and
  a MySQL database running on Tomcat 4.0.
 
  I take user input, store it on the db, then display it again. As
  soon as someone tried inputiing an apostrophe, it all fell over. It
seems
  that I have to encode and decode every single text field. Is this
correct,
  or is there a better way ?
 
  Thanks
 
  Dave
 
 




please help me to pass that obstacle...

2001-10-21 Thread David Treves

Hi,

I am really tired of that trial and error games... I am trying to have the
Tomcat look for EJB object stored in JBoss application server.

I am using Tomcat  and JBoss 2.4.0.

I did the following:

1) added context parameters (the environment variables for JNDI)
context-param
param-namejava.naming.factory.initial/param-name
param-valueorg.jnp.interfaces.NamingContextFactory/param-value
/context-param

context-param
param-namejava.naming.provider.url/param-name
param-valuelocalhost:1099/param-value
/context-param


2) copied all the necessary jars to the WEB-INF\lib folder

3) ejb-ref to the web.xml

 ejb-ref
  descriptionreference to LoginBean - authenticates user's login and
returns rights level/description
  ejb-ref-nameejb/AuthHome/ejb-ref-name
  ejb-ref-typeSession/ejb-ref-type
  homeauthBean.AuthHome/home
  remoteauthBean.Auth/remote
 /ejb-ref

4) added the following code to the servlet:

// Set properties
Properties newProps = System.getProperties();
newProps.put (java.naming.factory.initial,
getServletContext().getInitParameter (java.naming.factory.initial));
newProps.put (java.naming.provider.url,
getServletContext().getInitParameter (java.naming.provider.url));
System.setProperties (newProps);
AnEJB gocha = null;

// Obtain a remote reference
try {
  InitialContext jndiContext = new InitialContext();
  Object ref = jndiContext.lookup(java:comp/ejb/AnEJBHome);
  AnEJBHome home = (AnEJBHome) PortableRemoteObject.narrow (ref,
AnEJBHome.class);
  gocha = home.create();
}

catch (Exception e) {
  System.err.println (An exception occurred while obtaining a remote
reference:);
  System.err.println (e.toString());
}

InitialContext ctx = new InitialContext();
Object ref = ctx.lookup(java:comp/ejb/AuthHome);  //THIS LINE THROWS AN
ERROR



why this lookup fails?
in the ejb-ref I explicitly typed that the ref-name is ejb/AuthHome.

I know it is a small thing...

What am I missing?

Thanks!
David.




Re: ClassCastException uppon requests

2001-10-18 Thread David Treves

Hi, I went through a simple tutorial just to make sure my Tomcat is
installed properly, but I just realized that I can only see the main page of
the Tomcat (the welcome page under ROOT dir). When I try to access either
JSP or servlets exapmles I ge the 404 error.

I am using Tomcat 4.0 on win2000. I used the EXE installation file.

Here is the exception I copied from the examples log file:

2001-10-18 08:25:08 StandardContext[/examples]: Exception sending context
initialized event to listener instance of class listeners.SessionListener
java.lang.LinkageError: loader constraints violated when linking
javax/servlet/ServletContext class
 at listeners.SessionListener.contextInitialized(SessionListener.java:163)
 at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3201)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3385)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
 at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:261)
 at
org.apache.catalina.startup.CatalinaService.execute(CatalinaService.java:172
)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:28)
 at java.lang.reflect.Method.invoke(Method.java:313)
 at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:360)

2001-10-18 08:25:08 StandardContext[/examples]: Context startup failed due
to previous errors
2001-10-18 08:25:08 StandardContext[/examples]: Exception sending context
destroyed event to listener instance of class listeners.ContextListener
java.lang.IncompatibleClassChangeError
 at listeners.ContextListener.log(ContextListener.java:177)
 at listeners.ContextListener.contextDestroyed(ContextListener.java:147)
 at
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3
241)
 at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3443)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3415)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
 at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:261)
 at
org.apache.catalina.startup.CatalinaService.execute(CatalinaService.java:172
)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:28)
 at java.lang.reflect.Method.invoke(Method.java:313)
 at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:360)



Thanks for your time!  :o)
David.
- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 9:16 PM
Subject: Re: ClassCastException uppon requests


 The usual culprit is having a servlet.jar file in your
 $JAVA_HOME/jre/lib/ext directory, or otherwise messing around with where
 Tomcat sets up JAR files.

 Craig


 On Wed, 17 Oct 2001, David Treves wrote:

  Date: Wed, 17 Oct 2001 19:52:26 +0200
  From: David Treves [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: ClassCastException uppon requests
 
  Hi,
 
  I wrote a very simple servlet that supposed to receive 2 parameters from
a
  form (POST method) and write them on screen.
 
 
  the doPost() method is too simple... getting the PrintWriter and
printing
  one line with both parameters...
 
  Am I missing something here?
  Why doesn't it point to a line of error in MY servlet code?
 
  everytime I try to submit the data to the servlet I get the collowing
error:
 
 
  A Servlet Exception Has Occurred
  java.lang.ClassCastException: servlets.LoginServlet
   at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:832)
   at
 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:621)
   at
 
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
  :396)
   at
 
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180

problems serving HTTP requests

2001-07-17 Thread David Treves



Hi, I searched the archives yet didn't find 
anything can help me... I installed the Tomcat 3.2.2 in an out-of-process mode 
with IIS 5,for some time it worked just fine. Today Tomcat decided it is 
on a strike... I cannot get any servlet/jsp file served by it. Instead I 
getthe option to download the file I request and the files are filled with 
gibberish.

The Tomcat's DOS window doesn't print any error and 
I see in the IIS log that the request went fine (08:15:19 192.114.206.189 GET 
/jakarta/isapi_redirect.dll 200) a few times (even though I saw no results) and 
some times I got 206 HTTP message or 304.

What could make the sudden change?


Thanks in advance!
David.


Re: problems serving HTTP requests

2001-07-17 Thread David Treves

Thanks for your reply.

The problem is that the ISAPI doesn't seem to pass the request to Tomcat. I
know that is the request is for a non existing page there is an error that
the Tomcat logs, right? Well, even if I request for a page within the
application that does not exist there is no log about it in the Tomcat logs.

IIS logs the action to be successful but Tomcat is not activated at all...

What could cause that kind of behavior?

David.

- Original Message -
From: William Kaufman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 17, 2001 4:41 PM
Subject: RE: problems serving HTTP requests


 From the HTTP spec at
http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2068.html
 :

 ] 10.2.7 206 Partial Content
 ] The server has fulfilled the partial GET request for the resource.

 That means you called HttpServletResponse.setContentLength() with a number
 bigger than the actual amount of data you're returning.  If you stop
calling
 that, everything should be fine.  (Calling setContentLength() is a good
 idea, but only if you actually know the length, which you rarely do
without
 bufferring all the data yourself.)

 ] 10.3.5 304 Not Modified
 ] If the client has performed a conditional GET request and
 ] access is allowed, but the document has not been modified,
 ] the server SHOULD respond with this status code.

 That means that Tomcat's copy of your servlet's output is newer than the
 date returned by getLastModified().  If your implementation of
 getLastModified() is returning the right timestamp, then everything's OK.

 -- Bill K.

 -Original Message-
 From: David Treves [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 17, 2001 1:40 AM
 To: tomcat-user
 Subject: problems serving HTTP requests


 Hi, I searched the archives yet didn't find anything can help me... I
 installed the Tomcat 3.2.2 in an out-of-process mode with IIS 5, for some

 time it worked just fine. Today Tomcat decided it is on a strike... I
cannot
 get any servlet/jsp file served by it. Instead I get the option to
download
 the file I request and the files are filled with gibberish.

 The Tomcat's DOS window doesn't print any error and I see in the IIS log
 that the request went fine (08:15:19 192.114.206.189 GET
 /jakarta/isapi_redirect.dll 200) a few times (even though I saw no
results)
 and some times I got 206 HTTP message or 304.

 What could make the sudden change?


 Thanks in advance!
 David.




Re: help me with IIS+tomcat

2001-07-11 Thread David Treves

Hello,

I tried to follow that link to do exactly what they instruct to do, yet I
keep getting these errors every time I access the examples application. Note
that I see the requested pages and it operates just fine, but I get the
following errors anyway. I would like to add that I cannot see other
applications besides the examples one.

The errors:
10:19:58 192.114.206.189 GET /jakarta/isapi_redirect.dll 200
10:19:58 192.114.206.189 GET /jakarta/isapi_redirect.dll 200
10:19:58 192.114.206.189 GET /jakarta/isapi_redirect.dll 200
10:19:58 192.114.206.189 GET /jakarta/isapi_redirect.dll 200

I work on win2000 with 3.2.2 version of Tomcat.

Can anyone link me to a relevant resource or advice me about it?

Thanks!
David.

- Original Message -
From: Manjunath BHat [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 10:54 AM
Subject: RE: help me with IIS+tomcat


 Hi,

 try following,
 http://www.verysimple.com/scripts/support_tc_iis.html
 I followed it its working fine with me

 Good Luck

 Manjunath



 From: Chris Thompson [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: RE: help me with IIS+tomcat
 Date: Wed, 11 Jul 2001 08:44:27 +0100
 
 Morning all,
 
 another little pointer which does not appear in the documents is the fact
 that the config files for Tomcat are formatted by a UNIX text editor. We
 installed everything, added the redirector and got a red arrow until we
 re-formatted the config files for Windows.
 
 We opened each file in WinBatch and Notepad then copied the WinBatch copy
 over the Notepad copy and saved (WinBatch recognises UNIX formatting).
 There
 is a way of doing this with vi if you have access but recall the exact
 command for this.
 
 Hope this helps
 Chris
 
 -Original Message-
 From: albert [mailto:[EMAIL PROTECTED]]
 Sent: 11 July 2001 08:22
 To: [EMAIL PROTECTED]
 Subject: help me with IIS+tomcat
 
 
 hi, me too
 I us Windows Prof 2000
 and Tomcat 321
 same problem, any help ?
 
 regards
 Albert Oscarina
 System Specialist
 Solution Made Pocketable
 http://www.SMPdirect.com
 Phone : (65) 276 7624
 Fax   : (65) 274 4770
 mail : [EMAIL PROTECTED]
 
 If we have a strong reason, we will find the way
 (Bits  Pieces, The Economics Press)
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 11, 2001 3:17 PM
 To: [EMAIL PROTECTED]
 Subject: RE: help me with IIS+tomcat
 
 
 
 Hi,
 
 I have the same problem  and i'm stuckany idea ?
 
 Thanks,
 
 Hervé.
 
  -Message d'origine-
  De: Ðì±ó [SMTP:[EMAIL PROTECTED]]
  Date: mercredi 11 juillet 2001 07:32
  À: [EMAIL PROTECTED]
  Objet: help me with IIS+tomcat
 
  Hi,
  I have tried everything writen in Tomcat IIS HowTo but when I
 entered http://bsd.com/examples/jsp/index.html; (My win 2000 server's
IIS
 web server's name is bsd.com), the browser always says a error of HTTP
404.
 I think the url is right because if I entered
 http://bsd.com:8080/examples/jsp/index.html;, the browser can correctly
 display tomcat jsp examples page. The isapi filter is also loaded, the
 workers is setting right. I use Jbuilder4 and download tomcat 3.2.2 and
 install it under c:\JBuilder4\tomcat. I have changed workers.properties's
 java_home and tomcat_home properties. It still NOT works. can you give me
 some information?

 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: help me with IIS+tomcat

2001-07-11 Thread David Treves

I guess everything was just fine, only that I was not aware to the fact that
updating the uriworkermap.properties requires to restart the whole www
service so that changes will take place...

Thanks for your help!
David.

- Original Message -
From: Randy Layman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 1:06 PM
Subject: RE: help me with IIS+tomcat



 What makes you think that these are errors?  The isapi_redirect.dll
 is the resource that IIS will request, its in the right directory, and I
 believe that 200 is the SUCCESS status code.  You indicate that the pages
 are showing up correctly, so what's the problem?

 You can't see other applications because you haven't told the
 redirector that you want to see them - you need to edit the
 uriworkermap.properties file, just like the HOWTO says.

 Randy

  -Original Message-
  From: David Treves [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 11, 2001 7:09 AM
  To: [EMAIL PROTECTED]
  Subject: Re: help me with IIS+tomcat
 
 
  Hello,
 
  I tried to follow that link to do exactly what they instruct
  to do, yet I
  keep getting these errors every time I access the examples
  application. Note
  that I see the requested pages and it operates just fine, but
  I get the
  following errors anyway. I would like to add that I cannot see other
  applications besides the examples one.
 
  The errors:
  10:19:58 192.114.206.189 GET /jakarta/isapi_redirect.dll 200
  10:19:58 192.114.206.189 GET /jakarta/isapi_redirect.dll 200
  10:19:58 192.114.206.189 GET /jakarta/isapi_redirect.dll 200
  10:19:58 192.114.206.189 GET /jakarta/isapi_redirect.dll 200
 
  I work on win2000 with 3.2.2 version of Tomcat.
 
  Can anyone link me to a relevant resource or advice me about it?
 
  Thanks!
  David.
 
  - Original Message -
  From: Manjunath BHat [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, July 11, 2001 10:54 AM
  Subject: RE: help me with IIS+tomcat
 
 
   Hi,
  
   try following,
   http://www.verysimple.com/scripts/support_tc_iis.html
   I followed it its working fine with me
  
   Good Luck
  
   Manjunath
  
  
  
   From: Chris Thompson [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
   Subject: RE: help me with IIS+tomcat
   Date: Wed, 11 Jul 2001 08:44:27 +0100
   
   Morning all,
   
   another little pointer which does not appear in the
  documents is the fact
   that the config files for Tomcat are formatted by a UNIX
  text editor. We
   installed everything, added the redirector and got a red
  arrow until we
   re-formatted the config files for Windows.
   
   We opened each file in WinBatch and Notepad then copied
  the WinBatch copy
   over the Notepad copy and saved (WinBatch recognises UNIX
  formatting).
   There
   is a way of doing this with vi if you have access but
  recall the exact
   command for this.
   
   Hope this helps
   Chris
   
   -Original Message-
   From: albert [mailto:[EMAIL PROTECTED]]
   Sent: 11 July 2001 08:22
   To: [EMAIL PROTECTED]
   Subject: help me with IIS+tomcat
   
   
   hi, me too
   I us Windows Prof 2000
   and Tomcat 321
   same problem, any help ?
   
   regards
   Albert Oscarina
   System Specialist
   Solution Made Pocketable
   http://www.SMPdirect.com
   Phone : (65) 276 7624
   Fax   : (65) 274 4770
   mail : [EMAIL PROTECTED]
   
   If we have a strong reason, we will find the way
   (Bits  Pieces, The Economics Press)
   
   
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, July 11, 2001 3:17 PM
   To: [EMAIL PROTECTED]
   Subject: RE: help me with IIS+tomcat
   
   
   
   Hi,
   
   I have the same problem  and i'm stuckany idea ?
   
   Thanks,
   
   Hervé.
   
-Message d'origine-
De: Ðì±ó [SMTP:[EMAIL PROTECTED]]
Date: mercredi 11 juillet 2001 07:32
À: [EMAIL PROTECTED]
Objet: help me with IIS+tomcat
   
Hi,
I have tried everything writen in Tomcat IIS HowTo
  but when I
   entered http://bsd.com/examples/jsp/index.html; (My win
  2000 server's
  IIS
   web server's name is bsd.com), the browser always says a
  error of HTTP
  404.
   I think the url is right because if I entered
   http://bsd.com:8080/examples/jsp/index.html;, the browser
  can correctly
   display tomcat jsp examples page. The isapi filter is also
  loaded, the
   workers is setting right. I use Jbuilder4 and download
  tomcat 3.2.2 and
   install it under c:\JBuilder4\tomcat. I have changed
  workers.properties's
   java_home and tomcat_home properties. It still NOT works.
  can you give me
   some information?
  
  
  __
  ___
   Get Your Private, Free E-mail from MSN Hotmail at
 http://www.hotmail.com.




Tomcat 3.2.2 on IIS 5

2001-07-08 Thread David Treves



Hi, I am sorry to raise such an issue as I am sure 
that it was well handled so far, only that I couldn't find any solution to my 
problem in any archive...

I want to have the Tomcat 3.2.2 to serve IIS 5 (out 
of process). I followed the instructions too well... But (there is always a 
'but', ha?!) even when I do see the examples context I get an error at the isapi 
log and at the IIS log:

ISAPI LOG

[jk_uri_worker_map.c (335)]: 
jk_uri_worker_map_t::uri_worker_map_close, NULL 
parameter[jk_uri_worker_map.c (185)]: In 
jk_uri_worker_map_t::uri_worker_map_free, NULL parameters[jk_connect.c 
(143)]: jk_open_socket, connect() failed errno = 61[jk_ajp12_worker.c 
(152)]: In jk_endpoint_t::service, Error sd = -1[jk_isapi_plugin.c (554)]: 
HttpExtensionProc error, service() failed
IIS LOG
---
17:27:28 192.114.206.189 GET 
/jakarta/isapi_redirect.dll 200

I verified also the uriworkermap file to make sure 
the uri will be redirected to the container, yet, nada... Nothing seem to make 
it work 100%.

Furthermore,the contexts I am trying to add don't seem to be available at all (via 
http requests) even though I added them to the server.xml file and to the 
uriworkermap.

I tried to add the following to server.xml file, 
according to another post:

Context 
path="/" 
docBase="/Inetpub/wwwroot" 
crossContext="false" 
debug="0" 
reloadable="true"  /Context

But that didn't help either...

Any ideas? I am lost here... :o(

Thanks in advance!
David.


update jsp:pluggin (applet type)

2001-04-03 Thread David Treves

Hi,

I asked too many people that question, yet no answer... Is there a way
to update the auto-generated code to jsp:pluggin for applet type? I am
using Tomcat 4 (beta 1) and I my user requiered to have 1.3 pluggin for
Java, where can I update that detail?

thanks,
David.




jsp:pluggin question

2001-03-27 Thread David Treves

Hello everybody,

I have two questions:

1. If I want to update the pluggin version that Tomcat should add to the
HTML code while creating the "OBJECT" tag, how can I do it?  (I am talking
about "OBJECT
codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#V
ersion=1,2,2,0"").

2. In order to add PARAM to the applet, I need to create jsp:params and
inside jsp:param name="name" value="value"/. Now, my problem is that I
added the param that way but when I try to use it in the applet
(getParameter("name")) I get the following error in the applet console:
"getParameter(Unknown Source)" pointing to the line with getParameter
method. There is no doubt that I used the same name in the applet and in the
jsp page.

Is there any idea what could go wrong with it?

Thanks, David.




connecting to MS-SQL

2001-02-14 Thread David Treves

Hi,

I am trying to connect to a MS-SQL 7 database. I manage to create all
the necessary object, but when I execute the servlet I get the following
error:

[Microsoft][ODBC Driver Manager] Invalid cursor state

I use JdbcOdbc driver supplied with SDK 1.3

Any idea?

David Treves


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




Re: connecting to MS-SQL

2001-02-14 Thread David Treves

I managed to create the connection, statement and the resultset, the problem
is when I try to get the data:

try
{
  Connection con = broker.getConnection();  //using the DBConnectionBroker
pool
  Statement stmt = con.createStatement();
  ResultSet rs = stmt.executeQuery("SELECT MAX(id) AS 'id' FROM table");

   if (rs.getString(1) != null)  // THIS IS THE PROBLEMATIC PART
  id = String.valueOf(rs.getInt(1) + 1);  // assign an id to the user
   else
  id = "1";
}

note that I have records in the table so it does fetch results.

Thanks,
David.


- Original Message -
From: "Richard Downey" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 14, 2001 3:59 PM
Subject: RE: connecting to MS-SQL


 At what point does it raise that message ? Have you connected OK to the
 Database ? got a Recordset etc.  ? The JDBC-ODBC in SDK 1.3 certainly
works
 with SQL 7 and is very Quick.

 -Original Message-
 From: David Treves [mailto:[EMAIL PROTECTED]]
 Sent: 14 February 2001 13:38
 To: mailing list tomcat-users
 Subject: connecting to MS-SQL


 Hi,

 I am trying to connect to a MS-SQL 7 database. I manage to create all
 the necessary object, but when I execute the servlet I get the following
 error:

 [Microsoft][ODBC Driver Manager] Invalid cursor state

 I use JdbcOdbc driver supplied with SDK 1.3

 Any idea?

 David Treves


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



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



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




adding dynamic content to jsp:param

2001-02-04 Thread David Treves

Hi, I tried to create a page which dynamically will add an id to each user
who enters the page, this id should be used by an applet. In order to do so
I used JSP to create that id, and now I am trying to insert that number as a
parameter to the applet:

jsp:plugin type="applet" code="foo" codebase="/foo/bar" height="400"
width="300"
jsp:params
jsp:param name="id" value="%=jspID%"/
/jsp:params
jsp:fallback
boopsss... can't load the applet!/b
/jsp:fallback
/jsp:plugin

Only that the "%=jspID% is not allowed by the Tomcat, it tells me that the
attribute (id) has no value.
Is there a problem with giving params values that way?

Thanks,
David.



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




applet communicating a servlet

2001-01-30 Thread David Treves

Hi,

I am looking for a "How to" document about that subject, does anyone
know of a good article?

thanks,
David.


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




installing Tomcat 4 (b1) on IIS

2001-01-27 Thread David Treves



hi,

 I want to install Tomcat 4 on 
IIS 5, only that the documents in Jakarta site refer the ver 3. Trying to use 
them didn't make it work...

 Is there anyone who knows what I 
should do in order to install Tomcat 4 on IIS 5?

Thanks,
David Treves


Re: passing an object using sessions - STRANGE???

2001-01-24 Thread David Treves

Hi again,

a strange thing regarding my problem (see at bottom) is that the Tomcat
didn't type any error, it simply made the page unavailable, I defined the
str as a public, yet it didn't help me...

Any other idea?
Thanks and sorry again...   :o)

David.


- Original Message -
From: "Randy Layman" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 23, 2001 7:27 PM
Subject: RE: passing an object using sessions - STRANGE???



 Its probably because the String str is not public, only package
 access.  Tomcat should have complianed and printed out the description of
 the error message to the web browser.  If you have set up some error
pages,
 you might want to comment them out until you get the pages compiling.

 Randy


 -Original Message-----
 From: David Treves [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 23, 2001 12:24 PM
 To: MAILING tomcat
 Subject: passing an object using sessions - STRANGE???


 Hi there, first allow me to apologize for the complexed description...
:o)

 I am trying to pass an object using the HttpSession interface. my object
is:

 class test
 {
 int num = 5;
 String str = "this is the string";
 }

 I added the instance I created in the first JSP page to the session (
 session.setattribute("atr") ), I made sure that session does exist when I
 enter the first JSP page. I linked this page to a servlet, created an
 instance of the HttpSession and tried to get the str/num of that class:

 HttpSession session = request.getSession();
 test foo = (test)session.getAttribute("atr");
 String lala = foo.str;
 out.println("sessionVar: " + lala);

 I get an error ("The page cannot be displayed") because of the third line
 (when I comment it, the servlet IS found and executed...).

 what is wrong???

 Thanks in advance!
 David Treves.



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

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



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




passing an object using sessions - STRANGE???

2001-01-23 Thread David Treves

Hi there, first allow me to apologize for the complexed description...   :o)

I am trying to pass an object using the HttpSession interface. my object is:

class test
{
int num = 5;
String str = "this is the string";
}

I added the instance I created in the first JSP page to the session (
session.setattribute("atr") ), I made sure that session does exist when I
enter the first JSP page. I linked this page to a servlet, created an
instance of the HttpSession and tried to get the str/num of that class:

HttpSession session = request.getSession();
test foo = (test)session.getAttribute("atr");
String lala = foo.str;
out.println("sessionVar: " + lala);

I get an error ("The page cannot be displayed") because of the third line
(when I comment it, the servlet IS found and executed...).

what is wrong???

Thanks in advance!
David Treves.



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




POST/GET problems

2001-01-21 Thread David Treves

Hi,

I recently downloaded Tomcat 4 (b1) from apache site. After installing
it I tried to write a servlet to test it's operation.

I keep getting the following message from the server:

"HTTP Status 405 - HTTP method GET is not supported by this URL. The
specified HTTP method is not allowed for the requested resource (HTTP method
GET is not supported by this URL). "

What could be the problem for that? I defined the mime type
(response.setContentType()). I added a new context for my files, could it be
the problem? is there anywhere I should define something bout get/post?

Thnaks in advance,
David Treves.


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