RE: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-19 Thread Caldarale, Charles R
> From: Chris Patterson [mailto:tom...@vittox.com] 
> Subject: Re: JasperException: The value for the useBean class ___ attribute 
> is invalid

> Renamed Test-03 to ROOT.war
> Deleted the /WEB-INF folder in the appBase directory AND all other JSPs 
> (inluding sub-directories)
> Changed the server.xml file deleting the following context element:
>  debug="1"/>

All the above were definitely the right things to do.

> Still have the context element for the manager:
>  docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
> 

That should be removed as well.  The proper location for the  element 
is in conf/[host]/manager.xml, removing the path element and the long unused 
debug element.

> So I see the following directories in the appBase (public_html) folder:

> images

This is essentially treated as another webapp.  If you also have an images 
directory inside ROOT.war, the one under the appBase takes precedence.  If you 
want to use the one from ROOT.war, remove the images directory from public_html.

> index.htm

Remove index.htm; it serves no purpose here.

> ROOT
> ROOT.war

This is the proper location for both (ROOT is just the expanded ROOT.war).

> I hope this is correct way ?

Certainly much better.

> Before this configuration I allways worked with different distribution:
> images
> index.html
> prg1.jsp
> subdir (subdir/prg2.jsp)
> WEB-INF

Those are all items that belong _inside_ a webapp, not at the appBase level.  
Only individual webapps may be located immediately under the appBase directory.

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



Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-19 Thread Chris Patterson

I solved my proble in the following way:

Renamed Test-03 to ROOT.war
Deleted the /WEB-INF folder in the appBase directory AND all other JSPs 
(inluding sub-directories)

Changed the server.xml file deleting the following context element:
debug="1"/>


Still have the context element for the manager:



If I delete it, I cann not access the manager for that virtual host.

So I see the following directories in the appBase (public_html) folder:

images
index.htm
ROOT
ROOT.war

I can access:
www.domain.com to see static index.html
www.domain.com/prg1.jsp calling the class Stringbean
www.domain.com/subdir/prg2.jsp calling that same class

I hope this is correct way ?

Before this configuration I allways worked with different distribution:

images
index.html
prg1.jsp
subdir (subdir/prg2.jsp)
WEB-INF

I hope to read any comments from your side

Chris.


El 19/04/2012 02:49 p.m., Caldarale, Charles R escribió:

From: Chris Patterson [mailto:tom...@vittox.com]
Subject: Re: JasperException: The value for the useBean class ___ attribute is 
invalid
So configuration actually is as follows:

www.server.com

If you only have one, no  is needed.






Please, please read the documentation for the Tomcat version you're using.  elements 
should NOT be placed in server.xml, there is no debug attribute for, and a docBase 
attribute of "." is completely bogus.  Start again.

I still can't figure out exactly what you intend the default webapp (ROOT) to 
be.

  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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



RE: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-19 Thread Caldarale, Charles R
> From: Chris Patterson [mailto:tom...@vittox.com] 
> Subject: Re: JasperException: The value for the useBean class ___ attribute 
> is invalid

> So configuration actually is as follows:

> 
> www.server.com

If you only have one , no  is needed.

> 
> docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
> 

Please, please read the documentation for the Tomcat version you're using.  
 elements should NOT be placed in server.xml, there is no debug 
attribute for , and a docBase attribute of "." is completely bogus.  
Start again.

I still can't figure out exactly what you intend the default webapp (ROOT) to 
be.

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



Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-19 Thread Chris Patterson

Thanks for your Hints.

Today I deployed the same execise (Test-03) onto the localhost at the 
VPS server having Tomcat 5.3.35 running.

So it works like the localhost running Tomcat 6.x. It is the same procedure:

- Deploying WAR
- Stop and Start
- Confirming that www.domain.com/Test-03/prg1.jsp and 
www.domain.com/Test-03/subdir/prg2.jsp work fine

