You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by nikita berdikov <ma...@yahoo.com> on 2005/12/18 17:48:28 UTC

Tomcat 5.0.28 + Oracle9i

Hi!

I have *.jsp page with a form. It sets several
properties of a bean, that then connects to Oracle DB
and inserts data into table. When i click "Submit", i
have the following error:

HTTP Status 500 - 



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
        
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
        
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
       
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
        
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
        
org.apache.jsp.registration_jsp._jspService(registration_jsp.java:75)
        
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
       
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
       
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause 

java.io.UTFDataFormatException: Invalid byte 2 of
2-byte UTF-8 
sequence.
        
org.apache.jasper.xmlparser.UTF8Reader.invalidByte(UTF8Reader.java:615)
        
org.apache.jasper.xmlparser.UTF8Reader.read(UTF8Reader.java:305)
        
org.apache.jasper.xmlparser.XercesEncodingDetector.load(XercesEncodingDetector.java:1000)
        
org.apache.jasper.xmlparser.XercesEncodingDetector.skipString(XercesEncodingDetector.java:951)
        
org.apache.jasper.xmlparser.XercesEncodingDetector.scanXMLDecl(XercesEncodingDetector.java:1209)
        
org.apache.jasper.xmlparser.XercesEncodingDetector.getEncoding(XercesEncodingDetector.java:108)
        
org.apache.jasper.xmlparser.XercesEncodingDetector.getEncodingMethod(XercesEncodingDetector.java:121)
        
org.apache.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:57)
        
org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:313)
        
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:170)
        
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
        
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
       
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
       
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
       
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
        
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
        
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
       
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
        
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
        
org.apache.jsp.registration_jsp._jspService(registration_jsp.java:75)
        
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
       
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
       
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I tried to do:

<%@ page contentType="text/html;charset=windows-1251"
pageEncoding="windows-1251"%>
request.setCharacterEncoding("Cp1251");
response.setContentType("text/html;charset=Windows-1251");
%>


I also tried:

if( name!=null ){
	name = new
String(name.getBytes("ISO-8859-1"),"Cp1251");}
if( surname!=null ){
	surname = new
String(surname.getBytes("ISO-8859-1"),"Cp1251");}


And i even tried to use filter:

package net.fpestde.web;

import javax.servlet.*;
import java.io.IOException;

public class CharsetFilter implements Filter {
  // êîäèðîâêà
  private String encoding;

  public void init(FilterConfig config) throws
ServletException {
    // ÷èòàåì èç êîíôèãóðàöèè
    encoding =
config.getInitParameter("requestEncoding");

    // åñëè íå óñòàíîâëåíà - óñòàíàâëèâàåì Cp1251
    if (encoding == null)
      encoding = "Cp1251";
  }

  public void doFilter(ServletRequest request,
ServletResponse response, FilterChain next)
      throws IOException, ServletException {
    request.setCharacterEncoding(encoding);
    next.doFilter(request, response);
  }

  public void destroy() {
  }
}

And set in web.xml:

...
  <filter>
    <filter-name>Charset Filter</filter-name>
   
<filter-class>net.fpestde.web.CharsetFilter</filter-class>
  </filter>
...
  <filter-mapping>
    <filter-name>Charset Filter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
...


Nothing helped. Oracle NLS encoding is Cp_1251. What
else can i try? PLEASEE!!! HELP ME!

Thanks


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Tomcat 5.0.28 + Oracle9i

Posted by Steve Dodge <st...@robododge.com>.
 From your fist post, I gather you have some non-UTF-8 characters 
hard-coded in Oracle NLS function calls.  If this is what it is, I may 
know a way around it.  If you post the actual jsp code, it would be 
easier .



nikita berdikov wrote:

>Thanks.
>
>But i really need to solve this problem. Can anyone
>help?
>
>--- Martin Gainty <mg...@hotmail.com> wrote:
>
>  
>
>>Nikita
>>First I would post this to
>>xerces-j-dev@xml.apache.org 
>>and also let the folks at tomcat know this is
>>causing halts in your environment
>>tomcat-dev@jakarta.apache.org
>>At first glance this appears to be a genuine bug
>>altho attempts to find this item in bugzilla
>>returned null feel free to peruse
>>http://issues.apache.org/bugzilla/query.cgi
>>On further investigation your UTF-16 encoding may
>>not be supported in all the subsystems you are
>>using-
>>Anyone else know if all subsystems used by Tomcat
>>support UTF-16 to date 
>>OR a way to know which ones have stepped up to the
>>plate?
>>HTH,
>>Martin-
>>----- Original Message ----- 
>>From: "nikita berdikov" <ma...@yahoo.com>
>>To: "Tomcat Users List" <us...@tomcat.apache.org>
>>Sent: Sunday, December 18, 2005 3:01 PM
>>Subject: Re: Tomcat 5.0.28 + Oracle9i
>>
>>
>>    
>>
>>>I tried to save jsp-file in UTF-8 using jEdit, but
>>>      
>>>
>>it
>>    
>>
>>>didn't help. What can help me? I'm trying to solve
>>>      
>>>
>>the
>>    
>>
>>>problem for about 4 days...i'm broken
>>>--- adamc@unc.edu wrote:
>>>
>>>      
>>>
>>>>Quoting nikita berdikov <ma...@yahoo.com>:
>>>>
>>>>        
>>>>
>>>>>Hi!
>>>>>
>>>>>I have *.jsp page with a form. It sets several
>>>>>properties of a bean, that then connects to
>>>>>          
>>>>>
>>Oracle
>>    
>>
>>>>DB
>>>>        
>>>>
>>>>>and inserts data into table. When i click
>>>>>          
>>>>>
>>>>"Submit", i
>>>>        
>>>>
>>>>>have the following error:
>>>>>
>>>>>HTTP Status 500 -
>>>>>
>>>>>
>>>>>
>>>>>type Exception report
>>>>>
>>>>>message
>>>>>
>>>>>description The server encountered an internal
>>>>>          
>>>>>
>>>>error
>>>>        
>>>>
>>>>>() that prevented
>>>>>it from fulfilling this request.
>>>>>This part of error message you're showing
>>>>>          
>>>>>
>>>>[Hide Quoted Text]
>>>>        
>>>>
>>>>>root cause
>>>>>
>>>>>java.io.UTFDataFormatException: Invalid byte 2
>>>>>          
>>>>>
>>of
>>    
>>
>>>>>2-byte UTF-8
>>>>>sequence.
>>>>>
>>>>>
>>>>>          
>>>>>
>org.apache.jasper.xmlparser.UTF8Reader.invalidByte(UTF8Reader.java:615)
>  
>
>>>>>          
>>>>>
>org.apache.jasper.xmlparser.UTF8Reader.read(UTF8Reader.java:305)
>  
>
>>>>suggests to me that the issue is about the
>>>>        
>>>>
>>encoding
>>    
>>
>>>>of the JSP file 
>>>>Tomcat's trying to compile, not Oracle or the
>>>>request encoding; you 
>>>>need to make sure that the way that files'
>>>>        
>>>>
>>encoded
>>    
>>
>>>>is the way it says 
>>>>it's encoded.  So check the XML declaration on
>>>>        
>>>>
>>the
>>    
>>
>>>>JSP file; if 
>>>>necessary, you might try opening up the JSP file
>>>>        
>>>>
>>in
>>    
>>
>>>>an encoding-aware 
>>>>editor such as jEdit (Notepad and Wordpad are
>>>>        
>>>>
>>*not*
>>    
>>
>>>>generally acceptable for this kind of work =),
>>>>        
>>>>
>>and
>>    
>>
>>>>making sure the file 
>>>>is saved as properly encoded UTF-8.
>>>>
>>>>HTH
>>>>
>>>>
>>>>        
>>>>
>---------------------------------------------------------------------
>  
>
>>>>To unsubscribe, e-mail:
>>>>users-unsubscribe@tomcat.apache.org
>>>>For additional commands, e-mail:
>>>>users-help@tomcat.apache.org
>>>>
>>>>
>>>>        
>>>>
>>>__________________________________________________
>>>Do You Yahoo!?
>>>Tired of spam?  Yahoo! Mail has the best spam
>>>      
>>>
>>protection around 
>>    
>>
>>>http://mail.yahoo.com 
>>>
>>>
>>>      
>>>
>---------------------------------------------------------------------
>  
>
>>>To unsubscribe, e-mail:
>>>      
>>>
>>users-unsubscribe@tomcat.apache.org
>>    
>>
>>>For additional commands, e-mail:
>>>      
>>>
>>users-help@tomcat.apache.org
>>    
>>
>>>      
>>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>  
>


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


