Tomcat Version problem

2007-07-05 Thread Girish Havaldar

Hi,

we have an application developed using the following components as listed below

mysql 5.0.27
jdk 1.5.0_06
jre  1.5.0_06
tomcat5.5.20
Apache   2
phpMyAdmin   2.9.2
Servlets  2.3
JSP1.2

Our application is showing errors when deployed on tomcat 5.5.9(the
Hosting company is using Tomcat 5.5.9.)
so what is the solution.
Also plz send me info abt hosting comapny who can support the above
specification.


Thank you,

Girish S.Havaldar.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread Gregor Schneider

Sorry, my cristal ball just f'd up, therefore I'm neither able to see
the errors thrown up nor a possible solution for them.

Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread Girish Havaldar

On 05/07/07, Girish Havaldar <[EMAIL PROTECTED]> wrote:

Hi,

we have an application developed using the following components as listed

below


mysql 5.0.27
jdk 1.5.0_06
jre  1.5.0_06
tomcat5.5.20
Apache   2
phpMyAdmin   2.9.2
Servlets  2.3
JSP1.2

 Our application is showing errors when deployed on tomcat 5.5.9(the
Hosting company is using Tomcat 5.5.9.)

ERROR:
type Exception report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
Type mismatch: cannot convert from Integer to int

An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
The method add(int, Object) in the type ArrayList is not applicable for the
arguments (int)

An error occurred at line: 226 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)

An error occurred at line: 263 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)


   org.apache.jasper.compiler.DefaultErrorHandler.javacError(
DefaultErrorHandler.java:84)
   org.apache.jasper.compiler.ErrorDispatcher.javacError(
ErrorDispatcher.java:328)
   org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
:397)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
   org.apache.jasper.JspCompilationContext.compile(
JspCompilationContext.java:556)
   org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:293)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.9 logs.



 so what is the solution.
Also plz send me info abt hosting comapny who can support the above
specification.


Thank you,

Girish S.Havaldar.



Re: Tomcat Version problem

2007-07-05 Thread Gregor Schneider

well, the error-log is giving you pretty good hints:



An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
Type mismatch: cannot convert from Integer to int

An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
The method add(int, Object) in the type ArrayList is not applicable for the
arguments (int)

An error occurred at line: 226 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)

An error occurred at line: 263 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)


My guess is, that you've developed your JSPs using a different JDK
than what your client is running, and some method-signatures seem to
have changed between the different JDKs.

Check what JDK your client is running, compare them and then fix your
code accordingly.

HTH

Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread Girish Havaldar

Thanks man,


On 05/07/07, Gregor Schneider <[EMAIL PROTECTED]> wrote:


well, the error-log is giving you pretty good hints:


> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> Type mismatch: cannot convert from Integer to int
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> The method add(int, Object) in the type ArrayList is not applicable for
the
> arguments (int)
>
> An error occurred at line: 226 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is
not
> applicable for the arguments (String, int)
>
> An error occurred at line: 263 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is
not
> applicable for the arguments (String, int)
>
My guess is, that you've developed your JSPs using a different JDK
than what your client is running, and some method-signatures seem to
have changed between the different JDKs.

Check what JDK your client is running, compare them and then fix your
code accordingly.

HTH

Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat Version problem

2007-07-05 Thread Peng Tuck Kwok

Sounds like that are a lot of type mis-match  in the generated servlets, I'd
have a look at the JSP's to see if there's anything like that in there and
correct it.

On 7/5/07, Gregor Schneider <[EMAIL PROTECTED]> wrote:


well, the error-log is giving you pretty good hints:


> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> Type mismatch: cannot convert from Integer to int
>
> An error occurred at line: 67 in the jsp file: /classification.jsp
> Generated servlet error:
> The method add(int, Object) in the type ArrayList is not applicable for
the
> arguments (int)
>
> An error occurred at line: 226 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is
not
> applicable for the arguments (String, int)
>
> An error occurred at line: 263 in the jsp file: /classification.jsp
> Generated servlet error:
> The method setAttribute(String, Object) in the type ServletRequest is
not
> applicable for the arguments (String, int)
>
My guess is, that you've developed your JSPs using a different JDK
than what your client is running, and some method-signatures seem to
have changed between the different JDKs.

Check what JDK your client is running, compare them and then fix your
code accordingly.

HTH

Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Missing JMX.jar in Tomcat 5.5.23?

2007-07-05 Thread Johnny Kewl
No, that stuff is not relevent, in the BAT (SH) files, the TC guys having 
given you the ability to make a digest or a hash of passwords to hide them 
in the realm, if u want to.
And all they saying is that you dont have to use the whole of TC to make 
them (hashes), and can just use a few classes but if you have the whole 
of TC, you dont need that I dont have JMX.jar in my embedded stuff and I 
dont see the jar in either 5.5.23 or 6.013


javax.management.MBeanRegistration is part of the 1.5 JRE and JDK, so its 
something else... I suspect the either the JRE is old, or you trying to 
start TC, and havnt initialized in properly in the embedded code. I imagine 
that you have a full TC running on that machine, so I think its the later, 
TC is not intialized and it cant start because it hasnt setup JMX and all 
the rest of it.


If you doing embedded stuff, look at the articles, but also study the 
org.apache.catalina.startup.Catalina file to see how TC actually starts 
itself.
I embed in a very unusual way ie I dont go through the embedded class, I 
actually just start TC up thru Catalina what that does is make it use 
all the mormal configuration files ie Server.xml etc... if you dont mind 
shipping that with your application.
Its just easier because the exact same settings work as with the full TC 
and setting up things like Realms and JNDI via an embedded environment 
well I havnt seen anyone that has done it, in the embedded environment.


Also rather embed with 6.0.13 the file structure is just much 
simpler.

If my way floats your boat ;)... drop me an email, I'll give you the code.


- Original Message - 
From: "Jesse Barnum" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Thursday, July 05, 2007 2:05 AM
Subject: Missing JMX.jar in Tomcat 5.5.23?


When I try to embed Tomcat 5.5.23 into my application, I get an error 
message about a missing MBeanRegistration (see stack trace at end).  It 
seems like I need JMX.jar. This document ( http:// 
tomcat.apache.org/tomcat-5.5-doc/realm-howto.html ) states that "you  will 
need the JMX jar and the commons-logging jar (either commons- 
logging-api.jar or commons-logging.jar). Both of these are included  with 
the Tomcat distribution", but I don't see JMX.jar anywhere in  the core 
distribution.


Exception in thread "main" java.lang.NoClassDefFoundError: javax/ 
management/MBeanRegistration

at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass 
(SecureClassLoader.java:123)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass 
(SecureClassLoader.java:123)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at com.prosc.servlet.embedded.TomcatWrapper.start(TomcatWrapper.java: 75)
at com.prosc.servertoolbox.plugin.ServerToolboxModel.start 
(ServerToolboxModel.java:25)
at com.prosc.servertoolbox.plugin.ServerToolboxModel.main 
(ServerToolboxModel.java:36)



--Jesse Barnum, President, 360Works
http://www.360works.com
(770) 234-9293



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to manipulate static content

2007-07-05 Thread David Delbecq
The easiest way is to subclass HttpServletResponseWrapper.
Override the methods 'getOutputStream' and 'getWriter()' (not sure
getWriter is really used by static content serving, so you may not have
to code something there). Basically, make a ByteArrayOutputStream as the
result of getOutputStream, and have the writer use that stream.

After calling chain, response is buffered in byteArrayOutputStream, you
can chunk/zip it as you want and write result to real outputStream.

/*add headers*/
myResponse = new MyHttpServletResponseWrapper(response);
chain.doFilter(myResponse,request);
sendAsChunkOrZipOrWhatever(response.getOutputStream(),myResponse.getByteArrayOutputStream().toByteArray());
return;

also, look here
http://tomcat.apache.org/tomcat-5.0-doc/config/http.html
for the 'compression' attributes of http connector.