- Copy all contents undet Test-03 to the appBase directory
- Undeploy Test-03
- Check if www.domain.com/prg1.jsp and www.domain.com/subdir/prg2.jsp 
work fine


So the problem is only on virtual hosts. I changed the server.xml file 
for that virtual host
replacing the appBase to "." instead of being the same as the docBase. 
Also changed

the docBase to see if results are different. No luck !

So configuration actually is as follows:


www.server.com





Also tried to deploy that same WAR renamed as ROOT.war, but it doesn't work.
I got the following error:

FAIL - War file "ROOT.war" cannot be uploaded if context is defined in 
server.xml


Now the only difference on procedure at VPS server (localhost vs virtual 
host) is that I do not copy/replace
the web.xml (under Test-03 directory) file to the ROOT folder (meaning 
Tomcat_Home/webapps)

when doing the same excercise with the localhost.
Also, the localhost has a ROOT directory, the virtual host NOT.

Both JSP programs are ver simple and only call the same class 
Stringbeans, only prg1.jsp works.


Looking to the work directory (Catalina/domain.com) after undeployed 
Test-03 for domain.com:

I can see directory subdir, and under that: no files, only directories.

Chris


El 19/04/2012 02:25 a.m., Pid * escribió:

On 19 Apr 2012, at 01:12, Konstantin Kolinko  wrote:


2012/4/19 Chris Patterson:

Dear Konstantin, thanks for asking, I will try to answer your questions

My experience level is relative, idea is to spend less time sharing your
experience.
I have installed Tomcat servers for many years mostly on Unix/Linux,
and allready have a CentOS 5.6 with Tomcat 6.x (default) on  a local server.


OK. Thank you for detailed answer. It makes more sense now.


I could deploy my "Dynamic Web Application" (eclipse language) named Test-03
from a
WAR format and it worked for both cases. _So it should not be the "code"._
Of course it is not a Web App, its only a Test.

Differences are:
Local host has Tomcat 6.x, VPS server has Tomcat 5.3.35
Local host has Java 1.6.0_22 / OpenJDK 64-Bit, VPS server has Java 1.6.0_29
/ Java Hotspot 64-Bit

I checked following files having basically the same default configuration:
server.xml, web.xml, context.xml

When deployed on the /local server/ using the Tomcat Manager
I see the following directories:

  docs
  examples
  host-manager
  manager
  ROOT
  sample
  Test-03
  Test-03.war

Under ROOT is working the Test with URLs:
  localhost:8080/prg1.jsp
  localhost:8080/subdir/prg2.jsp

If you have deployed the broken config you originally posted then
there is a good chance that subdir is being treated as a web
application and Jasper is looking for the class in a non-existent
WEB-INF/lib.


p





Also work fine under Test-03
localhost:8080/Test-03/prg1.jsp
localhost:8080/Test-03/subdir/prg2.jsp

The class files are respectively under ROOT/WEB-INF/classes and
Test-02/WEB-INF/classes
I just copied all content undet Test-03 to the ROOT folder and reloaded
(using the Manager)


There are two apparent differences with the above copy+reload
procedure, as compared with "clean" deploy:

1. Reload != (Start + Stop).

It is a more lightweight operation than stopping and then starting a
webapp. Maybe something went wrong there.


2. You have not cleared the work directory of the ROOT webapp.

So there might be previous compiled classes for those JSPs. Depending
on timestamps they will be not recompiled.  (E.g. if you replace a jsp
with an older copy of that jsp, it will not be recompiled. Check
whether the clock on the server has the correct time. Thought it is
easier to just clean the work directory for the webapp.)


The resource id for that "The value for the useBean class" message is
"jsp.error.invalid.bean".

It is thrown is in jasper.compiler.Generator#visit() when it visits
  node if it cannot load the class specified in the
useBean tag.

http://svn.apache.org/viewvc/tomcat/tc5.5.x/tags/TOMCAT_5_5_35/jasper/src/share/org/apache/jasper/compiler/Generator.java?view=markup#l1199