Re: Tomcat 5.0.28 + Oracle9i

Posted by nikita berdikov <ma...@yahoo.com>.
Thanks.

But i really need to solve this problem. Can anyone
help?

--- Martin Gainty <mg...@hotmail.com> wrote:

> Nikita
> First I would post this to
> xerces-j-dev@xml.apache.org 
> and also let the folks at tomcat know this is
> causing halts in your environment
> tomcat-dev@jakarta.apache.org
> At first glance this appears to be a genuine bug
> altho attempts to find this item in bugzilla
> returned null feel free to peruse
> http://issues.apache.org/bugzilla/query.cgi
> On further investigation your UTF-16 encoding may
> not be supported in all the subsystems you are
> using-
> Anyone else know if all subsystems used by Tomcat
> support UTF-16 to date 
> OR a way to know which ones have stepped up to the
> plate?
> HTH,
> Martin-
> ----- Original Message ----- 
> From: "nikita berdikov" <ma...@yahoo.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Sunday, December 18, 2005 3:01 PM
> Subject: Re: Tomcat 5.0.28 + Oracle9i
> 
> 
> >I tried to save jsp-file in UTF-8 using jEdit, but
> it
> > didn't help. What can help me? I'm trying to solve
> the
> > problem for about 4 days...i'm broken
> > --- adamc@unc.edu wrote:
> > 
> >> Quoting nikita berdikov <ma...@yahoo.com>:
> >> 
> >> > Hi!
> >> >
> >> > I have *.jsp page with a form. It sets several
> >> > properties of a bean, that then connects to
> Oracle
> >> DB
> >> > and inserts data into table. When i click
> >> "Submit", i
> >> > have the following error:
> >> >
> >> > HTTP Status 500 -
> >> >
> >> >
> >> >
> >> > type Exception report
> >> >
> >> > message
> >> >
> >> > description The server encountered an internal
> >> error
> >> > () that prevented
> >> > it from fulfilling this request.
> >> > This part of error message you're showing
> >> 
> >> [Hide Quoted Text]
> >> > root cause
> >> >
> >> > java.io.UTFDataFormatException: Invalid byte 2
> of
> >> > 2-byte UTF-8
> >> > sequence.
> >> >
> >> >
> >>
> >
>
org.apache.jasper.xmlparser.UTF8Reader.invalidByte(UTF8Reader.java:615)
> >> >
> >> >
> >>
> >
>
org.apache.jasper.xmlparser.UTF8Reader.read(UTF8Reader.java:305)
> >> >
> >> 
> >> suggests to me that the issue is about the
> encoding
> >> of the JSP file 
> >> Tomcat's trying to compile, not Oracle or the
> >> request encoding; you 
> >> need to make sure that the way that files'
> encoded
> >> is the way it says 
> >> it's encoded.  So check the XML declaration on
> the
> >> JSP file; if 
> >> necessary, you might try opening up the JSP file
> in
> >> an encoding-aware 
> >> editor such as jEdit (Notepad and Wordpad are
> *not*
> >> generally acceptable for this kind of work =),
> and
> >> making sure the file 
> >> is saved as properly encoded UTF-8.
> >> 
> >> HTH
> >> 
> >>
> >
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> >> users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail:
> >> users-help@tomcat.apache.org
> >> 
> >> 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail:
> users-help@tomcat.apache.org
> > 
> >


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Tomcat 5.0.28 + Oracle9i