En l'instant précis du 05/07/07 08:37, lior grinfeld s'exprimait en ces
termes:
> Thanks Pierre,
>
> for sure i will use that info, but now i am not writing a server, as i
> wrote
> earlier, i use tomcat to test a proxy.
> i am interested to see how my proxy behave when i send it the data
> chunked
> or zip the data. and i want this to be in reference to regular files.
>
> so basically all i want is to use the default servlet to return static
> content in one test and afterwards to return the same content but this
> time
> it will be zip or use chunk to transfer the content.
>
> i do not want to write servlets to each one of the behaviors, that i
> why i
> thought that the idea of writing filter (by David) was good.
> if i could do some kind of HttpServletResponseWrapper (as i saw in the
> j2ee
> tutorial) it will be excellent.
>
> Regards
> Lior
>
> On 7/4/07, Pierre Goupil <[EMAIL PROTECTED]> wrote:
>>
>> Lior,
>>
>> Basically, I think that you need to handle the response by yourself.
>>
>> For instance, if you want to send an image :
>>
>> ***
>> RenderedImage rimg = ImageIO.read(new File(img));
>> OutputStream os = response.getOutputStream(); // <=== get
>> the
>> response to be able to re-write it
>> ImageIO.write(rimg, "jpg", os);
>> os.close();
>> ***
>>
>>
>> In my example I assumed that the MIME content-type was set to the
>> relevant
>> value, since you said that your headers were OK. But anyway, here is my
>> stuff to do so :
>>
>>
>> ***
>> response.setContentType("image/jpg");
>> ***
>>
>>
>>
>> But if you want to be able to send a file for the browser to download
>> it,
>> or
>> to be able to send several different types of data all in one response,
>> you
>> need a multi-part response :
>>
>>
>> ***
>> response.setHeader("Content-Disposition",
>> "attachment;filename=\"test.doc\
>> "");
>> // <=== here
>> response.setContentType("text/doc");
>> out = response.getWriter();
>> out.print("what you wish");
>>
>> response.setContentType("image/png");
>> out = response.getWriter();
>> out.print("what you wish too");
>> out.close();
>> ***
>>
>>
>> Be aware that without a multi-part response, you can only set one
>> content-type. If you try and set it a second time, Tomcat will give
>> you a
>> (beautiful) exception saying something like (can't remember exactly)
>> "content-type has already been set".
>>
>> Here is a list of MIME-types, FYI :
>>
>> http://plugindoc.mozdev.org/winmime.html
>>
>> With this technique of multi-part response, you can for instance turn a
>> JSP
>> to a Word file : you set the response type to .doc and let Tomcat render
>> its
>> JSP compiled to HTML into it. Then the browser received a .doc file with
>> regular HTML into it, which word is able to read... et voilà !
>>
>>
>> Regards,
>>
>>
>> Pierre
>>
>>
>>
>> 2007/7/4, lior grinfeld <[EMAIL PROTECTED]>:
>> >
>> > you were right, 10X.
>> >
>> > now i am facing yet one more challenge.
>> > i made filter  to overwrite the response, i added headers as i want
>> and
>> it
>> > works fine.
>> > now i want to manipulate the content , to do zip or to chunk the data.
>> >
>> > i tried to do StreamResponseWrapper that extends
>> > HttpServletResponseWrapper, without success.
>> > any ideas on how to implement it?
>> >
>> > 10X
>> > Lior
>> >
>> >
>> > On 7/4/07, David Delbecq <[EMAIL PROTECTED]> wrote:
>> > >
>> > > Could it be you forgot to call
>> filterChain.doFilter(request.response)
>> > > after adding your headers?
>> > >
>> > > En l'instant précis du 04/07/07 14:18, lior grinfeld s'exprimait en
>> ces
>> > > termes:
>> > > > Thanks for the tip, i used filters.
>> > > >
>> > > > now i facing other problem. if I use filter with request to static
>> > > > content (
>> > > > i did not write servlet for it , i want the defaultServlet to
>> handle
>> > it)
>> > > > for some reason i do not get the content, it looks like the
>> > > > defaultServlet
>> > > > is doing nothing now, without filter it return the file i ask,
>> with
>> > > > filter
>> > > > just the data the filter added.
>> > > > any ideas?
>> > > >
>> > > > 10X
>> > > > Lior
>> > > >
>> > > > On 7/4/07, David Delbecq <

Re: Tomcat Version problem

2007-07-05 Thread Girish Havaldar

wht i think is a version problem,
how to check versions of servlets,jsp,
how 'll come to kn which version v r using


On 05/07/07, Peng Tuck Kwok <[EMAIL PROTECTED]> wrote:


I have no idea where your line numbers are but the jsp compiler is already
asking you to look at 67, 223, 226 in your JSP. Possibly you get cast
exceptions because whatever you are trying to cast to isn't cast-able or
converted. Also please double check the types of the objects you are
passing
into the methods, the compiler seems to be complaining about it.


On 7/5/07, Girish Havaldar <[EMAIL PROTECTED]> wrote:
>
> ths is the jsp page:
>
>
> <[EMAIL PROTECTED] import="java.sql.*,java.util.*,logcheck.settings" 
errorPage="
> errorpage.jsp"%>
> 
> 
>  classification
> 
> 
> 
>  onSubmit="return check()">
><%
>
> settings set=new settings();
> int flag = 0;
> flag = set.islogedin(request,response);
>  if(flag!=1){
>   out.println("Your  session is
> invalidate..Press F5 or refresh it");
>
>   }
> else if(session.isNew()){
> out.println("
> parent.location.href='expair.jsp';");
> }
> else
> {
>
>   %>
>
>  
>   function check()
> {
>   var id = document.getElementById("clname");
>   if(id.value ==''){
>   alert("Empty");
>   return false;
> }
>  return true;
>   }
>
>function ses_check(url)
>{
>  if(confirm("It will delete all the question coming under
this
> Classification ! DO You Want to Proceed ")){
>  document.location.href=url;
>
>}
>}
>
>
>function online(level,cid)
>{
>
> document.location.href="online.jsp
?level="+level+"&CID="+cid+"&e_type=1";
>
>}
>
>function written(level,cid)
>{
>document.location.href="wedastr.jsp
> ?level="+level+"&CID="+cid+"&e_type=0";
>
>}
>function onlineedit(level,cid)
>{
>document.location.href="mangquest.jsp
> ?e_type=1&sel_level="+level+"&CID="+cid+"";
>}
>
>function writtenedit(level,cid)
>{
>  document.location.href="mangquest.jsp
> ?sel_level="+level+"&CID="+cid+"&e_type=0"
> ;
>}
>
>
>   
>
> <%
>   int userid=0;
> if(session.getAttribute("uid")!=null){
>  userid=
> Integer.valueOf(""+session.getAttribute("uid"));
>
> }
> else{
> out.println("
> parent.location.href='expair.jsp';");
> }
>
> PreparedStatement stmt = null;
>   Connection conn= null;
>  ResultSet resultset=null;
> ResultSet resultset1=null;
>   ResultSet result=null;
>ResultSet res=null;
>ResultSet resdel=null;
>   Statement statement=null;
> Statement statement1=null;
>
>   String subject=new String();
>   String class_name=new String();
>   String noqt=new String();
>
> conn=set.getcon();
> String PID_str = request.getParameter("PID");
> int PID=0;
>
> statement = conn.createStatement();
> statement1 = conn.createStatement();
>
>  String delete = request.getParameter("delete");
>
>  if((request.getParameter("delete")!= null) && (
> request.getParameter
> ("delete").equals("yes")))
>{
>   ResultSet rss=null;
> int C_Id_todel = Integer.parseInt(
> request.getParameter("CID"));
> ArrayList tnoarr=new ArrayList();
>  ArrayList cidarr=new ArrayList();
>  if((request.getParameter("CID") != null)&&(userid !=
0))
>  {
> cidarr.clear();
> int avail=0;
> rss=statement.executeQuery("select CID from
> classification where PID="+C_Id_todel+" and UID="+userid+" ");
> while(rss.next())
> {
> avail=1;
> }
> if(avail==1){
> out.println(" language='javascript'>alert('NOT POSSIBLEit contains a sub
> classification');");
> }
> else{
> rss=statement.executeQuery("select T_No from
> questionbank where CID="+C_Id_todel+" ");
>  while(rss.next())
>  {
>  tnoarr.add(rss.getInt(1));
>  }
> statement.execute("delete from
classification
> where CID="+C_Id_todel+" and UID="+userid+"");
>

Tomcat, Girish Havaldar has invited you to open a Google mail account

2007-07-05 Thread Girish Havaldar

I have been using Gmail and thought you might like to try it out. Here
is an invitation to create an account. it 'll be of greate use during
Discussion on any topic

---
Girish Havaldar has invited you to open a free Google Mail account.

To accept this invitation and register for your account, visit
http://mail.google.com/mail/a-ab9405b2e8-55926ba346-436b6d7a34

Once you create your account, Girish Havaldar will be notified with
your new email address so you can stay in touch with Google Mail!

If you have not already heard about Google Mail, it is a new search
based webmail service that offers:

- Over 2,500 megabytes (two gigabytes) of free storage
- Built in Google search that instantly finds any message you want
- Automatic arrangement of messages and related replies into "conversations"
- Powerful spam protection using innovative Google technology
- No large, annoying ads; just small text ads and related pages that
are relevant to the content of your messages

To learn more about Google Mail before registering, visit:
http://mail.google.com/mail/help/intl/en_GB/benefits.html

And, to see how easy it can be to switch to a new email service, check
out our new switch guide: http://mail.google.com/mail/help/switch/

We are still working every day to improve Google Mail, so we might ask
for your comments and suggestions periodically.  We hope that you will
like Google Mail.  We do.  And, it is only going to get better.

Thank you,

The Google Mail Team

(If clicking the URLs in this message does not work, copy and paste
them into the address bar of your browser).

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread Peng Tuck Kwok

I have no idea where your line numbers are but the jsp compiler is already
asking you to look at 67, 223, 226 in your JSP. Possibly you get cast
exceptions because whatever you are trying to cast to isn't cast-able or
converted. Also please double check the types of the objects you are passing
into the methods, the compiler seems to be complaining about it.


On 7/5/07, Girish Havaldar <[EMAIL PROTECTED]> wrote:


ths is the jsp page:


<[EMAIL PROTECTED] import="java.sql.*,java.util.*,logcheck.settings" errorPage="
errorpage.jsp"%>


 classification




   <%

settings set=new settings();
int flag = 0;
flag = set.islogedin(request,response);
 if(flag!=1){
  out.println("Your  session is
invalidate..Press F5 or refresh it");

  }
else if(session.isNew()){
out.println("
parent.location.href='expair.jsp';");
}
else
{

  %>
   
 
  function check()
{
  var id = document.getElementById("clname");
  if(id.value ==''){
  alert("Empty");
  return false;
}
 return true;
  }

   function ses_check(url)
   {
 if(confirm("It will delete all the question coming under this
Classification ! DO You Want to Proceed ")){
 document.location.href=url;

   }
   }


   function online(level,cid)
   {

document.location.href="online.jsp?level="+level+"&CID="+cid+"&e_type=1";

   }

   function written(level,cid)
   {
   document.location.href="wedastr.jsp
?level="+level+"&CID="+cid+"&e_type=0";

   }
   function onlineedit(level,cid)
   {
   document.location.href="mangquest.jsp
?e_type=1&sel_level="+level+"&CID="+cid+"";
   }

   function writtenedit(level,cid)
   {
 document.location.href="mangquest.jsp
?sel_level="+level+"&CID="+cid+"&e_type=0"
;
   }


  

<%
  int userid=0;
if(session.getAttribute("uid")!=null){
 userid=
Integer.valueOf(""+session.getAttribute("uid"));

}
else{
out.println("
parent.location.href='expair.jsp';");
}

PreparedStatement stmt = null;
  Connection conn= null;
 ResultSet resultset=null;
ResultSet resultset1=null;
  ResultSet result=null;
   ResultSet res=null;
   ResultSet resdel=null;
  Statement statement=null;
Statement statement1=null;

  String subject=new String();
  String class_name=new String();
  String noqt=new String();

conn=set.getcon();
String PID_str = request.getParameter("PID");
int PID=0;

statement = conn.createStatement();
statement1 = conn.createStatement();

 String delete = request.getParameter("delete");

 if((request.getParameter("delete")!= null) && (
request.getParameter
("delete").equals("yes")))
   {
  ResultSet rss=null;
int C_Id_todel = Integer.parseInt(
request.getParameter("CID"));
ArrayList tnoarr=new ArrayList();
 ArrayList cidarr=new ArrayList();
 if((request.getParameter("CID") != null)&&(userid != 0))
 {
cidarr.clear();
int avail=0;
rss=statement.executeQuery("select CID from
classification where PID="+C_Id_todel+" and UID="+userid+" ");
while(rss.next())
{
avail=1;
}
if(avail==1){
out.println("alert('NOT POSSIBLEit contains a sub
classification');");
}
else{
rss=statement.executeQuery("select T_No from
questionbank where CID="+C_Id_todel+" ");
 while(rss.next())
 {
 tnoarr.add(rss.getInt(1));
 }
statement.execute("delete from classification
where CID="+C_Id_todel+" and UID="+userid+"");
for(int j=0;j");
}else{
  PID = Integer.parseInt(PID_str);
  out.println("");
}
if(PID != -1){
   ResultSet rs1=statement.executeQuery("select
PID,class_name,level_disp from classification where CID="+PID+"");
 while(rs1.next())
 {
subject=(rs1.getString(2));
String show_level=rs

Re: Tomcat Version problem

2007-07-05 Thread Girish Havaldar

ths is the jsp page:


<[EMAIL PROTECTED] import="java.sql.*,java.util.*,logcheck.settings" errorPage="
errorpage.jsp"%>
   
   
classification
   
   
   
   
  <%

   settings set=new settings();
   int flag = 0;
   flag = set.islogedin(request,response);
if(flag!=1){
 out.println("Your  session is
invalidate..Press F5 or refresh it");

 }
   else if(session.isNew()){
   out.println("
parent.location.href='expair.jsp';");
   }
   else
   {

 %>
  

 function check()
   {
 var id = document.getElementById("clname");
 if(id.value ==''){
 alert("Empty");
 return false;
   }
return true;
 }

  function ses_check(url)
  {
if(confirm("It will delete all the question coming under this
Classification ! DO You Want to Proceed ")){
document.location.href=url;

  }
  }


  function online(level,cid)
  {

document.location.href="online.jsp?level="+level+"&CID="+cid+"&e_type=1";

  }

  function written(level,cid)
  {
  
document.location.href="wedastr.jsp?level="+level+"&CID="+cid+"&e_type=0";

  }
  function onlineedit(level,cid)
  {
  document.location.href="mangquest.jsp
?e_type=1&sel_level="+level+"&CID="+cid+"";
  }

  function writtenedit(level,cid)
  {

document.location.href="mangquest.jsp?sel_level="+level+"&CID="+cid+"&e_type=0"
;
  }


 

   <%
 int userid=0;
   if(session.getAttribute("uid")!=null){
userid=
Integer.valueOf(""+session.getAttribute("uid"));

   }
   else{
   out.println("
parent.location.href='expair.jsp';");
   }

   PreparedStatement stmt = null;
 Connection conn= null;
ResultSet resultset=null;
   ResultSet resultset1=null;
 ResultSet result=null;
  ResultSet res=null;
  ResultSet resdel=null;
 Statement statement=null;
   Statement statement1=null;

 String subject=new String();
 String class_name=new String();
 String noqt=new String();

   conn=set.getcon();
   String PID_str = request.getParameter("PID");
   int PID=0;

   statement = conn.createStatement();
   statement1 = conn.createStatement();

String delete = request.getParameter("delete");

if((request.getParameter("delete")!= null) && (request.getParameter
("delete").equals("yes")))
  {
 ResultSet rss=null;
   int C_Id_todel = Integer.parseInt(
request.getParameter("CID"));
   ArrayList tnoarr=new ArrayList();
ArrayList cidarr=new ArrayList();
if((request.getParameter("CID") != null)&&(userid != 0))
{
   cidarr.clear();
   int avail=0;
   rss=statement.executeQuery("select CID from
classification where PID="+C_Id_todel+" and UID="+userid+" ");
   while(rss.next())
   {
   avail=1;
   }
   if(avail==1){
   out.println("alert('NOT POSSIBLEit contains a sub
classification');");
   }
   else{
   rss=statement.executeQuery("select T_No from
questionbank where CID="+C_Id_todel+" ");
while(rss.next())
{
tnoarr.add(rss.getInt(1));
}
   statement.execute("delete from classification
where CID="+C_Id_todel+" and UID="+userid+"");
   for(int j=0;j");
   }else{
 PID = Integer.parseInt(PID_str);
 out.println("");
   }
   if(PID != -1){
  ResultSet rs1=statement.executeQuery("select
PID,class_name,level_disp from classification where CID="+PID+"");
while(rs1.next())
{
   subject=(rs1.getString(2));
   String show_level=rs1.getString(3);
   int back=rs1.getInt(1);

   out.println("Under the heirarchy of  "+subject+"
 and Level "+show_level+" 
");
out.println(" Back");

}
   }


   %>

Add More



<% result=statement.executeQuery("select * from level
");
while(result.next())
{
out.println(" 
"+result.getString(3)+""

Re: Form authentication with captcha...

2007-07-05 Thread rpr_listas

Hi David,

I don't like realm because I don't want to implement a new 
authentication repository, I only want to implement a new authentication 
method. Doing this at the realm level limit the possibilities of the 
form, i want to do captcha validation when the user has has tw 
consecutive errors from the same IP. How realm can access this data?


Thanks in advance.
Ricardo.

David Delbecq escribió:

En l'instant précis du 04/07/07 10:15, rpr_listas s'exprimait en ces
termes:
  

Hello David,

I know that this is out of the specification, and bind my application
to this server implementation, but modify the realm has the same
problem, transform my application in a tomcat-only application.


Indeed it would make your application work only with server
authentification that split password in 2 parts (password/captcha), but
1) it's easier to make and maintain a custom realm accros tomcat version
than patch tomcat authentificator.
2) if you need to switch later from tomcat to jboss or other container,
all you have is to recode for that server an equivalent of your realm
(most server provide such support for user authentifications), while
doing a fix similar to the one of authentificator might prove more
difficult as not an expected point of extension.
3) If you limit change to realm, other webapplications can still run
without trouble on your tomcat, this include the tomcat manager, tomcat
admin, that are commonly deployed on tomcat.

  

Build a custom authentication is not solution, because this disconnect
the application from the J2EE standard, and I prefer to fit to
standards in the rest of the application. I think that the better
approach could be a custom authentication servlet and this servlet
store a new Principal in the container. But i think that in J2EE can't
access to do this from servlet.


Indeed it can't really do it, but you could perhaps use and
authentification filter like this:
http://securityfilter.sourceforge.net/

There is even a discussion on how to pass additional arguments to it's
authentification mecanism:

http://sourceforge.net/forum/forum.php?thread_id=1527995&forum_id=200424
  

Best regards.
Ricardo

David Delbecq escribió:


Hello,

Form authnetificator does form based authentification regarding the
corresponding J2EE specifications, which specify the submit name of the
username field (j_username), the submit name of the user password
(j_passwrd), and that's all. Of course you, developper of webapplication
can customize form (adding company logo, etc), but the specs states that
user must provide username and password and submit it to
/j_security_check url. Adding a captcha in this specs or other
informations is not possible like that.

The only 2 ways i see to add captcha and not break specs is either

1) to create a realm that expect the captcha to be appended or perpended
to password.
eg:
j_username: johnSmith
j_password: [EMAIL PROTECTED]
The realm could probably compare the provided captcha with some value
stored somewhere else
the j_password field could be constructed, client side, with javascript,
from 2 not submitted fields.

or
2) Don't rely on container security and provide your own security with
you own whatever forms.


En l'instant précis du 03/07/07 10:45, rpr_listas s'exprimait en ces
termes:
 
  

Hi all!

I'm thinking in implement a captcha
(http://en.wikipedia.org/wiki/Captcha) protection for web-based
authentication. I'm looking in the tomcat surce and the form
authentication seems be implemented by
org.apache.catalina.authenticator.FormAuthenticator class.  But I'm
not sure if change this class is the right way.

Are there other better method to do this?
Must I change the FormAutenticator class or must extend it in other
class and i can refer to it in the tomcat configuration ?

Thanks in advance and best regards.
Ricardo.







Re: Tomcat Version problem

2007-07-05 Thread Johnny Kewl
Ha, that will teach you to use the latest and greatest template collections 
;)
If you using Netbeans, just right click on the project and move the source 
level down to 1.4... I think you going to find all your problems


- Original Message - 
From: "Girish Havaldar" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, July 05, 2007 9:37 AM
Subject: Re: Tomcat Version problem



On 05/07/07, Girish Havaldar <[EMAIL PROTECTED]> wrote:

Hi,

we have an application developed using the following components as listed

below


mysql 5.0.27
jdk 1.5.0_06
jre  1.5.0_06
tomcat5.5.20
Apache   2
phpMyAdmin   2.9.2
Servlets  2.3
JSP1.2

 Our application is showing errors when deployed on tomcat 5.5.9(the
Hosting company is using Tomcat 5.5.9.)

ERROR:
type Exception report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
Type mismatch: cannot convert from Integer to int

An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
The method add(int, Object) in the type ArrayList is not applicable for 
the

arguments (int)

An error occurred at line: 226 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)

An error occurred at line: 263 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)


   org.apache.jasper.compiler.DefaultErrorHandler.javacError(
DefaultErrorHandler.java:84)
   org.apache.jasper.compiler.ErrorDispatcher.javacError(
ErrorDispatcher.java:328)
   org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
:397)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
   org.apache.jasper.JspCompilationContext.compile(
JspCompilationContext.java:556)
   org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:293)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.9 logs.



 so what is the solution.
Also plz send me info abt hosting comapny who can support the above
specification.


Thank you,

Girish S.Havaldar.






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread Johnny Kewl

I see one problem.. see note below
- Original Message - 
From: "Girish Havaldar" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Thursday, July 05, 2007 10:00 AM
Subject: Re: Tomcat Version problem



ths is the jsp page:


<[EMAIL PROTECTED] import="java.sql.*,java.util.*,logcheck.settings" errorPage="
errorpage.jsp"%>
   
   
classification
   
   
   
   
  <%

   settings set=new settings();
   int flag = 0;
   flag = set.islogedin(request,response);
if(flag!=1){
 out.println("Your  session is
invalidate..Press F5 or refresh it");

 }
   else if(session.isNew()){
   out.println("
parent.location.href='expair.jsp';");
   }
   else
   {

 %>
  

 function check()
   {
 var id = document.getElementById("clname");
 if(id.value ==''){
 alert("Empty");
 return false;
   }
return true;
 }

  function ses_check(url)
  {
if(confirm("It will delete all the question coming under this
Classification ! DO You Want to Proceed ")){
document.location.href=url;

  }
  }


  function online(level,cid)
  {

document.location.href="online.jsp?level="+level+"&CID="+cid+"&e_type=1";

  }

  function written(level,cid)
  {

document.location.href="wedastr.jsp?level="+level+"&CID="+cid+"&e_type=0";

  }
  function onlineedit(level,cid)
  {
  document.location.href="mangquest.jsp
?e_type=1&sel_level="+level+"&CID="+cid+"";
  }

  function writtenedit(level,cid)
  {

document.location.href="mangquest.jsp?sel_level="+level+"&CID="+cid+"&e_type=0"
;
  }


 

   <%
 int userid=0;
   if(session.getAttribute("uid")!=null){


-
YOU MIXING TYPES HERE. USE...

Integer.parseInt(""+session.getAttribute("uid"));  // have to put it in a 
try catch

-


userid=
Integer.valueOf(""+session.getAttribute("uid"));

   }
   else{
   out.println("
parent.location.href='expair.jsp';");
   }

   PreparedStatement stmt = null;
 Connection conn= null;
ResultSet resultset=null;
   ResultSet resultset1=null;
 ResultSet result=null;
  ResultSet res=null;
  ResultSet resdel=null;
 Statement statement=null;
   Statement statement1=null;

 String subject=new String();
 String class_name=new String();
 String noqt=new String();

   conn=set.getcon();
   String PID_str = request.getParameter("PID");
   int PID=0;

   statement = conn.createStatement();
   statement1 = conn.createStatement();

String delete = request.getParameter("delete");

if((request.getParameter("delete")!= null) && 
(request.getParameter

("delete").equals("yes")))
  {
 ResultSet rss=null;
   int C_Id_todel = Integer.parseInt(
request.getParameter("CID"));
   ArrayList tnoarr=new ArrayList();
ArrayList cidarr=new ArrayList();
if((request.getParameter("CID") != null)&&(userid != 0))
{
   cidarr.clear();
   int avail=0;
   rss=statement.executeQuery("select CID from
classification where PID="+C_Id_todel+" and UID="+userid+" ");
   while(rss.next())
   {
   avail=1;
   }
   if(avail==1){
   out.println("alert('NOT POSSIBLEit contains a sub
classification');");
   }
   else{
   rss=statement.executeQuery("select T_No from
questionbank where CID="+C_Id_todel+" ");
while(rss.next())
{
tnoarr.add(rss.getInt(1));
}
   statement.execute("delete from classification
where CID="+C_Id_todel+" and UID="+userid+"");
   for(int j=0;j");
   }else{
 PID = Integer.parseInt(PID_str);
 out.println("");
   }
   if(PID != -1){
  ResultSet rs1=statement.executeQuery("select
PID,class_name,level_disp from classification where CID="+PID+"");
while(rs1.next())
{
   subject=(rs1.getString(2));
   String show_level=rs1.getString(3);
   int back=rs1.getInt(1);

   out.println("Under the he

Re: Form authentication with captcha...

2007-07-05 Thread David Smith
I think what you are after is well beyond tomcat's realm 
authentication/authorization implementation. 

You could implement your own login page and filter (notice I didn't 
mention realm).  The login page/servlet can validate users, track the 
error rate and opt for showing CAPTCHA as necessary.  The filter would 
simply check for valid login and redirect to the login page/servlet as 
necessary. 

To fully mimic the tomcat realm for the rest of the app, wrap the 
request overriding the getRemoteUser() method to return the username of 
the logged in user.  That's as easy as extending HttpServletRequestWrapper.


--David

rpr_listas wrote:

Hi David,

I don't like realm because I don't want to implement a new 
authentication repository, I only want to implement a new 
authentication method. Doing this at the realm level limit the 
possibilities of the form, i want to do captcha validation when the 
user has has tw consecutive errors from the same IP. How realm can 
access this data?


Thanks in advance.
Ricardo.

David Delbecq escribió:

En l'instant précis du 04/07/07 10:15, rpr_listas s'exprimait en ces
termes:
 

Hello David,

I know that this is out of the specification, and bind my application
to this server implementation, but modify the realm has the same
problem, transform my application in a tomcat-only application.


Indeed it would make your application work only with server
authentification that split password in 2 parts (password/captcha), but
1) it's easier to make and maintain a custom realm accros tomcat version
than patch tomcat authentificator.
2) if you need to switch later from tomcat to jboss or other container,
all you have is to recode for that server an equivalent of your realm
(most server provide such support for user authentifications), while
doing a fix similar to the one of authentificator might prove more
difficult as not an expected point of extension.
3) If you limit change to realm, other webapplications can still run
without trouble on your tomcat, this include the tomcat manager, tomcat
admin, that are commonly deployed on tomcat.

 

Build a custom authentication is not solution, because this disconnect
the application from the J2EE standard, and I prefer to fit to
standards in the rest of the application. I think that the better
approach could be a custom authentication servlet and this servlet
store a new Principal in the container. But i think that in J2EE can't
access to do this from servlet.


Indeed it can't really do it, but you could perhaps use and
authentification filter like this:
http://securityfilter.sourceforge.net/

There is even a discussion on how to pass additional arguments to it's
authentification mecanism:

http://sourceforge.net/forum/forum.php?thread_id=1527995&forum_id=200424
 

Best regards.
Ricardo

David Delbecq escribió:
   

Hello,

Form authnetificator does form based authentification regarding the
corresponding J2EE specifications, which specify the submit name of 
the

username field (j_username), the submit name of the user password
(j_passwrd), and that's all. Of course you, developper of 
webapplication
can customize form (adding company logo, etc), but the specs states 
that

user must provide username and password and submit it to
/j_security_check url. Adding a captcha in this specs or other
informations is not possible like that.

The only 2 ways i see to add captcha and not break specs is either

1) to create a realm that expect the captcha to be appended or 
perpended

to password.
eg:
j_username: johnSmith
j_password: [EMAIL PROTECTED]
The realm could probably compare the provided captcha with some value
stored somewhere else
the j_password field could be constructed, client side, with 
javascript,

from 2 not submitted fields.

or
2) Don't rely on container security and provide your own security with
you own whatever forms.


En l'instant précis du 03/07/07 10:45, rpr_listas s'exprimait en ces
termes:
 
 

Hi all!

I'm thinking in implement a captcha
(http://en.wikipedia.org/wiki/Captcha) protection for web-based
authentication. I'm looking in the tomcat surce and the form
authentication seems be implemented by
org.apache.catalina.authenticator.FormAuthenticator class.  But I'm
not sure if change this class is the right way.

Are there other better method to do this?
Must I change the FormAutenticator class or must extend it in other
class and i can refer to it in the tomcat configuration ?

Thanks in advance and best regards.
Ricardo.








-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread David Smith

Your code: userid= Integer.valueOf(""+session.getAttribute("uid"));
Try: userid = ((Integer)session.getAttribute("uid")).intValue() ;

Essentially typecast the Object returned from the session to Integer 
before attempting to get the int.


As to this error:

The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)

You should be doing something like setAttribute( "attributeName", new 
Integer( int ) ) instead of setAttribute( "attributeName", int )


--David

Johnny Kewl wrote:

I see one problem.. see note below
- Original Message - From: "Girish Havaldar" 
<[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Thursday, July 05, 2007 10:00 AM
Subject: Re: Tomcat Version problem



ths is the jsp page:


<[EMAIL PROTECTED] import="java.sql.*,java.util.*,logcheck.settings" errorPage="
errorpage.jsp"%>
   
   
classification
   
   
   
   
  <%

   settings set=new settings();
   int flag = 0;
   flag = set.islogedin(request,response);
if(flag!=1){
 out.println("Your  session is
invalidate..Press F5 or refresh it");

 }
   else if(session.isNew()){
   out.println("
parent.location.href='expair.jsp';");
   }
   else
   {

 %>
  

 function check()
   {
 var id = document.getElementById("clname");
 if(id.value ==''){
 alert("Empty");
 return false;
   }
return true;
 }

  function ses_check(url)
  {
if(confirm("It will delete all the question coming under this
Classification ! DO You Want to Proceed ")){
document.location.href=url;

  }
  }


  function online(level,cid)
  {

document.location.href="online.jsp?level="+level+"&CID="+cid+"&e_type=1";

  }

  function written(level,cid)
  {

document.location.href="wedastr.jsp?level="+level+"&CID="+cid+"&e_type=0";

  }
  function onlineedit(level,cid)
  {
  document.location.href="mangquest.jsp
?e_type=1&sel_level="+level+"&CID="+cid+"";
  }

  function writtenedit(level,cid)
  {

document.location.href="mangquest.jsp?sel_level="+level+"&CID="+cid+"&e_type=0"
;
  }


 

   <%
 int userid=0;
   if(session.getAttribute("uid")!=null){


-
YOU MIXING TYPES HERE. USE...

Integer.parseInt(""+session.getAttribute("uid"));  // have to put it 
in a try catch

-


userid=
Integer.valueOf(""+session.getAttribute("uid"));

   }
   else{
   out.println("
parent.location.href='expair.jsp';");
   }

   PreparedStatement stmt = null;
 Connection conn= null;
ResultSet resultset=null;
   ResultSet resultset1=null;
 ResultSet result=null;
  ResultSet res=null;
  ResultSet resdel=null;
 Statement statement=null;
   Statement statement1=null;

 String subject=new String();
 String class_name=new String();
 String noqt=new String();

   conn=set.getcon();
   String PID_str = request.getParameter("PID");
   int PID=0;

   statement = conn.createStatement();
   statement1 = conn.createStatement();

String delete = request.getParameter("delete");

if((request.getParameter("delete")!= null) && 
(request.getParameter

("delete").equals("yes")))
  {
 ResultSet rss=null;
   int C_Id_todel = Integer.parseInt(
request.getParameter("CID"));
   ArrayList tnoarr=new ArrayList();
ArrayList cidarr=new ArrayList();
if((request.getParameter("CID") != null)&&(userid != 0))
{
   cidarr.clear();
   int avail=0;
   rss=statement.executeQuery("select CID from
classification where PID="+C_Id_todel+" and UID="+userid+" ");
   while(rss.next())
   {
   avail=1;
   }
   if(avail==1){
   out.println("alert('NOT POSSIBLEit contains a sub
classification');");
   }
   else{
   rss=statement.executeQuery("select T_No from
questionbank where CID="+C_Id_todel+" ");
while(rss.next())
{
tnoarr.add(rss.getInt(1));
   

Using the Tomcat API to Change the Context

2007-07-05 Thread Marius Preuten
I'm trying to write a Servlet which adds a Mapping on an existing 
Servlet-Class to ists own Context.

Is this possible or are there any restrictions ?

I tried this, but there wasn't a result:
.
public class Index extends HttpServlet implements ContainerServlet {

   protected void doGet(HttpServletRequest request,HttpServletResponse 
response) throws ServletException, IOException {

   PrintWriter out = response.getWriter();
   Context child = (Context) host.findChild("/Admin"); //<-- 
ists not the default admin-app

   out.println(child.getName()+"");   //<-- Exists
   child.addServletMapping("/test.html", "Index");   
//<--tries to map his own servlet class to a new url

   }
...
}


If i go to http://myserver:8080/Admin/index.html there is no error or 
something,

but if i try http://myserver:8080/Admin/test.html i get a 404.
I use Tomcat 6.0.13 on WinXP or Debian4.0 if that counts.

If someone knows a good tutorial about this stuff, it would be very 
nice, because i can't find any on the web.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread Jon Wingfield

You are using jdk1.5 features (autoboxing, for example ) in your JSP pages.
Early versions of the 5.5 tree bundled a jsp compiler (JDT) which didn't 
support these new language features.

Later versions bundled an updated version of the compiler...
For deploying on 5.5.9 just get rid of your autoboxing:

int thing = 4;
request.setAttribute("stuff", new Integer(thing));

instead of

request.setAttribute("stuff", thing);

Regards,

Jon

Girish Havaldar wrote:

On 05/07/07, Girish Havaldar <[EMAIL PROTECTED]> wrote:

Hi,

we have an application developed using the following components as 
listed

below


mysql 5.0.27
jdk 1.5.0_06
jre  1.5.0_06
tomcat5.5.20
Apache   2
phpMyAdmin   2.9.2
Servlets  2.3
JSP1.2

 Our application is showing errors when deployed on tomcat 5.5.9(the
Hosting company is using Tomcat 5.5.9.)

ERROR:
type Exception report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
Type mismatch: cannot convert from Integer to int

An error occurred at line: 67 in the jsp file: /classification.jsp
Generated servlet error:
The method add(int, Object) in the type ArrayList is not applicable 
for the

arguments (int)

An error occurred at line: 226 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)

An error occurred at line: 263 in the jsp file: /classification.jsp
Generated servlet error:
The method setAttribute(String, Object) in the type ServletRequest is not
applicable for the arguments (String, int)


   org.apache.jasper.compiler.DefaultErrorHandler.javacError(
DefaultErrorHandler.java:84)
   org.apache.jasper.compiler.ErrorDispatcher.javacError(
ErrorDispatcher.java:328)
   org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
:397)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
   org.apache.jasper.JspCompilationContext.compile(
JspCompilationContext.java:556)
   org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:293)
   
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)

   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.9 logs.



 so what is the solution.
Also plz send me info abt hosting comapny who can support the above
specification.


Thank you,

Girish S.Havaldar.







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Making the Tomcat 6 Comet Example (ChatServlet) Work

2007-07-05 Thread Dominique Fotso

Hello:

I have installed tomcat 6.0.13 on my windows xp machine, and I cannot get
the chat example to work.

I have switched the connector to the NIO http connector. I do not see any
trace on the console. After I go past the login page, I get to the post page
but typing something on the message box just gets me nowhere.

I have been reading a message on a mailing list about this same
problem (http://www.nabble.com/Comet-example-Tomcat-6-not-working.-t3957585.html
)
and I changed just post.jsp to have an openWindow javascript function.

So far I don't get anything. Is there anything else I should be changing or
anything I am missing?



Any help is appreciated.



Dominique


manipulating http header connection type

2007-07-05 Thread lior grinfeld

Hi

how can i set which connection type tomcat use? (keep-alive, close)
can i change it with the servlet code? response.setHeader("connection",
"keep-alive");
if yes, why it did not work for me and tomcat send always connection: close
?

and .. can i change the http version from servlet to servlet? or to change
the http version in run time using configuration files?


--

Regards
Lior Grinfeld


[AIX 5.3] mod_jk 1.2.23

2007-07-05 Thread Phi-Long LE


folks,

has someone already experienced compiling mod_jk 1.2.23 on AIX 5.3 
platform ???


when executing the command ./configure 
--with-apxs=/opt/apache_2.2/bin/apxs, an error occurs telling that it is 
a wrong path but am sure about that.



any help would be appreciated,
regards,
Phi-Long LE

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 6 + Apache 2.0 with SSL

2007-07-05 Thread Roger

Hi there!

I have some questions about how to setup Apache and Tomcat with SSL
support. Currently I have the following setup:

- Windows 2003
- Tomcat 6.0.13
- Apache 2.0.59 with
 - openssl 0.9.7j
 - mod_ssl
 - mod_proxy
 - mod_rewrite (not used)

I have generated keys that work with Apache. So I can open a page like
https://localhost/. I've tried to use mod_proxy to redirect all
traffic to Tomcat, which works for http and https, using the following
setup:


   Include conf/ssl.conf


ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/


   SSLProxyEngine On
   ProxyPass https://localhost:443/ https://localhost:8443/
   ProxyPassReverse https://localhost:443/ https://localhost:8443/


I have the following questions:

1) Is this a normal setup? Anything that could cause a problem?
2) I want to be able to route traffic for one webapp to https, not
allowing it to be used via http. I don't care if this is done using
mod_rewrite or mod_proxy or anything else.

All suggestions are appreciated!

Thanks,

Roger

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Apache httpd authentication before

2007-07-05 Thread Aldo Brucale
Hello, I'm using Tomcat 5.5.20 and Sun Java 1.5.0_10 under Debian Linux, 
using  jk version 1.2.18 to connect from Apache. I would like to let 
Apache do HTTP autentication before forwarding the requests to Tomcat: 
is this possible?


Thank you in advance
Aldo


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



anybody has javascript code example for using tomcat comet ?

2007-07-05 Thread Szabolcs Márton

Hi!

Has anybody got any workable code sample i javascript for use tomcat comet?

- I tryed with pure xmlhttprequest, watching for state ready, but i got data
after it has timeouted on server...
- dojo.cometd is not usable, its need bayeux protocol
- dojo.io.bind, i cannot make it

could someone please send me an example?

thank you
regards
Szabi


Re: [AIX 5.3] mod_jk 1.2.23

2007-07-05 Thread Rainer Jung

No experience with AIX compilation, but 2 infos:

a) usually this measage means, that

/opt/apache_2.2/bin/apxs -q PREFIX

returned an error or something wrong (here I have chosen the same path 
to apxs, which you have posted).


You can check that without running configure. Choose the same user and 
environment, that you would use for actually doing the compilation.


b) mod_jk is broken fpr AIX and usage together with the multi-threaded 
Apache worker MPM. It's fine with the prefork MPM! In 1.2.24 we will 
have a fix for this, so starting with 1.2.24 it will also wirk with 
worker MPM. These things have nothing to do with topic a).


Regards,

Rainer

Phi-Long LE wrote:


folks,

has someone already experienced compiling mod_jk 1.2.23 on AIX 5.3 
platform ???


when executing the command ./configure 
--with-apxs=/opt/apache_2.2/bin/apxs, an error occurs telling that it is 
a wrong path but am sure about that.



any help would be appreciated,
regards,
Phi-Long LE


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [AIX 5.3] mod_jk 1.2.23

2007-07-05 Thread Phi-Long LE

yes indeed,  an error occurs when tryng the a) command...


vhqun02# /opt/apache_2.0/bin/apxs -q PREFIX
Can't locate strict.pm in @INC (@INC contains: 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3/aix-thread-multi 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3/aix-thread-multi 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl .) at 
/opt/apache_2.0/bin/apxs line 19.

BEGIN failed--compilation aborted at /opt/apache_2.0/bin/apxs line 19.

I do then edit the apxs amend the 19th line "use strict" and try 
again... looks like working fine now

Thx a lot for your help.

Regards,
Phi-Long LE

Le 05/07/2007 14:56, Rainer Jung a écrit :

No experience with AIX compilation, but 2 infos:

a) usually this measage means, that

/opt/apache_2.2/bin/apxs -q PREFIX

returned an error or something wrong (here I have chosen the same path 
to apxs, which you have posted).


You can check that without running configure. Choose the same user and 
environment, that you would use for actually doing the compilation.


b) mod_jk is broken fpr AIX and usage together with the multi-threaded 
Apache worker MPM. It's fine with the prefork MPM! In 1.2.24 we will 
have a fix for this, so starting with 1.2.24 it will also wirk with 
worker MPM. These things have nothing to do with topic a).


Regards,

Rainer

Phi-Long LE wrote:


folks,

has someone already experienced compiling mod_jk 1.2.23 on AIX 5.3 
platform ???


when executing the command ./configure 
--with-apxs=/opt/apache_2.2/bin/apxs, an error occurs telling that it 
is a wrong path but am sure about that.



any help would be appreciated,
regards,
Phi-Long LE


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache httpd authentication before

2007-07-05 Thread David Smith
Yes just make sure you set tomcatAuthentication="false" in the 
connector definition in server.xml for the AJP connector.  That will 
allow the REMOTE_USER header to make it through to your webapps.


--David

Aldo Brucale wrote:

Hello, I'm using Tomcat 5.5.20 and Sun Java 1.5.0_10 under Debian 
Linux, using  jk version 1.2.18 to connect from Apache. I would like 
to let Apache do HTTP autentication before forwarding the requests to 
Tomcat: is this possible?


Thank you in advance
Aldo


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: anybody has javascript code example for using tomcat comet ?

2007-07-05 Thread Bruno Simioni

Hey, Szabolcs.

I'm looking for things about AIO Tomcat, using Comet technology, but I
didn't get anything yet.

I have already sent an email to tomcat users list, but no one answer.

If you found something, please retrieve me. I'm trying to discover how an
client can acess the manager of events on server, then, I would be able to
implement my that on my job.

Thanks,

Bruno Simioni.



On 7/5/07, Szabolcs Márton <[EMAIL PROTECTED]> wrote:


Hi!

Has anybody got any workable code sample i javascript for use tomcat
comet?

- I tryed with pure xmlhttprequest, watching for state ready, but i got
data
after it has timeouted on server...
- dojo.cometd is not usable, its need bayeux protocol
- dojo.io.bind, i cannot make it

could someone please send me an example?

thank you
regards
Szabi





--
Bruno.


RE: Réf. : Missing JMX.jar in Tomcat 5.5.2 3?

2007-07-05 Thread Caldarale, Charles R
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Subject: Réf. : Missing JMX.jar in Tomcat 5.5.23?
> 
> maybe you have to download from here but I'm not sure

The necessary classes in jmx.jar are part of the standard 1.5 JRE.  If you're 
using an older JRE, you can find jmx.jar in the JDK 1.4 Compatibility Package 
on the 5.5 download page.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Missing JMX.jar in Tomcat 5.5.23?

2007-07-05 Thread Jesse Barnum
Hey Johnny, thanks for the help. I fixed the problem - stupid  
mistake, I was running 1.4 instead of 1.5


--Jesse Barnum, President, 360Works
http://www.360works.com
(770) 234-9293


On Jul 5, 2007, at 3:58 AM, Johnny Kewl wrote:

No, that stuff is not relevent, in the BAT (SH) files, the TC guys  
having given you the ability to make a digest or a hash of  
passwords to hide them in the realm, if u want to.
And all they saying is that you dont have to use the whole of TC to  
make them (hashes), and can just use a few classes but if you  
have the whole of TC, you dont need that I dont have JMX.jar in  
my embedded stuff and I dont see the jar in either 5.5.23 or 6.013


javax.management.MBeanRegistration is part of the 1.5 JRE and JDK,  
so its something else... I suspect the either the JRE is old, or  
you trying to start TC, and havnt initialized in properly in the  
embedded code. I imagine that you have a full TC running on that  
machine, so I think its the later, TC is not intialized and it cant  
start because it hasnt setup JMX and all the rest of it.


If you doing embedded stuff, look at the articles, but also study  
the org.apache.catalina.startup.Catalina file to see how TC  
actually starts itself.
I embed in a very unusual way ie I dont go through the embedded  
class, I actually just start TC up thru Catalina what that does  
is make it use all the mormal configuration files ie Server.xml  
etc... if you dont mind shipping that with your application.
Its just easier because the exact same settings work as with the  
full TC and setting up things like Realms and JNDI via an  
embedded environment well I havnt seen anyone that has done it,  
in the embedded environment.


Also rather embed with 6.0.13 the file structure is just  
much simpler.
If my way floats your boat ;)... drop me an email, I'll give you  
the code.



- Original Message - From: "Jesse Barnum"  
<[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Thursday, July 05, 2007 2:05 AM
Subject: Missing JMX.jar in Tomcat 5.5.23?


When I try to embed Tomcat 5.5.23 into my application, I get an  
error message about a missing MBeanRegistration (see stack trace  
at end).  It seems like I need JMX.jar. This document ( http://  
tomcat.apache.org/tomcat-5.5-doc/realm-howto.html ) states that  
"you  will need the JMX jar and the commons-logging jar (either  
commons- logging-api.jar or commons-logging.jar). Both of these  
are included  with the Tomcat distribution", but I don't see  
JMX.jar anywhere in  the core distribution.


Exception in thread "main" java.lang.NoClassDefFoundError: javax/  
management/MBeanRegistration

at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass  
(SecureClassLoader.java:123)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass  
(SecureClassLoader.java:123)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at com.prosc.servlet.embedded.TomcatWrapper.start 
(TomcatWrapper.java: 75)
at com.prosc.servertoolbox.plugin.ServerToolboxModel.start  
(ServerToolboxModel.java:25)
at com.prosc.servertoolbox.plugin.ServerToolboxModel.main  
(ServerToolboxModel.java:36)



--Jesse Barnum, President, 360Works
http://www.360works.com
(770) 234-9293



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--

Re: Making the Tomcat 6 Comet Example (ChatServlet) Work

2007-07-05 Thread Dominique Fotso

Great!

I do not have a webapp yet, i would like to see the example first before I
venture with some code of my own. I saw talks that the example works only in
telnet. I dont know how to do that yet, I will see.
Maybe I'm just going to go ahead and write a test myself.
Good to know you at least saw the events.
Thanks for your reply.

Dominique

On 7/5/07, Szabolcs Márton <[EMAIL PROTECTED]> wrote:


HI!

i cannot get use this example too.
but my big mistake was that i put the webapp library the catalina.jar!
the project need catalina.jar for comet stuff, but you cannot deploy it in
your webapp.
maybe check that..

If i removed i could use comet stuff.  (but not the demo:) )
I connected to comet with xmlhttprequest, but data arrived when server
timeouted.
But i saw the begin, read, write events on the server

regards,
Szabi


2007/7/5, Dominique Fotso <[EMAIL PROTECTED]>:
>
> Hello:
>
> I have installed tomcat 6.0.13 on my windows xp machine, and I cannot
get
> the chat example to work.
>
> I have switched the connector to the NIO http connector. I do not see
any
> trace on the console. After I go past the login page, I get to the post
> page
> but typing something on the message box just gets me nowhere.
>
> I have been reading a message on a mailing list about this same
> problem (
> http://www.nabble.com/Comet-example-Tomcat-6-not-working.-t3957585.html
> )
> and I changed just post.jsp to have an openWindow javascript function.
>
> So far I don't get anything. Is there anything else I should be changing
> or
> anything I am missing?
>
>
>
> Any help is appreciated.
>
>
>
> Dominique
>



Re: Apache httpd authentication before

2007-07-05 Thread Filip Hanik - Dev Lists

Aldo Brucale wrote:
Hello, I'm using Tomcat 5.5.20 and Sun Java 1.5.0_10 under Debian 
Linux, using  jk version 1.2.18 to connect from Apache. I would like 
to let Apache do HTTP autentication before forwarding the requests to 
Tomcat: is this possible?

yes it is,
and in tomcat's connector element you set


Thank you in advance
Aldo


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Making the Tomcat 6 Comet Example (ChatServlet) Work

2007-07-05 Thread Szabolcs Márton

HI!

i cannot get use this example too.
but my big mistake was that i put the webapp library the catalina.jar!
the project need catalina.jar for comet stuff, but you cannot deploy it in
your webapp.
maybe check that..

If i removed i could use comet stuff.  (but not the demo:) )
I connected to comet with xmlhttprequest, but data arrived when server
timeouted.
But i saw the begin, read, write events on the server

regards,
Szabi


2007/7/5, Dominique Fotso <[EMAIL PROTECTED]>:


Hello:

I have installed tomcat 6.0.13 on my windows xp machine, and I cannot get
the chat example to work.

I have switched the connector to the NIO http connector. I do not see any
trace on the console. After I go past the login page, I get to the post
page
but typing something on the message box just gets me nowhere.

I have been reading a message on a mailing list about this same
problem (
http://www.nabble.com/Comet-example-Tomcat-6-not-working.-t3957585.html
)
and I changed just post.jsp to have an openWindow javascript function.

So far I don't get anything. Is there anything else I should be changing
or
anything I am missing?



Any help is appreciated.



Dominique



Re: [AIX 5.3] mod_jk 1.2.23

2007-07-05 Thread Rainer Jung
Thanks for the feedback. Please don't overlook b). For worker MPM is 
definitely seriously broken, i.e. you will end up with currupted 
communication etc. Don't use 1.2.23 with worker MPM, even if it looks 
good in simple tests.


Phi-Long LE wrote:
I initially said that i did amend the code... however after thinking 
about the error I did prefer to amend  the @INC to reflect the real path 
using perl -I path1:path2:path3...


Le 05/07/2007 15:18, Phi-Long LE a écrit :

yes indeed,  an error occurs when tryng the a) command...


vhqun02# /opt/apache_2.0/bin/apxs -q PREFIX
Can't locate strict.pm in @INC (@INC contains: 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3/aix-thread-multi 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3/aix-thread-multi 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl .) at 
/opt/apache_2.0/bin/apxs line 19.

BEGIN failed--compilation aborted at /opt/apache_2.0/bin/apxs line 19.

I do then edit the apxs amend the 19th line "use strict" and try 
again... looks like working fine now

Thx a lot for your help.

Regards,
Phi-Long LE

Le 05/07/2007 14:56, Rainer Jung a écrit :

No experience with AIX compilation, but 2 infos:

a) usually this measage means, that

/opt/apache_2.2/bin/apxs -q PREFIX

returned an error or something wrong (here I have chosen the same 
path to apxs, which you have posted).


You can check that without running configure. Choose the same user 
and environment, that you would use for actually doing the compilation.


b) mod_jk is broken fpr AIX and usage together with the 
multi-threaded Apache worker MPM. It's fine with the prefork MPM! In 
1.2.24 we will have a fix for this, so starting with 1.2.24 it will 
also wirk with worker MPM. These things have nothing to do with topic 
a).


Regards,

Rainer

Phi-Long LE wrote:


folks,

has someone already experienced compiling mod_jk 1.2.23 on AIX 5.3 
platform ???


when executing the command ./configure 
--with-apxs=/opt/apache_2.2/bin/apxs, an error occurs telling that 
it is a wrong path but am sure about that.



any help would be appreciated,
regards,
Phi-Long LE


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [AIX 5.3] mod_jk 1.2.23

2007-07-05 Thread Phi-Long LE
I initially said that i did amend the code... however after thinking 
about the error I did prefer to amend  the @INC to reflect the real path 
using perl -I path1:path2:path3...


Le 05/07/2007 15:18, Phi-Long LE a écrit :

yes indeed,  an error occurs when tryng the a) command...


vhqun02# /opt/apache_2.0/bin/apxs -q PREFIX
Can't locate strict.pm in @INC (@INC contains: 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3/aix-thread-multi 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3/aix-thread-multi 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3 
/project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl .) at 
/opt/apache_2.0/bin/apxs line 19.

BEGIN failed--compilation aborted at /opt/apache_2.0/bin/apxs line 19.

I do then edit the apxs amend the 19th line "use strict" and try 
again... looks like working fine now

Thx a lot for your help.

Regards,
Phi-Long LE

Le 05/07/2007 14:56, Rainer Jung a écrit :

No experience with AIX compilation, but 2 infos:

a) usually this measage means, that

/opt/apache_2.2/bin/apxs -q PREFIX

returned an error or something wrong (here I have chosen the same 
path to apxs, which you have posted).


You can check that without running configure. Choose the same user 
and environment, that you would use for actually doing the compilation.


b) mod_jk is broken fpr AIX and usage together with the 
multi-threaded Apache worker MPM. It's fine with the prefork MPM! In 
1.2.24 we will have a fix for this, so starting with 1.2.24 it will 
also wirk with worker MPM. These things have nothing to do with topic 
a).


Regards,

Rainer

Phi-Long LE wrote:


folks,

has someone already experienced compiling mod_jk 1.2.23 on AIX 5.3 
platform ???


when executing the command ./configure 
--with-apxs=/opt/apache_2.2/bin/apxs, an error occurs telling that 
it is a wrong path but am sure about that.



any help would be appreciated,
regards,
Phi-Long LE


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Farm Recommendation

2007-07-05 Thread Filip Hanik - Dev Lists

there is no right or wrong solution, but entertain this scenario

1. few very large machines (or)
2. many very inexpensive machines

in the case of one machine breaking, using 1) will have a larger impact 
on your performance than 2)

however, in the case of 2) you may have more failures.

take google for example, in an article by their CTO I read they are 
essentially using option 2), because it is so easy/quick/cheap to replace


however, remember that using 2) also usually has much more power 
consumption, so if power cost is an issue, you will need to setup a 
matrix for yourself.


Filip

bajistaman wrote:

I'm trying to move my Apache Http Server Farm to a Tomcat one and I guess
that Tomcat needs more resources than Apache does. Our approach has been
always to have many medium size machines than a few big ones, does anybody
have any suggestion to the kind of machine + OS needed to get the best
tomcat performance?

Thanks,

Johann
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question about linking remote files from a Host

2007-07-05 Thread Dave Shuck

All, I am quite new to Tomcat, but have run into a situation that I am
having a hard time finding a solution too.

We are working with some ColdFusion applications using Apache2
-->jk_mod-->Tomcat.  We have set up 4 different CFML processors as Tomcat
applications and created the hosts like this:

sandboxsite.coldfusion
sandboxsite.railo
sandboxsite.smith
sandboxsite.bluedragon

...where the latter part of the host name is the name of the processing
engine.  Is there a way that I can have my code reside in a directory like
/development/sandbox/www/ and then have the files inside "www" linked to the
root of each of the Tomcat applications so that the application root would
only have the WEB-INF and a sym link/virtual mapping to the files
themselves?  I realize that I could symbolically link each file and
directory but that is not terribly flexible.  I know that I could also link
the www folder itself, but I do not want to end up with
http://sandboxsite.coldfusion/www/index.cfm, but rather I want
http://sandboxsite.coldfusion/index.cfm.  Does anyone have any suggestions?

Thanks in advance.

--
~Dave Shuck
[EMAIL PROTECTED]
http://daveshuck.instantspot.com


Tomcat 4.1.3 on Win2k Server: Context reloading itself, but no changes were made; why?

2007-07-05 Thread Eric B

Hi, all.

I've got an odd situation with one of our applications that runs under
Tomcat.  The application will occasionally stop responding to incoming
requests, and I believe I've traced the issue to a problem with Context
reloads.  Several times a day, the Tomcat log file indicates that the
application context is reloading, and then indicates that the reload was
successful.  Occasionally, though, the reload fails, and the log files fill
up with error messages like the following:

StandardWrapperValve[action]: Servlet action is currently unavailable

Once the Tomcat windows service is bounced, the application runs fine.

Now, I've looked through the Tomcat documentation, and it seems that the
intermittent reloads are related to how our application's  is
declared in the server configuration, with reloadable="true".
Unfortunately, the previous keepers of this application are long gone, so I
haven't been able to find out why a Production application is setup like
this.  When we deploy new builds (which is very infrequently), we always
stop the Tomcat service, so the reloadable option seems to be unnecessary.
This leads to my first question:

1. What will we lose by setting reloadable="false"?

Moreover, my understanding of the "Context is reloading" messages is that
Tomcat thinks that some of our application's class components have changed,
so it's reloading the application to take advantage of new code.  We haven't
made any changes; all of the modification time stamps on the files I've
found are dated from several months or weeks ago.  This leads to my second
question:

2. How does Tomcat interpret that a change has happened?  Is it a file
compare?  Date check?

Thank you very much for the assistance!

Regards,
Eric B


Re: Tomcat 6 + Apache 2.0 with SSL

2007-07-05 Thread Filip Hanik - Dev Lists

I think what he wants is

browser -> http -> Apache -> http -> tomcat
browser -> https-> Apache -> https-> tomcat

a lot of companies have these requirements

Filip


Arian Abrahantes wrote:

Hi:

I think this has alraedy being discussed somewhere here. Why do you 
need double enchriptation? It is enough with the apache one. Use 
something like:


broweser -> https -> Apache -> http -> tomcat

pro:

1- Single enchiptation fast server response.

cons (at least fo security):

1- none

I may be wrong plesa verify in the mailing list archive

Filip Hanik - Dev Lists wrote:
question, does it work? or does it always send requests to 8080, for 
both http and https?


for your SSL, you can/need to add in your httpd client certificate, 
ie, the certificate to use when contacting Tomcat for SSL



  SSLProxyEngine On
  ProxyPass / https://localhost:8443/
  ProxyPassReverse / https://localhost:8443/
  #
  # Put your Proxy SSL Certificate directives here
  #



Filip

Roger wrote:

Hi there!

I have some questions about how to setup Apache and Tomcat with SSL
support. Currently I have the following setup:

- Windows 2003
- Tomcat 6.0.13
- Apache 2.0.59 with
 - openssl 0.9.7j
 - mod_ssl
 - mod_proxy
 - mod_rewrite (not used)

I have generated keys that work with Apache. So I can open a page like
https://localhost/. I've tried to use mod_proxy to redirect all
traffic to Tomcat, which works for http and https, using the following
setup:


   Include conf/ssl.conf


ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/


   SSLProxyEngine On
   ProxyPass https://localhost:443/ https://localhost:8443/
   ProxyPassReverse https://localhost:443/ https://localhost:8443/


I have the following questions:

1) Is this a normal setup? Anything that could cause a problem?
2) I want to be able to route traffic for one webapp to https, not
allowing it to be used via http. I don't care if this is done using
mod_rewrite or mod_proxy or anything else.

All suggestions are appreciated!

Thanks,

Roger

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: error messages, numbers

2007-07-05 Thread Propes, Barry L
never mind...I found it, thanks.

-Original Message-
From: Propes, Barry L [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 05, 2007 11:47 AM
To: Tomcat Users List
Subject: error messages, numbers


This has probably been discussed here before, I'm certain, but I've been 
perusing the archives for a bit and haven't come across it yet.
 
When I get errors in the 400 series, the browser will show me specifically the 
numeric error in question - i..e 404 for a page not found, 403 for an invalid 
reference, etc., but I've yet to see anything specific in the 500 series.
Does Tomcat return that as well, and what is the method for retrieving this 
message and value.
 
Any feedback is appreciated.
 
Thanks.
 
Meanwhile, I'll keep searching the archives for info on it.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



error messages, numbers

2007-07-05 Thread Propes, Barry L
This has probably been discussed here before, I'm certain, but I've been 
perusing the archives for a bit and haven't come across it yet.
 
When I get errors in the 400 series, the browser will show me specifically the 
numeric error in question - i..e 404 for a page not found, 403 for an invalid 
reference, etc., but I've yet to see anything specific in the 500 series.
Does Tomcat return that as well, and what is the method for retrieving this 
message and value.
 
Any feedback is appreciated.
 
Thanks.
 
Meanwhile, I'll keep searching the archives for info on it.


Re: Tomcat 6 + Apache 2.0 with SSL

2007-07-05 Thread Arian Abrahantes

Hi:

I think this has alraedy being discussed somewhere here. Why do you need 
double enchriptation? It is enough with the apache one. Use something like:


broweser -> https -> Apache -> http -> tomcat

pro:

1- Single enchiptation fast server response.

cons (at least fo security):

1- none

I may be wrong plesa verify in the mailing list archive

Filip Hanik - Dev Lists wrote:
question, does it work? or does it always send requests to 8080, for 
both http and https?


for your SSL, you can/need to add in your httpd client certificate, 
ie, the certificate to use when contacting Tomcat for SSL



  SSLProxyEngine On
  ProxyPass / https://localhost:8443/
  ProxyPassReverse / https://localhost:8443/
  #
  # Put your Proxy SSL Certificate directives here
  #



Filip

Roger wrote:

Hi there!

I have some questions about how to setup Apache and Tomcat with SSL
support. Currently I have the following setup:

- Windows 2003
- Tomcat 6.0.13
- Apache 2.0.59 with
 - openssl 0.9.7j
 - mod_ssl
 - mod_proxy
 - mod_rewrite (not used)

I have generated keys that work with Apache. So I can open a page like
https://localhost/. I've tried to use mod_proxy to redirect all
traffic to Tomcat, which works for http and https, using the following
setup:


   Include conf/ssl.conf


ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/


   SSLProxyEngine On
   ProxyPass https://localhost:443/ https://localhost:8443/
   ProxyPassReverse https://localhost:443/ https://localhost:8443/


I have the following questions:

1) Is this a normal setup? Anything that could cause a problem?
2) I want to be able to route traffic for one webapp to https, not
allowing it to be used via http. I don't care if this is done using
mod_rewrite or mod_proxy or anything else.

All suggestions are appreciated!

Thanks,

Roger

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Character encoding

2007-07-05 Thread lightbulb432

Why is the URIEncoding attribute specified on the connector rather than on a
host, for example? Does this mean that the number of virtual hosts that can
listen on the same port on the same box are limited by whether they all use
the same encodings in their URIs? Now that I think about it, wouldn't it be
at the context level, not even at the host level?

In Tomcat 6, should the useBodyEncodingForURI be used if not needing
compatibility with 4.1, as the documentation mentions? 

To see if I have things straight, is HttpServletRequest's
get/setCharacterEncoding used for both the request parameters from a GET
request AND the contents of the POST? How are multipart POST requests dealt
with?

And HttpServletResponse's get/setCharacterEncoding is used for the contents
of the response header and the meta tags? Does it also encode the page
content itself? 

What about the encoding of cookies for both incoming requests and outgoing
responses?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Character-encoding-tf4031134.html#a11450938
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 + Apache 2.0 with SSL

2007-07-05 Thread Arian Abrahantes

Hi Filik:

I understood what he wanted to do. My post is about how needed is this 
for him?. If it is a company requirement ok. But if there is no 
requirement why to slow the server down?.


IMHO, in a properly set apache proxy configuration nobody except apache 
will interact with the aplication (you name it) that lies bellow him. So 
even if companies or users wishes this double encryption I seriously 
doubt they will be getting more security.


Anyway, as far as I know both servers can share the same keys for 
authentication (I am pretty sure there is a quite close in date 
-previous month- thread posted in this list or in Opencms' one) and just 
looking into his config it should work so just try it out. He is just 
missing the addition of the DocumentRoot where his contents under tomcat 
lies.


hth,

arian


Filip Hanik - Dev Lists wrote:

I think what he wants is

browser -> http -> Apache -> http -> tomcat
browser -> https-> Apache -> https-> tomcat

a lot of companies have these requirements

Filip


Arian Abrahantes wrote:

Hi:

I think this has alraedy being discussed somewhere here. Why do you 
need double enchriptation? It is enough with the apache one. Use 
something like:


broweser -> https -> Apache -> http -> tomcat

pro:

1- Single enchiptation fast server response.

cons (at least fo security):

1- none

I may be wrong plesa verify in the mailing list archive

Filip Hanik - Dev Lists wrote:
question, does it work? or does it always send requests to 8080, for 
both http and https?


for your SSL, you can/need to add in your httpd client certificate, 
ie, the certificate to use when contacting Tomcat for SSL



  SSLProxyEngine On
  ProxyPass / https://localhost:8443/
  ProxyPassReverse / https://localhost:8443/
  #
  # Put your Proxy SSL Certificate directives here
  #



Filip

Roger wrote:

Hi there!

I have some questions about how to setup Apache and Tomcat with SSL
support. Currently I have the following setup:

- Windows 2003
- Tomcat 6.0.13
- Apache 2.0.59 with
 - openssl 0.9.7j
 - mod_ssl
 - mod_proxy
 - mod_rewrite (not used)

I have generated keys that work with Apache. So I can open a page like
https://localhost/. I've tried to use mod_proxy to redirect all
traffic to Tomcat, which works for http and https, using the following
setup:


   Include conf/ssl.conf


ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/


   SSLProxyEngine On
   ProxyPass https://localhost:443/ https://localhost:8443/
   ProxyPassReverse https://localhost:443/ https://localhost:8443/


I have the following questions:

1) Is this a normal setup? Anything that could cause a problem?
2) I want to be able to route traffic for one webapp to https, not
allowing it to be used via http. I don't care if this is done using
mod_rewrite or mod_proxy or anything else.

All suggestions are appreciated!

Thanks,

Roger

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Redirection

2007-07-05 Thread Propes, Barry L
request.setAttribute and cast the string variables that are currently set in 
the servlet.

then request.getAttribute in the JSP.

Actually thoughyou might need to make the hyperlink a form button.


-Original Message-
From: Mohammed Zabin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 04, 2007 2:20 AM
To: Tomcat Users List
Subject: Redirection


Hi Everybody

I have a servlet that renders some database related values, at the botton of
the page, i want to add a hyberlink to a jsp page, and i want pass to this
jsp page, and i want to pass some values from servlet to jsp???

How could i do this, any help please?

Jotnarta

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 + Apache 2.0 with SSL

2007-07-05 Thread Filip Hanik - Dev Lists

Arian Abrahantes wrote:

Hi Filik:

I understood what he wanted to do. My post is about how needed is this 
for him?. If it is a company requirement ok. But if there is no 
requirement why to slow the server down?.


IMHO, in a properly set apache proxy configuration nobody except 
apache will interact with the aplication (you name it) that lies 
bellow him. So even if companies or users wishes this double 
encryption I seriously doubt they will be getting more security.


Anyway, as far as I know both servers can share the same keys for 
authentication (I am pretty sure there is a quite close in date 
-previous month- thread posted in this list or in Opencms' one) and 
just looking into his config it should work so just try it out. He is 
just missing the addition of the DocumentRoot where his contents under 
tomcat lies.


uh, absolutely not, never point your DocumentRoot to the Tomcat file 
structure unless you know exactly how to secure it.

Filip



hth,

arian


Filip Hanik - Dev Lists wrote:

I think what he wants is

browser -> http -> Apache -> http -> tomcat
browser -> https-> Apache -> https-> tomcat

a lot of companies have these requirements

Filip


Arian Abrahantes wrote:

Hi:

I think this has alraedy being discussed somewhere here. Why do you 
need double enchriptation? It is enough with the apache one. Use 
something like:


broweser -> https -> Apache -> http -> tomcat

pro:

1- Single enchiptation fast server response.

cons (at least fo security):

1- none

I may be wrong plesa verify in the mailing list archive

Filip Hanik - Dev Lists wrote:
question, does it work? or does it always send requests to 8080, 
for both http and https?


for your SSL, you can/need to add in your httpd client certificate, 
ie, the certificate to use when contacting Tomcat for SSL



  SSLProxyEngine On
  ProxyPass / https://localhost:8443/
  ProxyPassReverse / https://localhost:8443/
  #
  # Put your Proxy SSL Certificate directives here
  #



Filip

Roger wrote:

Hi there!

I have some questions about how to setup Apache and Tomcat with SSL
support. Currently I have the following setup:

- Windows 2003
- Tomcat 6.0.13
- Apache 2.0.59 with
 - openssl 0.9.7j
 - mod_ssl
 - mod_proxy
 - mod_rewrite (not used)

I have generated keys that work with Apache. So I can open a page 
like

https://localhost/. I've tried to use mod_proxy to redirect all
traffic to Tomcat, which works for http and https, using the 
following

setup:


   Include conf/ssl.conf


ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/


   SSLProxyEngine On
   ProxyPass https://localhost:443/ https://localhost:8443/
   ProxyPassReverse https://localhost:443/ https://localhost:8443/


I have the following questions:

1) Is this a normal setup? Anything that could cause a problem?
2) I want to be able to route traffic for one webapp to https, not
allowing it to be used via http. I don't care if this is done using
mod_rewrite or mod_proxy or anything else.

All suggestions are appreciated!

Thanks,

Roger

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: a question about user athentication

2007-07-05 Thread Propes, Barry L
to "prevent the other users to be signed on?"

Do you mean prevent from locking them out?

I've got a similar deal in my db with the users table, a column called 
user_dbflag, which, like your status column, uses a simple int value of -1 or 0 
to see who's "active." Actually, it also has a timestamp column to verify who 
has changed their password and when they change it the dbflag column value 
changes from -1 to 0.

In one of my SQL statements, I have the condition to allow the user to see (and 
submit/enact on) the JSP in question.
If they're allowed, they can see the whole thing. If not, Tomcat will throw a 
500 (specifically Exhausted ResultSet) error.
In that case, I catch the exception and notify the user by printing to the 
browser a message telling them their user role does not properly match or their 
password has been "deactivated." In reality, the user account or password is 
never deleted from the db table.

Let me know if you need more info on this.



-Original Message-
From: is_maximum [mailto:[EMAIL PROTECTED]
Sent: Monday, July 02, 2007 1:46 AM
To: users@tomcat.apache.org
Subject: a question about user athentication



Hi experts

I am using Tomcat 5.5 and struts framework and security filter
in order to authenticate users like the others I am using j_security_check
action 
but my problem is that I have a field in my user table namely status which
represent whether the user is available or deleted by administrator

the problem is even if it is deleted the tomcat will authenticate and let
that user to sign in, how can I put a condition like "where status = 0" to
prevent the other users to be signed in?

in secirity filter we only specify field names of the table as follows:






any comment would be of a great help

thanks
-- 
View this message in context: 
http://www.nabble.com/a-question-about-user-athentication-tf4010274.html#a11388743
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Error starting Tomcat 5.5 as a Windows service

2007-07-05 Thread Tony Fountain
Hi,
 
I am attempting to install Tomcat 5.5.23 as a Windows service on a
Windows 2003 Server box.  The steps I went through are as follows

*   Installed the JDK 1.5 Update 12
*   Manually added the environment variable JAVA_HOME to C:\Program
Files\Java\jdk1.5.0_12 (as a system variable, not user level)
*   Ran the windows installer package and selected the full install
option.  At this point I expected to be able to test the service can
start and serve requests using examples installed with the installation
but I am unable to.  Anytime I try to start the Windows service the
following error is logged:

[2007-07-05 15:53:54] [1276 prunsrv.c] [debug] Procrun log
initialized
[2007-07-05 15:53:54] [info] Running Service...
[2007-07-05 15:53:54] [1098 prunsrv.c] [debug] Inside
ServiceMain...
[2007-07-05 15:53:54] [info] Starting service...
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[0]
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[1]
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[2]
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat
5.5\common\endorsed
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[3]
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat
5.5\temp
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[4]
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[5]
-Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\Tomcat 5.5\conf\logging.properties
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[6]
-Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat
5.5\bin\bootstrap.jar
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[7]
vfprintf
[2007-07-05 15:53:54] [info] Error occurred during
initialization of VM
[2007-07-05 15:53:54] [info] java/lang/NoClassDefFoundError
[2007-07-05 15:53:54] [info] : java/lang/Object

I'm assuming it's a class path issue but being new to the world of Java,
I'm not sure what could be missing out of a basic installation.  I have
performed some Google searches and even searched through some of the
archives but was unable to find anything specific to this situation.
Any pointers or a push in the right direction would be greatly
appreciated.
 
FYI - Even at the Windows command prompt, if I type java -version I
receive this error:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Same error, different cause so I'm not completely sure if this is even
related to the Tomcat installation, rather possibly some odd situation
that was encountered when the JDK was installed.
 
Thanks,
Tony


Re: Error starting Tomcat 5.5 as a Windows service

2007-07-05 Thread Daniel Stephens

Make sure you have CATALINA_HOME pointed to your tomcat instance. make sure
your java home is correct.. It sounds like it can't find the java home..

You did boot after the install right? If you added that environment variable
to the system section, you'll need to boot to pick it up or open a new cmd
prompt to re-read the environment.

On 7/5/07, Tony Fountain <[EMAIL PROTECTED]> wrote:


Hi,

I am attempting to install Tomcat 5.5.23 as a Windows service on a
Windows 2003 Server box.  The steps I went through are as follows

*   Installed the JDK 1.5 Update 12
*   Manually added the environment variable JAVA_HOME to C:\Program
Files\Java\jdk1.5.0_12 (as a system variable, not user level)
*   Ran the windows installer package and selected the full install
option.  At this point I expected to be able to test the service can
start and serve requests using examples installed with the installation
but I am unable to.  Anytime I try to start the Windows service the
following error is logged:

[2007-07-05 15:53:54] [1276 prunsrv.c] [debug] Procrun log
initialized
[2007-07-05 15:53:54] [info] Running Service...
[2007-07-05 15:53:54] [1098 prunsrv.c] [debug] Inside
ServiceMain...
[2007-07-05 15:53:54] [info] Starting service...
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[0]
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[1]
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[2]
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat
5.5\common\endorsed
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[3]
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat
5.5\temp
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[4]
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[5]
-Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\Tomcat 5.5\conf\logging.properties
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[6]
-Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat
5.5\bin\bootstrap.jar
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[7]
vfprintf
[2007-07-05 15:53:54] [info] Error occurred during
initialization of VM
[2007-07-05 15:53:54] [info] java/lang/NoClassDefFoundError
[2007-07-05 15:53:54] [info] : java/lang/Object

I'm assuming it's a class path issue but being new to the world of Java,
I'm not sure what could be missing out of a basic installation.  I have
performed some Google searches and even searched through some of the
archives but was unable to find anything specific to this situation.
Any pointers or a push in the right direction would be greatly
appreciated.

FYI - Even at the Windows command prompt, if I type java -version I
receive this error:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Same error, different cause so I'm not completely sure if this is even
related to the Tomcat installation, rather possibly some odd situation
that was encountered when the JDK was installed.

Thanks,
Tony



Re: Error starting Tomcat 5.5 as a Windows service

2007-07-05 Thread David Smith
java.lang.Object is the core ancestor of all java classes.  Given it's 
pretty much available by default regardless of classpath or anything 
else I suspect your JVM install is messed up in some manner.  Try 
reinstalling your JVM and start tomcat again.


--David

Tony Fountain wrote:

Hi,
 
I am attempting to install Tomcat 5.5.23 as a Windows service on a

Windows 2003 Server box.  The steps I went through are as follows

*   Installed the JDK 1.5 Update 12
*   Manually added the environment variable JAVA_HOME to C:\Program
Files\Java\jdk1.5.0_12 (as a system variable, not user level)
*   Ran the windows installer package and selected the full install
option.  At this point I expected to be able to test the service can
start and serve requests using examples installed with the installation
but I am unable to.  Anytime I try to start the Windows service the
following error is logged:

[2007-07-05 15:53:54] [1276 prunsrv.c] [debug] Procrun log
initialized
[2007-07-05 15:53:54] [info] Running Service...
[2007-07-05 15:53:54] [1098 prunsrv.c] [debug] Inside
ServiceMain...
[2007-07-05 15:53:54] [info] Starting service...
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[0]
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[1]
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[2]
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat
5.5\common\endorsed
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[3]
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat
5.5\temp
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[4]
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[5]
-Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\Tomcat 5.5\conf\logging.properties
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[6]
-Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat
5.5\bin\bootstrap.jar
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[7]
vfprintf
[2007-07-05 15:53:54] [info] Error occurred during
initialization of VM
[2007-07-05 15:53:54] [info] java/lang/NoClassDefFoundError
[2007-07-05 15:53:54] [info] : java/lang/Object

I'm assuming it's a class path issue but being new to the world of Java,
I'm not sure what could be missing out of a basic installation.  I have
performed some Google searches and even searched through some of the
archives but was unable to find anything specific to this situation.
Any pointers or a push in the right direction would be greatly
appreciated.
 
FYI - Even at the Windows command prompt, if I type java -version I

receive this error:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Same error, different cause so I'm not completely sure if this is even
related to the Tomcat installation, rather possibly some odd situation
that was encountered when the JDK was installed.
 
Thanks,

Tony

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: a question about user athentication

2007-07-05 Thread is_maximum

Thank you all for replying

I wanted to prevent the users who were deleted already to logging in. 

I resolve my problem by extending a class from JDBCRealm and override the
getConnection() method (I'm not sure about the method name) and put my
"select" statement with my favorite where clause
"where status = 0 and username = ?" 
and in security-filter.xml I declared my class instead of tomcat's JDBCRealm

thank you again

-- 
View this message in context: 
http://www.nabble.com/a-question-about-user-athentication-tf4010274.html#a11454885
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Error starting Tomcat 5.5 as a Windows service

2007-07-05 Thread Randy Bumgardner
Tony,

We had the same issue recently. Copying msvcr71.dll into the
$CATALINA_HOME/bin directory fixed the issue... Here's a thread with
more background:

http://forum.java.sun.com/thread.jspa?threadID=5121172

Hope this helps!

-randy
 
Randy Bumgardner
Software Engineer
1400 Marina Way South
Richmond, CA 94804
+1 510.621.5010 direct
+1 510.402.8750 cell
[EMAIL PROTECTED]
www.inovis.com

-Original Message-
From: Tony Fountain [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 05, 2007 1:14 PM
To: users@tomcat.apache.org
Subject: Error starting Tomcat 5.5 as a Windows service

Hi,
 
I am attempting to install Tomcat 5.5.23 as a Windows service on a
Windows 2003 Server box.  The steps I went through are as follows

*   Installed the JDK 1.5 Update 12
*   Manually added the environment variable JAVA_HOME to C:\Program
Files\Java\jdk1.5.0_12 (as a system variable, not user level)
*   Ran the windows installer package and selected the full install
option.  At this point I expected to be able to test the service can
start and serve requests using examples installed with the installation
but I am unable to.  Anytime I try to start the Windows service the
following error is logged:

[2007-07-05 15:53:54] [1276 prunsrv.c] [debug] Procrun log
initialized
[2007-07-05 15:53:54] [info] Running Service...
[2007-07-05 15:53:54] [1098 prunsrv.c] [debug] Inside
ServiceMain...
[2007-07-05 15:53:54] [info] Starting service...
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[0]
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[1]
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[2]
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat
5.5\common\endorsed
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[3]
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat
5.5\temp
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[4]
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[5]
-Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\Tomcat 5.5\conf\logging.properties
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[6]
-Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat
5.5\bin\bootstrap.jar
[2007-07-05 15:53:54] [400  javajni.c] [debug] Jvm Option[7]
vfprintf
[2007-07-05 15:53:54] [info] Error occurred during
initialization of VM
[2007-07-05 15:53:54] [info] java/lang/NoClassDefFoundError
[2007-07-05 15:53:54] [info] : java/lang/Object

I'm assuming it's a class path issue but being new to the world of Java,
I'm not sure what could be missing out of a basic installation.  I have
performed some Google searches and even searched through some of the
archives but was unable to find anything specific to this situation.
Any pointers or a push in the right direction would be greatly
appreciated.
 
FYI - Even at the Windows command prompt, if I type java -version I
receive this error:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Same error, different cause so I'm not completely sure if this is even
related to the Tomcat installation, rather possibly some odd situation
that was encountered when the JDK was installed.
 
Thanks,
Tony

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread hanasaki
Did you per-complile the JPS's? - don't - in this case
Ensure the jsp version you coded against is the same as that supported
by the hosting company.

Jon Wingfield wrote:
> You are using jdk1.5 features (autoboxing, for example ) in your JSP pages.
> Early versions of the 5.5 tree bundled a jsp compiler (JDT) which didn't
> support these new language features.
> Later versions bundled an updated version of the compiler...
> For deploying on 5.5.9 just get rid of your autoboxing:
> 
> int thing = 4;
> request.setAttribute("stuff", new Integer(thing));
> 
> instead of
> 
> request.setAttribute("stuff", thing);
> 
> Regards,
> 
> Jon
> 
> Girish Havaldar wrote:
>> On 05/07/07, Girish Havaldar <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> we have an application developed using the following components as
>>> listed
>> below
>>>
>>> mysql 5.0.27
>>> jdk 1.5.0_06
>>> jre  1.5.0_06
>>> tomcat5.5.20
>>> Apache   2
>>> phpMyAdmin   2.9.2
>>> Servlets  2.3
>>> JSP1.2
>>>
>>>  Our application is showing errors when deployed on tomcat 5.5.9(the
>>> Hosting company is using Tomcat 5.5.9.)
>> ERROR:
>> type Exception report
>>
>> message
>>
>> description The server encountered an internal error () that prevented it
>> from fulfilling this request.
>>
>> exception
>>
>> org.apache.jasper.JasperException: Unable to compile class for JSP
>>
>> An error occurred at line: 67 in the jsp file: /classification.jsp
>> Generated servlet error:
>> Type mismatch: cannot convert from Integer to int
>>
>> An error occurred at line: 67 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method add(int, Object) in the type ArrayList is not applicable
>> for the
>> arguments (int)
>>
>> An error occurred at line: 226 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method setAttribute(String, Object) in the type ServletRequest is not
>> applicable for the arguments (String, int)
>>
>> An error occurred at line: 263 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method setAttribute(String, Object) in the type ServletRequest is not
>> applicable for the arguments (String, int)
>>
>>
>>org.apache.jasper.compiler.DefaultErrorHandler.javacError(
>> DefaultErrorHandler.java:84)
>>org.apache.jasper.compiler.ErrorDispatcher.javacError(
>> ErrorDispatcher.java:328)
>>org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
>> :397)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
>>org.apache.jasper.JspCompilationContext.compile(
>> JspCompilationContext.java:556)
>>org.apache.jasper.servlet.JspServletWrapper.service(
>> JspServletWrapper.java:293)
>>   
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
>>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>
>> note The full stack trace of the root cause is available in the Apache
>> Tomcat/5.5.9 logs.
>>
>>
>>>  so what is the solution.
>>> Also plz send me info abt hosting comapny who can support the above
>>> specification.
>>>
>>>
>>> Thank you,
>>>
>>> Girish S.Havaldar.
>>>
>>
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should !

2007-07-05 Thread Ben Iggulden
Bit of a maddening problem this one.

I'm setting up https on Tomcat 5.5.  
Following the how-to closely I've generated a keystore using keytool and
uncommented/modified the port 8443 connector in the server.xml.
But the https connector just fails to work, the logs report these errors:

1. org.apache.tomcat.util.net.SSLImplementation - Error loading SSL
Implementation org.apache.tomcat.util.net.puretls.PureTLSImplementation
   java.lang.ClassNotFoundException:
org.apache.tomcat.util.net.puretls.PureTLSImplementation

2. DEBUG main org.apache.tomcat.util.net.jsse.JSSEImplementation - Error
getting factory: org.apache.tomcat.util.net.jsse.JSSE15Factory
   java.lang.ClassNotFoundException:
org.apache.tomcat.util.net.jsse.JSSE15Factory

3. ERROR main org.apache.coyote.http11.Http11BaseProtocol - Error
initializing endpoint
   java.io.IOException: Keystore was tampered with, or password was
incorrect

4. ERROR main org.apache.catalina.startup.Catalina - Catalina.start
LifecycleException:  Protocol handler initialization failed:
java.io.IOException: Keystore was tampered with, or password was incorrect

Now from reading I think the first is unimportant because it should be using
a JSSE and not PureTLS implementation.  The second would look worrying then,
and could mean I'm running with the wrong JSSE version (I'm using the one
that shipped with Tomcat 5.5 and a Java 5 JRE).  The 3rd & 4th are the same
and are the ones really messing with me.  As you can see below..the keystore
password used in generation and in the server.xml are the same so that one
has got me.

Does this look like a JSSE version issue or have I missed something much
more simple ?

---
Log of console session in which I generated the keystore:

C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf>"C:\Program
Files\Java\j2re1.4.2_14\bin\keytool" -genkey -alias tomcat -keyalg RSA
-keystore .keystore
Enter keystore password:  t0mcat
What is your first and last name?
  [Unknown]:  localhost
What is the name of your organizational unit?
  [Unknown]:  Dev Env
What is the name of your organization?
  [Unknown]:  Codefarm
What is the name of your City or Locality?
  [Unknown]:  Repton
What is the name of your State or Province?
  [Unknown]:  NSW
What is the two-letter country code for this unit?
  [Unknown]:  AU
Is CN=localhost, OU=Dev Env, O=Codefarm, L=Repton, ST=NSW, C=AU correct?
  [no]:  y

Enter key password for 
(RETURN if same as keystore password):

C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf>
---
The server.xml connector:




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread Girish Havaldar

Thnks for the resplone, now v r doing that only

GS.

On 06/07/07, hanasaki <[EMAIL PROTECTED]> wrote:

Did you per-complile the JPS's? - don't - in this case
Ensure the jsp version you coded against is the same as that supported
by the hosting company.

Jon Wingfield wrote:
> You are using jdk1.5 features (autoboxing, for example ) in your JSP pages.
> Early versions of the 5.5 tree bundled a jsp compiler (JDT) which didn't
> support these new language features.
> Later versions bundled an updated version of the compiler...
> For deploying on 5.5.9 just get rid of your autoboxing:
>
> int thing = 4;
> request.setAttribute("stuff", new Integer(thing));
>
> instead of
>
> request.setAttribute("stuff", thing);
>
> Regards,
>
> Jon
>
> Girish Havaldar wrote:
>> On 05/07/07, Girish Havaldar <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> we have an application developed using the following components as
>>> listed
>> below
>>>
>>> mysql 5.0.27
>>> jdk 1.5.0_06
>>> jre  1.5.0_06
>>> tomcat5.5.20
>>> Apache   2
>>> phpMyAdmin   2.9.2
>>> Servlets  2.3
>>> JSP1.2
>>>
>>>  Our application is showing errors when deployed on tomcat 5.5.9(the
>>> Hosting company is using Tomcat 5.5.9.)
>> ERROR:
>> type Exception report
>>
>> message
>>
>> description The server encountered an internal error () that prevented it
>> from fulfilling this request.
>>
>> exception
>>
>> org.apache.jasper.JasperException: Unable to compile class for JSP
>>
>> An error occurred at line: 67 in the jsp file: /classification.jsp
>> Generated servlet error:
>> Type mismatch: cannot convert from Integer to int
>>
>> An error occurred at line: 67 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method add(int, Object) in the type ArrayList is not applicable
>> for the
>> arguments (int)
>>
>> An error occurred at line: 226 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method setAttribute(String, Object) in the type ServletRequest is not
>> applicable for the arguments (String, int)
>>
>> An error occurred at line: 263 in the jsp file: /classification.jsp
>> Generated servlet error:
>> The method setAttribute(String, Object) in the type ServletRequest is not
>> applicable for the arguments (String, int)
>>
>>
>>org.apache.jasper.compiler.DefaultErrorHandler.javacError(
>> DefaultErrorHandler.java:84)
>>org.apache.jasper.compiler.ErrorDispatcher.javacError(
>> ErrorDispatcher.java:328)
>>org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
>> :397)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
>>org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
>>org.apache.jasper.JspCompilationContext.compile(
>> JspCompilationContext.java:556)
>>org.apache.jasper.servlet.JspServletWrapper.service(
>> JspServletWrapper.java:293)
>>
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
>>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>
>> note The full stack trace of the root cause is available in the Apache
>> Tomcat/5.5.9 logs.
>>
>>
>>>  so what is the solution.
>>> Also plz send me info abt hosting comapny who can support the above
>>> specification.
>>>
>>>
>>> Thank you,
>>>
>>> Girish S.Havaldar.
>>>
>>
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread hanasaki
What do you mean "v r"?  Please do not post shortcut English ;)

When you get things working... Please post the solution to the problem
so we can all learn.

Girish Havaldar wrote:
> Thnks for the resplone, now v r doing that only
> 
> GS.
> 
> On 06/07/07, hanasaki <[EMAIL PROTECTED]> wrote:
>> Did you per-complile the JPS's? - don't - in this case
>> Ensure the jsp version you coded against is the same as that supported
>> by the hosting company.
>>
>> Jon Wingfield wrote:
>> > You are using jdk1.5 features (autoboxing, for example ) in your JSP
>> pages.
>> > Early versions of the 5.5 tree bundled a jsp compiler (JDT) which
>> didn't
>> > support these new language features.
>> > Later versions bundled an updated version of the compiler...
>> > For deploying on 5.5.9 just get rid of your autoboxing:
>> >
>> > int thing = 4;
>> > request.setAttribute("stuff", new Integer(thing));
>> >
>> > instead of
>> >
>> > request.setAttribute("stuff", thing);
>> >
>> > Regards,
>> >
>> > Jon
>> >
>> > Girish Havaldar wrote:
>> >> On 05/07/07, Girish Havaldar <[EMAIL PROTECTED]> wrote:
>> >>> Hi,
>> >>>
>> >>> we have an application developed using the following components as
>> >>> listed
>> >> below
>> >>>
>> >>> mysql 5.0.27
>> >>> jdk 1.5.0_06
>> >>> jre  1.5.0_06
>> >>> tomcat5.5.20
>> >>> Apache   2
>> >>> phpMyAdmin   2.9.2
>> >>> Servlets  2.3
>> >>> JSP1.2
>> >>>
>> >>>  Our application is showing errors when deployed on tomcat 5.5.9(the
>> >>> Hosting company is using Tomcat 5.5.9.)
>> >> ERROR:
>> >> type Exception report
>> >>
>> >> message
>> >>
>> >> description The server encountered an internal error () that
>> prevented it
>> >> from fulfilling this request.
>> >>
>> >> exception
>> >>
>> >> org.apache.jasper.JasperException: Unable to compile class for JSP
>> >>
>> >> An error occurred at line: 67 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> Type mismatch: cannot convert from Integer to int
>> >>
>> >> An error occurred at line: 67 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> The method add(int, Object) in the type ArrayList is not applicable
>> >> for the
>> >> arguments (int)
>> >>
>> >> An error occurred at line: 226 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> The method setAttribute(String, Object) in the type ServletRequest
>> is not
>> >> applicable for the arguments (String, int)
>> >>
>> >> An error occurred at line: 263 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> The method setAttribute(String, Object) in the type ServletRequest
>> is not
>> >> applicable for the arguments (String, int)
>> >>
>> >>
>> >>org.apache.jasper.compiler.DefaultErrorHandler.javacError(
>> >> DefaultErrorHandler.java:84)
>> >>org.apache.jasper.compiler.ErrorDispatcher.javacError(
>> >> ErrorDispatcher.java:328)
>> >>   
>> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
>> >> :397)
>> >>org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
>> >>org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
>> >>org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
>> >>org.apache.jasper.JspCompilationContext.compile(
>> >> JspCompilationContext.java:556)
>> >>org.apache.jasper.servlet.JspServletWrapper.service(
>> >> JspServletWrapper.java:293)
>> >>
>> >>
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
>> >>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>> >>javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> >>
>> >> note The full stack trace of the root cause is available in the Apache
>> >> Tomcat/5.5.9 logs.
>> >>
>> >>
>> >>>  so what is the solution.
>> >>> Also plz send me info abt hosting comapny who can support the above
>> >>> specification.
>> >>>
>> >>>
>> >>> Thank you,
>> >>>
>> >>> Girish S.Havaldar.
>> >>>
>> >>
>> >
>> >
>> >
>> > -
>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Version problem

2007-07-05 Thread Girish Havaldar

Thank you for your suggestion, i am new to this group, next time i'll
this in mind

GS


On 06/07/07, hanasaki <[EMAIL PROTECTED]> wrote:

What do you mean "v r"?  Please do not post shortcut English ;)

When you get things working... Please post the solution to the problem
so we can all learn.

Girish Havaldar wrote:
> Thnks for the resplone, now v r doing that only
>
> GS.
>
> On 06/07/07, hanasaki <[EMAIL PROTECTED]> wrote:
>> Did you per-complile the JPS's? - don't - in this case
>> Ensure the jsp version you coded against is the same as that supported
>> by the hosting company.
>>
>> Jon Wingfield wrote:
>> > You are using jdk1.5 features (autoboxing, for example ) in your JSP
>> pages.
>> > Early versions of the 5.5 tree bundled a jsp compiler (JDT) which
>> didn't
>> > support these new language features.
>> > Later versions bundled an updated version of the compiler...
>> > For deploying on 5.5.9 just get rid of your autoboxing:
>> >
>> > int thing = 4;
>> > request.setAttribute("stuff", new Integer(thing));
>> >
>> > instead of
>> >
>> > request.setAttribute("stuff", thing);
>> >
>> > Regards,
>> >
>> > Jon
>> >
>> > Girish Havaldar wrote:
>> >> On 05/07/07, Girish Havaldar <[EMAIL PROTECTED]> wrote:
>> >>> Hi,
>> >>>
>> >>> we have an application developed using the following components as
>> >>> listed
>> >> below
>> >>>
>> >>> mysql 5.0.27
>> >>> jdk 1.5.0_06
>> >>> jre  1.5.0_06
>> >>> tomcat5.5.20
>> >>> Apache   2
>> >>> phpMyAdmin   2.9.2
>> >>> Servlets  2.3
>> >>> JSP1.2
>> >>>
>> >>>  Our application is showing errors when deployed on tomcat 5.5.9(the
>> >>> Hosting company is using Tomcat 5.5.9.)
>> >> ERROR:
>> >> type Exception report
>> >>
>> >> message
>> >>
>> >> description The server encountered an internal error () that
>> prevented it
>> >> from fulfilling this request.
>> >>
>> >> exception
>> >>
>> >> org.apache.jasper.JasperException: Unable to compile class for JSP
>> >>
>> >> An error occurred at line: 67 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> Type mismatch: cannot convert from Integer to int
>> >>
>> >> An error occurred at line: 67 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> The method add(int, Object) in the type ArrayList is not applicable
>> >> for the
>> >> arguments (int)
>> >>
>> >> An error occurred at line: 226 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> The method setAttribute(String, Object) in the type ServletRequest
>> is not
>> >> applicable for the arguments (String, int)
>> >>
>> >> An error occurred at line: 263 in the jsp file: /classification.jsp
>> >> Generated servlet error:
>> >> The method setAttribute(String, Object) in the type ServletRequest
>> is not
>> >> applicable for the arguments (String, int)
>> >>
>> >>
>> >>org.apache.jasper.compiler.DefaultErrorHandler.javacError(
>> >> DefaultErrorHandler.java:84)
>> >>org.apache.jasper.compiler.ErrorDispatcher.javacError(
>> >> ErrorDispatcher.java:328)
>> >>
>> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
>> >> :397)
>> >>org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
>> >>org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
>> >>org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
>> >>org.apache.jasper.JspCompilationContext.compile(
>> >> JspCompilationContext.java:556)
>> >>org.apache.jasper.servlet.JspServletWrapper.service(
>> >> JspServletWrapper.java:293)
>> >>
>> >>
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
>> >>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>> >>javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> >>
>> >> note The full stack trace of the root cause is available in the Apache
>> >> Tomcat/5.5.9 logs.
>> >>
>> >>
>> >>>  so what is the solution.
>> >>> Also plz send me info abt hosting comapny who can support the above
>> >>> specification.
>> >>>
>> >>>
>> >>> Thank you,
>> >>>
>> >>> Girish S.Havaldar.
>> >>>
>> >>
>> >
>> >
>> >
>> > -
>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

-
To start a new topic, e-mail: users@tomca