You have to check that you did not forget to copy necessary supporting
classes and libraries. If that fails, try to write a simple jsp that
explicitly loads that class.


The same excersise on the VPS running CPanel for a domain like etrust.us
does only work for etrust.us/Test-03/prg1.jsp
When trying etrust.us/prg1.jsp it only works until trying
etrust.us/subdir/prg2.jsp,
then i get the error 500: JasperException: The value for the useBean class
___ attribute is invalid

Log file shows no more details about the issue.

As "main directory" I mean the docBase referenced in the server.xml file.
I have read 

Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris,

On 4/18/12 7:36 PM, Chris Patterson wrote:
> Differences are: Local host has Tomcat 6.x, VPS server has Tomcat
> 5.3.35 Local host has Java 1.6.0_22 / OpenJDK 64-Bit, VPS server
> has Java 1.6.0_29 / Java Hotspot 64-Bit
> 
> I checked following files having basically the same default
> configuration: server.xml, web.xml, context.xml

If you are using the same conf/server.xml and conf/context.xml (the
site-wide default, not the one in your WAR file) for both Tomcat 6.0.x
and 5.5.x, then you are probably getting things muddled-up: those
files are not compatible across Tomcat versions.

Please check to see that conf/server.xml and conf/context.xml isn't
your problem.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+QOr4ACgkQ9CaO5/Lv0PBNtQCggilBao3XiY2HDmmiQmtvyRoN
HfAAoLVeY+ugA2HHeHdpOqbQJKyjdXYM
=AUPO
-END PGP SIGNATURE-

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



Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-19 Thread Pid *
On 19 Apr 2012, at 01:12, Konstantin Kolinko  wrote:

> 2012/4/19 Chris Patterson :
>> Dear Konstantin, thanks for asking, I will try to answer your questions
>>
>> My experience level is relative, idea is to spend less time sharing your
>> experience.
>> I have installed Tomcat servers for many years mostly on Unix/Linux,
>> and allready have a CentOS 5.6 with Tomcat 6.x (default) on  a local server.
>>
>
> OK. Thank you for detailed answer. It makes more sense now.
>
>> I could deploy my "Dynamic Web Application" (eclipse language) named Test-03
>> from a
>> WAR format and it worked for both cases. _So it should not be the "code"._
>> Of course it is not a Web App, its only a Test.
>>
>> Differences are:
>> Local host has Tomcat 6.x, VPS server has Tomcat 5.3.35
>> Local host has Java 1.6.0_22 / OpenJDK 64-Bit, VPS server has Java 1.6.0_29
>> / Java Hotspot 64-Bit
>>
>> I checked following files having basically the same default configuration:
>> server.xml, web.xml, context.xml
>>
>> When deployed on the /local server/ using the Tomcat Manager
>> I see the following directories:
>>
>>  docs
>>  examples
>>  host-manager
>>  manager
>>  ROOT
>>  sample
>>  Test-03
>>  Test-03.war
>>
>> Under ROOT is working the Test with URLs:
>>  localhost:8080/prg1.jsp
>>  localhost:8080/subdir/prg2.jsp

If you have deployed the broken config you originally posted then
there is a good chance that subdir is being treated as a web
application and Jasper is looking for the class in a non-existent
WEB-INF/lib.


p