Posted by Martin Gainty <mg...@hotmail.com>.
Nikita
First I would post this to xerces-j-dev@xml.apache.org 
and also let the folks at tomcat know this is causing halts in your environment tomcat-dev@jakarta.apache.org
At first glance this appears to be a genuine bug altho attempts to find this item in bugzilla returned null feel free to peruse
http://issues.apache.org/bugzilla/query.cgi
On further investigation your UTF-16 encoding may not be supported in all the subsystems you are using-
Anyone else know if all subsystems used by Tomcat support UTF-16 to date 
OR a way to know which ones have stepped up to the plate?
HTH,
Martin-
----- Original Message ----- 
From: "nikita berdikov" <ma...@yahoo.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Sunday, December 18, 2005 3:01 PM
Subject: Re: Tomcat 5.0.28 + Oracle9i


>I tried to save jsp-file in UTF-8 using jEdit, but it
> didn't help. What can help me? I'm trying to solve the
> problem for about 4 days...i'm broken
> --- adamc@unc.edu wrote:
> 
>> Quoting nikita berdikov <ma...@yahoo.com>:
>> 
>> > Hi!
>> >
>> > I have *.jsp page with a form. It sets several
>> > properties of a bean, that then connects to Oracle
>> DB
>> > and inserts data into table. When i click
>> "Submit", i
>> > have the following error:
>> >
>> > HTTP Status 500 -
>> >
>> >
>> >
>> > type Exception report
>> >
>> > message
>> >
>> > description The server encountered an internal
>> error
>> > () that prevented
>> > it from fulfilling this request.
>> > This part of error message you're showing
>> 
>> [Hide Quoted Text]
>> > root cause
>> >
>> > java.io.UTFDataFormatException: Invalid byte 2 of
>> > 2-byte UTF-8
>> > sequence.
>> >
>> >
>>
> org.apache.jasper.xmlparser.UTF8Reader.invalidByte(UTF8Reader.java:615)
>> >
>> >
>>
> org.apache.jasper.xmlparser.UTF8Reader.read(UTF8Reader.java:305)
>> >
>> 
>> suggests to me that the issue is about the encoding
>> of the JSP file 
>> Tomcat's trying to compile, not Oracle or the
>> request encoding; you 
>> need to make sure that the way that files' encoded
>> is the way it says 
>> it's encoded.  So check the XML declaration on the
>> JSP file; if 
>> necessary, you might try opening up the JSP file in
>> an encoding-aware 
>> editor such as jEdit (Notepad and Wordpad are *not*
>> generally acceptable for this kind of work =), and
>> making sure the file 
>> is saved as properly encoded UTF-8.
>> 
>> HTH
>> 
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail:
>> users-help@tomcat.apache.org
>> 
>> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>

Re: Tomcat 5.0.28 + Oracle9i

Posted by nikita berdikov <ma...@yahoo.com>.
I tried to save jsp-file in UTF-8 using jEdit, but it
didn't help. What can help me? I'm trying to solve the
problem for about 4 days...i'm broken
--- adamc@unc.edu wrote:

> Quoting nikita berdikov <ma...@yahoo.com>:
> 
> > Hi!
> >
> > I have *.jsp page with a form. It sets several
> > properties of a bean, that then connects to Oracle
> DB
> > and inserts data into table. When i click
> "Submit", i
> > have the following error:
> >
> > HTTP Status 500 -
> >
> >
> >
> > type Exception report
> >
> > message
> >
> > description The server encountered an internal
> error
> > () that prevented
> > it from fulfilling this request.
> > This part of error message you're showing
> 
> [Hide Quoted Text]
> > root cause
> >
> > java.io.UTFDataFormatException: Invalid byte 2 of
> > 2-byte UTF-8
> > sequence.
> >
> >
>
org.apache.jasper.xmlparser.UTF8Reader.invalidByte(UTF8Reader.java:615)
> >
> >
>
org.apache.jasper.xmlparser.UTF8Reader.read(UTF8Reader.java:305)
> >
> 
> suggests to me that the issue is about the encoding
> of the JSP file 
> Tomcat's trying to compile, not Oracle or the
> request encoding; you 
> need to make sure that the way that files' encoded
> is the way it says 
> it's encoded.  So check the XML declaration on the
> JSP file; if 
> necessary, you might try opening up the JSP file in
> an encoding-aware 
> editor such as jEdit (Notepad and Wordpad are *not*
> generally acceptable for this kind of work =), and
> making sure the file 
> is saved as properly encoded UTF-8.
> 
> HTH
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Tomcat 5.0.28 + Oracle9i

