AW: Re: HELP Wanted

2006-06-14 Thread fray
+2 ;)

>Tom Miller wrote:
>> If none of you volunteer I will have to post my need on the 
>> list and keep bother you all until I get some solution (-: 
>> (-:
>
>Or until I or one of the other list owners get fed up with your spam
>and unsubscribe you. "I'll keep hassling you until you help me" isn't
>what open source is all about.
>
>Mark
>
>
>-
>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]



creating ocol-Extensions

2005-11-13 Thread Florian Fray
Hello,

 

I'm searching for a way to extend Tomcat and let him process some other
protocols instead of HTTP.

I want to use Tomcat for acting as an Open-Source streaming server. 

The stream-controlling protocol(RTSP) makes extensive use of the
HTTP-specifications, so the idea was to just modify the existing
HTTP-Connector to let Tomcat handle the system-level resources like Threads
and stuff and to use Servlets as an application interface. Beside this there
are some other protocols needed to stream the media to the clients based on
UDP.

While having some deeper look at the org.apache.catalina.connector classes
it seems that they are coupled to HTTP and Coyote.

So the first idea seems a bit dirty, cause it would mean to make some deeper
changes which was not intended ;) 

Can anybody please confirm my observations!

 

Kind regards,

 

Florian

 



Re: Tomcat 6 source organisation part 2

2006-03-07 Thread Florian Fray

Hi Remy!

Ok, so I'll (try to) create the structure (not the one in this mail), 
but how is it done in SVN ? Is it all simply folders without anything 
special ?


A simple bunch of "svn mkdir" commands will do its job.
There's nothing special about it.

Regards

Florian



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



Re: Bug report

2006-08-17 Thread Florian Fray

Hi Dimitri,

this is not a Tomcat bug, but look at the second "rs = stmt.executeQuery();"
You closed this "stmt" few lines before and I think you intended to call 
"rs = stmt_jeucode.executeQuery();" instead.


Regards,

Florian


Dimitri Piriou schrieb:

Hello,
 
Sorry if I don't post at the right place but I'm sending you this mail to

make a bug (I think that is one) report. I'm developping a servlet and a
mistake made Tomcat stopping each time my code had to be executed. An
exception was thrown before and here is the extract of Tomcat log file:
 
java.sql.SQLException: No operations allowed after statement closed
 
There was, indeed, an error in my code and I used a preparedStatement I had

already closed but is it normal that Tomcat stopped?

Here is my source code:
 
--

protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
  response.setStatus( HttpServletResponse.SC_OK );
 response.setContentType( "text/vnd.wap.wml" );
 ServletOutputStream out = response.getOutputStream();
 int code_id = Integer.parseInt(request.getParameter("code_id"));
 out.println("");
 out.println("http://www.wapforum.org/DTD/wml_1.1.xml\>
http://www.wapforum.org/DTD/wml_1.1.xml\";>");
 try{
 Class.forName("com.mysql.jdbc.Driver").newInstance();
 java.sql.Connection conn = java.sql.DriverManager.getConnection(
   "jdbc:mysql://localhost/bd?user=user&password=password");
 String useragent = request.getHeader("User-Agent");
 PreparedStatement stmt = conn.prepareStatement("SELECT DISTINCT
nom1_id, nom1, nom2 FROM device NATURAL JOIN nom1 INNER JOIN nom2 ON
nom2.nom2_id = nom1.nom2_id WHERE phone_user_agent = ?");
 stmt.setString(1, useragent);
 ResultSet rs = stmt.executeQuery();
 String nom1 = "";
 String nom2= "";
 
 while (rs.next()) {

  nom1 = rs.getString("nom1");
  nom2 = rs.getString("nom2");
  }
 stmt.close();
 PreparedStatement stmt_jeucode = conn.prepareStatement("SELECT code
FROM codes WHERE code_id = ?");
 stmt_jeucode.setInt(1, code_id);
 rs = stmt.executeQuery(); // Exception levée ici
 String code = "";
 while (rs.next()) {
  code = rs.getString("code");
 }
 String toPrint = "gal" + code_id + "_" + code + "_" + nom2 + "_" +
nom1 + ".jar";
  out.println("" + toPrint +
" doPost");
 
 
 } catch(Exception e){

 System.err.println("Connection ratée: "+e);
 System.exit(-1);  
 }

 out.close();
 }
--
 
 
Best Regards,
 
Dimitri Piriou

Axellance, France

  


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



Re: Bug report

2006-08-17 Thread Florian Fray

Hi Dimitri,

forget this one, I should read the postings completely before responding :-)
So Charly is completely right with his assumption.

Regards,

Florian

Florian Fray schrieb:

Hi Dimitri,

this is not a Tomcat bug, but look at the second "rs = 
stmt.executeQuery();"
You closed this "stmt" few lines before and I think you intended to 
call "rs = stmt_jeucode.executeQuery();" instead.


Regards,

Florian


Dimitri Piriou schrieb:

Hello,
 
Sorry if I don't post at the right place but I'm sending you this 
mail to

make a bug (I think that is one) report. I'm developping a servlet and a
mistake made Tomcat stopping each time my code had to be executed. An
exception was thrown before and here is the extract of Tomcat log file:
 
java.sql.SQLException: No operations allowed after statement closed
 
There was, indeed, an error in my code and I used a preparedStatement 
I had

already closed but is it normal that Tomcat stopped?

Here is my source code:
 
--

protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
  response.setStatus( HttpServletResponse.SC_OK );
 response.setContentType( "text/vnd.wap.wml" );
 ServletOutputStream out = response.getOutputStream();
 int code_id = Integer.parseInt(request.getParameter("code_id"));
 out.println("");
 out.println("1.1//EN\" \"

http://www.wapforum.org/DTD/wml_1.1.xml\>
http://www.wapforum.org/DTD/wml_1.1.xml\";>");
 try{
 Class.forName("com.mysql.jdbc.Driver").newInstance();
 java.sql.Connection conn = 
java.sql.DriverManager.getConnection(

   "jdbc:mysql://localhost/bd?user=user&password=password");
 String useragent = request.getHeader("User-Agent");
 PreparedStatement stmt = conn.prepareStatement("SELECT DISTINCT
nom1_id, nom1, nom2 FROM device NATURAL JOIN nom1 INNER JOIN nom2 ON
nom2.nom2_id = nom1.nom2_id WHERE phone_user_agent = ?");
 stmt.setString(1, useragent);
 ResultSet rs = stmt.executeQuery();
 String nom1 = "";
 String nom2= "";
  while (rs.next()) {
  nom1 = rs.getString("nom1");
  nom2 = rs.getString("nom2");
  }
 stmt.close();
 PreparedStatement stmt_jeucode = 
conn.prepareStatement("SELECT code

FROM codes WHERE code_id = ?");
 stmt_jeucode.setInt(1, code_id);
 rs = stmt.executeQuery(); // Exception levée ici
 String code = "";
 while (rs.next()) {
  code = rs.getString("code");
 }
 String toPrint = "gal" + code_id + "_" + code + "_" + nom2 + 
"_" +

nom1 + ".jar";
  out.println("" + 
toPrint +

" doPost");
 
 
 } catch(Exception e){

 System.err.println("Connection ratée: "+e);
 System.exit(-1);   }
 out.close();
 }
--
 
 
Best Regards,
 
Dimitri Piriou

Axellance, France

  


-
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]



Custom compression filters

2012-09-29 Thread Florian Fray
Dear TC Devs,

while looking around in TC 7 I've found no possibility to plug-in a custom 
compression filter.

So I've had a quick look at the code to find out that the gzip-handling is 
coded into AbstractHttp11Processor.
Though I could create a custom processor, I'd like to know whether there's any 
interest in having the standard processors supporting custom compressions.

Best regards,

Florian


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Custom compression filters

2012-09-30 Thread Florian Fray
Thanks for your reply, Konstantin and Jess.The main reason for adding this feature to the Container is the same as for all features provided by a Container:My applications should not deal with these details.Currently I'm looking at adding Googles Snappy to some servers.I could add filters to my applications, but if possible, I'd like to get around this, as I'd have to do it to a bunch of applications,partially running on the same Tomcat or JBoss instances.I'm currently thinking about which way to go.Patching Tomcat was not that hard and it was fun anyway.Maintaining a custom Tomcat codeline is something I'd like to avoid (I've already got a customized installation, but this deals only with configuration and packaging).Maybe Jess is right and a ServletFilter is not that bad, grmbl :-)I've already implemented an initial version. It's not ideal, but it's enough for me to play around:



TC70x_1390896_compression_filter.patch
Description: Binary data
Your feedback is highly appreciated!Best regards,FlorianAm 30.09.2012 um 10:42 schrieb Konstantin Kolinko:2012/9/29 Florian Fray <f...@itcf.biz>:Dear TC Devs,while looking around in TC 7 I've found no possibility to plug-in a custom compression filter.So I've had a quick look at the code to find out that the gzip-handling is coded into AbstractHttp11Processor.Only HTTP protocol management is performed by AbstractHttp11Processor. The gzip support is just an org.apache.coyote.http11.OutputFilter.Though I could create a custom processor, I'd like to know whether there's any interest in having the standard processors supporting custom compressions.There might be an interest,but until it is really requested by someone, and someone takes thetime to implement it (aka scratch their own itch), very little can bedone.  Do you care to explain what "custom" compressions do you need?Can you propose a patch?If you need help to understand Tomcat code / writing a patch, just askon this list.2012/9/30 Jess Holle <je...@ptc.com>:It is quite possible to write a custom compression filter as a servletfilter that will work across multiple servlet engines.+1.There is a sample gzip filter in the examples webapp(compressionFilters.CompressionFilter).There exists a gzip filter in the Ehcache project.It is likely that there are others as well.Best regards,Konstantin Kolinko-To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.orgFor additional commands, e-mail: dev-h...@tomcat.apache.org