>> Also work fine under Test-03
>>localhost:8080/Test-03/prg1.jsp
>>localhost:8080/Test-03/subdir/prg2.jsp
>>
>> The class files are respectively under ROOT/WEB-INF/classes and
>> Test-02/WEB-INF/classes
>> I just copied all content undet Test-03 to the ROOT folder and reloaded
>> (using the Manager)
>>
>
> There are two apparent differences with the above copy+reload
> procedure, as compared with "clean" deploy:
>
> 1. Reload != (Start + Stop).
>
> It is a more lightweight operation than stopping and then starting a
> webapp. Maybe something went wrong there.
>
>
> 2. You have not cleared the work directory of the ROOT webapp.
>
> So there might be previous compiled classes for those JSPs. Depending
> on timestamps they will be not recompiled.  (E.g. if you replace a jsp
> with an older copy of that jsp, it will not be recompiled. Check
> whether the clock on the server has the correct time. Thought it is
> easier to just clean the work directory for the webapp.)
>
>
> The resource id for that "The value for the useBean class" message is
> "jsp.error.invalid.bean".
>
> It is thrown is in jasper.compiler.Generator#visit() when it visits
>  node if it cannot load the class specified in the
> useBean tag.
>
> http://svn.apache.org/viewvc/tomcat/tc5.5.x/tags/TOMCAT_5_5_35/jasper/src/share/org/apache/jasper/compiler/Generator.java?view=markup#l1199
>
>
> You have to check that you did not forget to copy necessary supporting
> classes and libraries. If that fails, try to write a simple jsp that
> explicitly loads that class.
>
>> The same excersise on the VPS running CPanel for a domain like etrust.us
>> does only work for etrust.us/Test-03/prg1.jsp
>> When trying etrust.us/prg1.jsp it only works until trying
>> etrust.us/subdir/prg2.jsp,
>> then i get the error 500: JasperException: The value for the useBean class
>> ___ attribute is invalid
>>
>> Log file shows no more details about the issue.
>>
>> As "main directory" I mean the docBase referenced in the server.xml file.
>> I have read the Servlet Specificacion (2.4) and did several changes to the
>> configuration files with no success.
>>
>> Does someone here have any idea where to check some configuration ?
>>
>>
>> El 18/04/2012 12:08 p.m., Konstantin Kolinko escribió:
>>>
>>> 2012/4/18 Chris Patterson:

 More on this, now I think it is some configuration issue for the tomcat
 server:

 I am using eclipse to check both JSP files, and they work without any
 problems
 in my PC. When deploying to Tomcat 5.5.35 to a sub-directory like de
 project
 name
 they also work fine. For example at www.domain.com/Test1/prg1.jsp and
 www.domain.com/Test1/subdir/prg2.jsp.

 If I copy them to the main directory with a shell command:
 cp -pr * .. from the Test1 directory and undeploy the Test1 application
 then only www.domain.com/prg1.jsp works and but the second one,
 www.domain.com/subdir/prg2.jsp gives me the same (500) error:

 /prg2.jsp(26,0) The value for the useBean class attribute
 jdbcbean.Stringbean is invalid.


 Is this like a BUG ? Or perhaps something about the Java version ?
 I have the following version running on a CentOS release 5.8:
 java version "1.6.0_29"
 Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
 Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

 Hope this info help a little more to find a solution.



Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-18 Thread Konstantin Kolinko
2012/4/19 Chris Patterson :
> Dear Konstantin, thanks for asking, I will try to answer your questions
>
> My experience level is relative, idea is to spend less time sharing your
> experience.
> I have installed Tomcat servers for many years mostly on Unix/Linux,
> and allready have a CentOS 5.6 with Tomcat 6.x (default) on  a local server.
>

OK. Thank you for detailed answer. It makes more sense now.

> I could deploy my "Dynamic Web Application" (eclipse language) named Test-03
> from a
> WAR format and it worked for both cases. _So it should not be the "code"._
> Of course it is not a Web App, its only a Test.
>
> Differences are:
> Local host has Tomcat 6.x, VPS server has Tomcat 5.3.35
> Local host has Java 1.6.0_22 / OpenJDK 64-Bit, VPS server has Java 1.6.0_29
> / Java Hotspot 64-Bit
>
> I checked following files having basically the same default configuration:
> server.xml, web.xml, context.xml
>
> When deployed on the /local server/ using the Tomcat Manager
> I see the following directories:
>
>  docs
>  examples
>  host-manager
>  manager
>  ROOT
>  sample
>  Test-03
>  Test-03.war
>
> Under ROOT is working the Test with URLs:
>  localhost:8080/prg1.jsp
>  localhost:8080/subdir/prg2.jsp
>
> Also work fine under Test-03
>    localhost:8080/Test-03/prg1.jsp
>    localhost:8080/Test-03/subdir/prg2.jsp
>
> The class files are respectively under ROOT/WEB-INF/classes and
> Test-02/WEB-INF/classes
> I just copied all content undet Test-03 to the ROOT folder and reloaded
> (using the Manager)
>