Posted by ad...@unc.edu.
Quoting nikita berdikov <ma...@yahoo.com>:

> Hi!
>
> I have *.jsp page with a form. It sets several
> properties of a bean, that then connects to Oracle DB
> and inserts data into table. When i click "Submit", i
> have the following error:
>
> HTTP Status 500 -
>
>
>
> type Exception report
>
> message
>
> description The server encountered an internal error
> () that prevented
> it from fulfilling this request.
> This part of error message you're showing

[Hide Quoted Text]
> root cause
>
> java.io.UTFDataFormatException: Invalid byte 2 of
> 2-byte UTF-8
> sequence.
>
> org.apache.jasper.xmlparser.UTF8Reader.invalidByte(UTF8Reader.java:615)
>
> org.apache.jasper.xmlparser.UTF8Reader.read(UTF8Reader.java:305)
>

suggests to me that the issue is about the encoding of the JSP file 
Tomcat's trying to compile, not Oracle or the request encoding; you 
need to make sure that the way that files' encoded is the way it says 
it's encoded.  So check the XML declaration on the JSP file; if 
necessary, you might try opening up the JSP file in an encoding-aware 
editor such as jEdit (Notepad and Wordpad are *not*
generally acceptable for this kind of work =), and making sure the file 
is saved as properly encoded UTF-8.

HTH

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


Re: Tomcat 5.0.28 + Oracle9i

Posted by ad...@unc.edu.
Quoting nikita berdikov <ma...@yahoo.com>:

> When i click "Submit", i
> have the following error:

<snip>

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

<snip>

> org.apache.jsp.registration_jsp._jspService(registration_jsp.java:75)

Just to make sure all the bases are covered, have you also checked the 
encoding on the page that is displayed when the form is submitted 
(which appears to be registration.jsp)?



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


RE: Tomcat 5.0.28 + Oracle9i

Posted by nikita berdikov <ma...@yahoo.com>.
Thats my source code of registration page. When i
click submit, the error occurs.

Please, help, whats wrong? On Resin it works well, but
Tomcat not. And i don't want to use Resin instead of
Tomcat!!!

<br><pre>
<%@ page contentType="text/html;charset=windows-1251"
pageEncoding="windows-1251"%>
<% 
   request.setCharacterEncoding("Cp1251");
   response.setHeader("Cache-Control","no-cache");
   response.setHeader("Pragma","no-cache"); 
   response.setHeader ("Expires", "0"); 
   
  
response.setContentType("text/html;charset=Windows-1251");
    
%>
<body style="font-family: Verdana, Tahoma; font-size:
12px;">
<jsp:useBean id="regHandler"
class="goose.pages.RegHandler" scope="session"/>
<%
String name = request.getParameter("name");
String surname = request.getParameter("surname");
String number = request.getParameter("number");
String birth = request.getParameter("birth");
String email = request.getParameter("email");

if( name!=null ){
	name = new
String(name.getBytes("ISO-8859-1"),"Cp1251");}
if( surname!=null ){
	surname = new
String(surname.getBytes("ISO-8859-1"),"Cp1251");}
if( number!=null ){
	number = new
String(number.getBytes("ISO-8859-1"),"Cp1251");}
if( birth!=null ){
	birth = new
String(birth.getBytes("ISO-8859-1"),"Cp1251");}
if( email!=null ){
	email = new
String(name.getBytes("ISO-8859-1"),"Cp1251");}


boolean x = false;
int species =
(request.getParameter("species")==null)?(0):(Integer.parseInt(request.getParameter("species")));
String [] specname = {"Seriy", "Beliy", "Taezenniy
gumen", "Chernaya kaz", "Krasnozobaya kaz",
"Belolobiy", "Piskilka", "Gorniy"};