There are two apparent differences with the above copy+reload
procedure, as compared with "clean" deploy:

1. Reload != (Start + Stop).

It is a more lightweight operation than stopping and then starting a
webapp. Maybe something went wrong there.


2. You have not cleared the work directory of the ROOT webapp.

So there might be previous compiled classes for those JSPs. Depending
on timestamps they will be not recompiled.  (E.g. if you replace a jsp
with an older copy of that jsp, it will not be recompiled. Check
whether the clock on the server has the correct time. Thought it is
easier to just clean the work directory for the webapp.)


The resource id for that "The value for the useBean class" message is
"jsp.error.invalid.bean".

It is thrown is in jasper.compiler.Generator#visit() when it visits
 node if it cannot load the class specified in the
useBean tag.

http://svn.apache.org/viewvc/tomcat/tc5.5.x/tags/TOMCAT_5_5_35/jasper/src/share/org/apache/jasper/compiler/Generator.java?view=markup#l1199


You have to check that you did not forget to copy necessary supporting
classes and libraries. If that fails, try to write a simple jsp that
explicitly loads that class.

> The same excersise on the VPS running CPanel for a domain like etrust.us
> does only work for etrust.us/Test-03/prg1.jsp
> When trying etrust.us/prg1.jsp it only works until trying
> etrust.us/subdir/prg2.jsp,
> then i get the error 500: JasperException: The value for the useBean class
> ___ attribute is invalid
>
> Log file shows no more details about the issue.
>
> As "main directory" I mean the docBase referenced in the server.xml file.
> I have read the Servlet Specificacion (2.4) and did several changes to the
> configuration files with no success.
>
> Does someone here have any idea where to check some configuration ?
>
>
> El 18/04/2012 12:08 p.m., Konstantin Kolinko escribió:
>>
>> 2012/4/18 Chris Patterson:
>>>
>>> More on this, now I think it is some configuration issue for the tomcat
>>> server:
>>>
>>> I am using eclipse to check both JSP files, and they work without any
>>> problems
>>> in my PC. When deploying to Tomcat 5.5.35 to a sub-directory like de
>>> project
>>> name
>>> they also work fine. For example at www.domain.com/Test1/prg1.jsp and
>>> www.domain.com/Test1/subdir/prg2.jsp.
>>>
>>> If I copy them to the main directory with a shell command:
>>> cp -pr * .. from the Test1 directory and undeploy the Test1 application
>>> then only www.domain.com/prg1.jsp works and but the second one,
>>> www.domain.com/subdir/prg2.jsp gives me the same (500) error:
>>>
>>> /prg2.jsp(26,0) The value for the useBean class attribute
>>> jdbcbean.Stringbean is invalid.
>>>
>>>
>>> Is this like a BUG ? Or perhaps something about the Java version ?
>>> I have the following version running on a CentOS release 5.8:
>>> java version "1.6.0_29"
>>> Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
>>> Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)
>>>
>>> Hope this info help a little more to find a solution.
>>>
>>>
>> What is your experience level?
>>
>> Do you know what a "web application" is?
>> Have you read The Servlet specification, Documentation, etc.?
>>
>> Do you know where your classes must be put in a Web application?
>>
>> Your "main directory" terminology does not make sense.
>>

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-uns

Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-18 Thread Chris Patterson

Dear Konstantin, thanks for asking, I will try to answer your questions

My experience level is relative, idea is to spend less time sharing your 
experience.

I have installed Tomcat servers for many years mostly on Unix/Linux,
and allready have a CentOS 5.6 with Tomcat 6.x (default) on  a local server.

I could deploy my "Dynamic Web Application" (eclipse language) named 
Test-03 from a

WAR format and it worked for both cases. _So it should not be the "code"._
Of course it is not a Web App, its only a Test.

Differences are:
Local host has Tomcat 6.x, VPS server has Tomcat 5.3.35
Local host has Java 1.6.0_22 / OpenJDK 64-Bit, VPS server has Java 
1.6.0_29 / Java Hotspot 64-Bit


I checked following files having basically the same default configuration:
server.xml, web.xml, context.xml

When deployed on the /local server/ using the Tomcat Manager
I see the following directories:

 docs
 examples
 host-manager
 manager
 ROOT
 sample
 Test-03
 Test-03.war

Under ROOT is working the Test with URLs:
  localhost:8080/prg1.jsp
  localhost:8080/subdir/prg2.jsp

Also work fine under Test-03
localhost:8080/Test-03/prg1.jsp
localhost:8080/Test-03/subdir/prg2.jsp

The class files are respectively under ROOT/WEB-INF/classes and 
Test-02/WEB-INF/classes
I just copied all content undet Test-03 to the ROOT folder and reloaded 
(using the Manager)


The same excersise on the VPS running CPanel for a domain like etrust.us
does only work for etrust.us/Test-03/prg1.jsp
When trying etrust.us/prg1.jsp it only works until trying 
etrust.us/subdir/prg2.jsp,
then i get the error 500: JasperException: The value for the useBean 
class ___ attribute is invalid


Log file shows no more details about the issue.

As "main directory" I mean the docBase referenced in the server.xml file.
I have read the Servlet Specificacion (2.4) and did several changes to the
configuration files with no success.

Does someone here have any idea where to check some configuration ?


El 18/04/2012 12:08 p.m., Konstantin Kolinko escribió:

2012/4/18 Chris Patterson:

More on this, now I think it is some configuration issue for the tomcat
server:

I am using eclipse to check both JSP files, and they work without any
problems
in my PC. When deploying to Tomcat 5.5.35 to a sub-directory like de project
name
they also work fine. For example at www.domain.com/Test1/prg1.jsp and
www.domain.com/Test1/subdir/prg2.jsp.

If I copy them to the main directory with a shell command:
cp -pr * .. from the Test1 directory and undeploy the Test1 application
then only www.domain.com/prg1.jsp works and but the second one,
www.domain.com/subdir/prg2.jsp gives me the same (500) error:

/prg2.jsp(26,0) The value for the useBean class attribute
jdbcbean.Stringbean is invalid.


Is this like a BUG ? Or perhaps something about the Java version ?
I have the following version running on a CentOS release 5.8:
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

Hope this info help a little more to find a solution.



What is your experience level?

Do you know what a "web application" is?
Have you read The Servlet specification, Documentation, etc.?

Do you know where your classes must be put in a Web application?

Your "main directory" terminology does not make sense.

Best regards,
Konstantin Kolinko

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




Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-18 Thread Pid
On 18/04/2012 21:02, Pid wrote:
> On 18/04/2012 18:02, Chris Patterson wrote:
> 
>> Is this like a BUG ? 
> 
> Doubt it.
> 
>> Or perhaps something about the Java version ?
> 
> s/Java/Developer/g

That was rude.  Retracted, with apologies.

p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-18 Thread Pid
On 18/04/2012 18:02, Chris Patterson wrote:

> Is this like a BUG ? 

Doubt it.

> Or perhaps something about the Java version ?