if(name==null||surname==null||email==null||number==null||birth==null||
name.equals("")||surname.equals("")||email.equals("")||number.equals("")||birth.equals("")){}
else{%>
<jsp:setProperty name="regHandler" property="*"/>
<%
regHandler.addUser();%>
<jsp:forward page="./regAccept.jsp"/>
<%}%>

| <a style="text-decoration: none;"
href="./index.jsp">Home</a> |
<br>

<div style="position: absolute; top:130px; left: 30px;
border-style: solid; border-width: 1px; width: 730;">
<div style="margin: 2 em 2 em 2 em 2 em;">
<span style="position: relative; left: 260; top: -15;
font-size: 14px;"><b>Registration Form</b></span>

<form action="registration.jsp" method="post">
Enter your surname:&nbsp;
<input type="text" name="surname" size=15
maxlength="20"
value="<%=(surname!=null)?(surname):("")%>">
&nbsp;&nbsp;&nbsp;Choose your species:&nbsp;
<select name="species" value="choose"
onChange="submit()">
	<option
value="<%=(species!=0)?(String.valueOf(species)):("1")%>"><%=(species!=0)?(specname[species-1]):("Seriy")%></option>
	<option value="1">Seriy</option>
	<option value="2">Beliy</option>
	<option value="3">Tauez gum</option>
	<option value="4">4ernaja kaz</option>
	<option value="5">krasnozobayakaz</option>
	<option value="6">belolobiy</option>
	<option value="7">piskilka</option>
	<option value="8">gorniy</option>
</select>
<br>
Enter your name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="name" size=15 maxlength="15"
value="<%=(name!=null)?(name):("")%>">
<br><br>
Enter date of
birth:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="birth" size=10 maxlength="10"
value="<%=(birth!=null)?(birth):("")%>">
<br><br>
Enter number of
gooses:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="number" size=3 maxlength="3"
value="<%=(number!=null)?(number):("")%>">
<br><br>
E-mail:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="email" size=25 maxlength="25"
value="<%=(email!=null)?(email):("")%>">
<br>
<div style="position:relative; left:365; top:-100;">
<img
src="<%=(species!=0)?("./images/"+String.valueOf(species)+".gif"):("./images/1.gif")%>"></img>
</div>
<input type="Submit" name="Submit" value="Submit">
</form>
</div>
</div>
</body></pre>

--- JT Neville <jt...@spaceghost.net> wrote:

> Can't really say without seeing your code but 90% of
> the time when I get
> this error it is because I've made a type-o in my
> code and two variables are
> not aligning, or I've not terminated a line of code
> correctly.  hth
> 
> -----Original Message-----
> From: nikita berdikov [mailto:mastanik@yahoo.com] 
> Sent: Sunday, December 18, 2005 8:48 AM
> To: users@tomcat.apache.org
> Subject: Tomcat 5.0.28 + Oracle9i
> 
> Hi!
> 
> I have *.jsp page with a form. It sets several
> properties of a bean, that then connects to Oracle
> DB
> and inserts data into table. When i click "Submit",
> i
> have the following error:
> 
> HTTP Status 500 - 
> 
> 
> 
> type Exception report
> 
> message 
> 
> description The server encountered an internal error
> () that prevented 
> it from fulfilling this request.
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


RE: Tomcat 5.0.28 + Oracle9i

Posted by JT Neville <jt...@spaceghost.net>.
Can't really say without seeing your code but 90% of the time when I get
this error it is because I've made a type-o in my code and two variables are
not aligning, or I've not terminated a line of code correctly.  hth

-----Original Message-----
From: nikita berdikov [mailto:mastanik@yahoo.com] 
Sent: Sunday, December 18, 2005 8:48 AM
To: users@tomcat.apache.org
Subject: Tomcat 5.0.28 + Oracle9i

Hi!

I have *.jsp page with a form. It sets several
properties of a bean, that then connects to Oracle DB
and inserts data into table. When i click "Submit", i
have the following error:

HTTP Status 500 - 



type Exception report

message 

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



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