s/Java/Developer/g


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-18 Thread Konstantin Kolinko
2012/4/18 Chris Patterson :
> More on this, now I think it is some configuration issue for the tomcat
> server:
>
> I am using eclipse to check both JSP files, and they work without any
> problems
> in my PC. When deploying to Tomcat 5.5.35 to a sub-directory like de project
> name
> they also work fine. For example at www.domain.com/Test1/prg1.jsp and
> www.domain.com/Test1/subdir/prg2.jsp.
>
> If I copy them to the main directory with a shell command:
> cp -pr * .. from the Test1 directory and undeploy the Test1 application
> then only www.domain.com/prg1.jsp works and but the second one,
> www.domain.com/subdir/prg2.jsp gives me the same (500) error:
>
> /prg2.jsp(26,0) The value for the useBean class attribute
> jdbcbean.Stringbean is invalid.
>
>
> Is this like a BUG ? Or perhaps something about the Java version ?
> I have the following version running on a CentOS release 5.8:
> java version "1.6.0_29"
> Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)
>
> Hope this info help a little more to find a solution.
>
>

What is your experience level?

Do you know what a "web application" is?
Have you read The Servlet specification, Documentation, etc.?

Do you know where your classes must be put in a Web application?

Your "main directory" terminology does not make sense.

Best regards,
Konstantin Kolinko

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



Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-18 Thread Chris Patterson
More on this, now I think it is some configuration issue for the tomcat 
server:


I am using eclipse to check both JSP files, and they work without any 
problems
in my PC. When deploying to Tomcat 5.5.35 to a sub-directory like de 
project name

they also work fine. For example at www.domain.com/Test1/prg1.jsp and
www.domain.com/Test1/subdir/prg2.jsp.

If I copy them to the main directory with a shell command:
cp -pr * .. from the Test1 directory and undeploy the Test1 application
then only www.domain.com/prg1.jsp works and but the second one,
www.domain.com/subdir/prg2.jsp gives me the same (500) error:

/prg2.jsp(26,0) The value for the useBean class attribute jdbcbean.Stringbean 
is invalid.


Is this like a BUG ? Or perhaps something about the Java version ?
I have the following version running on a CentOS release 5.8:
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

Hope this info help a little more to find a solution.



El 17/04/2012 11:29 a.m., Chris Patterson escribió:

Hello, pls help with the following issue:

My JSP calls a Java Bean
and works OK for both versions, Tomcat 5.5 and Tomcat 7.1

My problem is when I move that same JSP to a sub-directory,
then I get the 500 error:

org.apache.jasper.JasperException: /StrBean.jsp(26,0) The value for 
the useBean class attribute

jdbcbean.StringBean is invalid.

I think it could be solved changing the server.xml configuration 
described below (?)



www.domain.com
docBase="/home/serverhome/public_html" debug="1"/>



Any ideas about where to fix the problem ?

Wilhelm Colln
www.Vittox.com



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



Re: JasperException: The value for the useBean class ___ attribute is invalid

2012-04-18 Thread Pid
On 17/04/2012 17:29, Chris Patterson wrote:
> Hello, pls help with the following issue:
> 
> My JSP calls a Java Bean
> and works OK for both versions, Tomcat 5.5 and Tomcat 7.1

Cool!  Where did you get v7.1 from?
I've been waiting for that release.

On the other hand, you could tell us exactly which 5.5.x and 7.0.y
versions you are using, on which OS and with which version of Java.


> My problem is when I move that same JSP to a sub-directory,
> then I get the 500 error:

Which subdirectory, exactly?


> org.apache.jasper.JasperException: /StrBean.jsp(26,0) The value for the
> useBean class attribute
> jdbcbean.StringBean is invalid.
> 
> I think it could be solved changing the server.xml configuration
> described below (?)
> 
> 
>   www.domain.com
>docBase="/home/serverhome/public_html" debug="1"/>
>

No, no & thrice no.

1. Don't define the Context in server.xml.
2. Don't set Host.appBase and Context.docBase to the same value.
3. debug is not valid here in 7.x

Please carefully read all of the following:

 - http://tomcat.apache.org/tomcat-7.0-doc/appdev/index.html
 - http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

Then you'll know how to configure the ROOT application.


> Any ideas about where to fix the problem ?

How about in your JSP code, seeing as that's what Tomcat is telling you
is wrong.

Post the whole JSP in your reply.


p

> Wilhelm Colln
> www.Vittox.com
> 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature