Re: Tomcat can't find Java Beans
On 07/05/2010 17:48, Luís de Sousa wrote: > This is really bad. I just reloaded the application and it started > running properly, Tomcat can now find the bean... I hadn't created the > tomcat6 user yet. > > I believe yesterday, in the midst of all those back and forth e-mails, > I must have fixed something, possibly related to permissions. The way > I installed Tomcat all resources are owned by the root and something > might have been inaccessible. > > I'm sorry for taking your time like this and inadvertently creating > such an amount of mail traffic. Don't worry about it. At least you now have a list of things to check when you come across a problem in future. p > Thanks once more, > > Luís > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > signature.asc Description: OpenPGP digital signature
Re: Tomcat can't find Java Beans
This is really bad. I just reloaded the application and it started running properly, Tomcat can now find the bean... I hadn't created the tomcat6 user yet. I believe yesterday, in the midst of all those back and forth e-mails, I must have fixed something, possibly related to permissions. The way I installed Tomcat all resources are owned by the root and something might have been inaccessible. I'm sorry for taking your time like this and inadvertently creating such an amount of mail traffic. Thanks once more, Luís - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat can't find Java Beans
> From: Luís de Sousa [mailto:luis.a.de.so...@gmail.com] > Subject: Re: Tomcat can't find Java Beans > > I already have Tomcat listening on port 8080. If you want to keep Tomcat on port 8080, you don't need to do anything other than run it under its own userid (and fix the file ownership, of course). Using jsvc is appropriate when you want Tomcat to use port 80, which is normally accessible only to root. Another alternative is to leave Tomcat on 8080, and use iptables to route requests for port 80 to 8080. Running Tomcat as root is a major security risk, since a small bug in a webapp could open up the whole file system to abuse. - 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
Re: Tomcat can't find Java Beans
2010/5/6 Luís de Sousa : > On Thu, May 6, 2010 at 5:55 PM, Caldarale, Charles R > wrote: >> >> http://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_privileges.3F >> Hi again, I already have Tomcat listening on port 8080. From what I understand I still have to do run the foo.c program. But frankly I don't understand what it does, but all my system's users (root and me) are alredy in the tomcat6 usergroup. Can someone detail this a bit more please? Thank you, Luís - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat can't find Java Beans
On Thu, May 6, 2010 at 5:55 PM, Caldarale, Charles R wrote: > > http://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_privileges.3F > Chuck thanks for the link. I have to go now, let you know tomorrow how it went. Luís - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat can't find Java Beans
> From: Luís de Sousa [mailto:luis.a.de.so...@gmail.com] > Subject: Re: Tomcat can't find Java Beans > > I installed Tomcat with the good old "sudo apt-get install" The 3rd-party repackaging of Tomcat often introduce configuration and file placement issues that the contributors for this list are not familiar with. One thing to try is installation of a Tomcat from tomcat.apache.org, which we are familiar with. > > N.B. Starting Tomcat under the root user is bad. > > That's exactly what I'm doing. Can you please suggest how should I set > permissions on Tomcat's files? Create the tomcat user or assign it to > mine? Is there a guide I could follow? http://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_privileges.3F - 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
RE: Tomcat can't find Java Beans
keep it honest pidster.. the question is ownership of the resource NOT the folder name or location Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Thu, 6 May 2010 17:45:56 +0100 > Subject: Re: Tomcat can't find Java Beans > From: luis.a.de.so...@gmail.com > To: users@tomcat.apache.org; p...@pidster.com > > On Thu, May 6, 2010 at 5:33 PM, Pid wrote: > > > > So you've got a mix of ownerships there. > > > > You installed Tomcat as 'root', but are now running it as 'tomcat6'? > > Make sure the whole tomcat installation is owned by the tomcat6 user, if > > that's what you're using to start Tomcat. > > Ok, I don't have such user in my system. I installed Tomcat with the > good old "sudo apt-get install", all configs where made automatically > by synaptic (or whomever). > > > N.B. Starting Tomcat under the root user is bad. > > That's exactly what I'm doing. Can you please suggest how should I set > permissions on Tomcat's files? Create the tomcat user or assign it to > mine? Is there a guide I could follow? > > > You can delete the default_root directory that Martin suggested you > > create, and also the matching xml file above, which will stop the error. > > Ok. Thanks for your patience. > > Luís > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
Re: Tomcat can't find Java Beans
On Thu, May 6, 2010 at 5:33 PM, Pid wrote: > > So you've got a mix of ownerships there. > > You installed Tomcat as 'root', but are now running it as 'tomcat6'? > Make sure the whole tomcat installation is owned by the tomcat6 user, if > that's what you're using to start Tomcat. Ok, I don't have such user in my system. I installed Tomcat with the good old "sudo apt-get install", all configs where made automatically by synaptic (or whomever). > N.B. Starting Tomcat under the root user is bad. That's exactly what I'm doing. Can you please suggest how should I set permissions on Tomcat's files? Create the tomcat user or assign it to mine? Is there a guide I could follow? > You can delete the default_root directory that Martin suggested you > create, and also the matching xml file above, which will stop the error. Ok. Thanks for your patience. Luís - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat can't find Java Beans
On 06/05/2010 17:23, Luís de Sousa wrote: > On Thu, May 6, 2010 at 5:17 PM, Pid wrote: >> On 06/05/2010 17:12, Caldarale, Charles R wrote: >> >> I'd like to know what's in the conf/Catalina/localhost directory too please. >> > > Here it goes then. > > Luís > > l...@kohntarkosz:~/tomcat/conf/Catalina$ ls -la > total 12 > drwxrwxr-x 3 root tomcat6 4096 2010-01-07 17:11 . > drwxr-xr-x 4 root root4096 2010-04-23 15:31 .. > drwxrwxr-x 2 root tomcat6 4096 2010-05-06 08:12 localhost > l...@kohntarkosz:~/tomcat/conf/Catalina$ cd localhost > l...@kohntarkosz:~/tomcat/conf/Catalina/localhost$ ls -la > total 32 > drwxrwxr-x 2 roottomcat6 4096 2010-05-06 08:12 . > drwxrwxr-x 3 roottomcat6 4096 2010-01-07 17:11 .. > -rw-r--r-- 1 rootroot 51 2010-04-21 17:30 default_root.xml > -rw-r--r-- 1 rootroot 922 2009-10-26 07:19 docs.xml > -rw-r--r-- 1 rootroot 78 2009-10-26 07:19 examples.xml > -rw-r--r-- 1 rootroot 958 2009-10-26 07:19 host-manager.xml > -rw-r--r-- 1 rootroot 948 2009-10-26 07:19 manager.xml > -rw-r--r-- 1 tomcat6 tomcat6 51 2010-01-07 17:12 ROOT.xml So you've got a mix of ownerships there. You installed Tomcat as 'root', but are now running it as 'tomcat6'? Make sure the whole tomcat installation is owned by the tomcat6 user, if that's what you're using to start Tomcat. N.B. Starting Tomcat under the root user is bad. You can delete the default_root directory that Martin suggested you create, and also the matching xml file above, which will stop the error. p signature.asc Description: OpenPGP digital signature
Re: Tomcat can't find Java Beans
On Thu, May 6, 2010 at 5:17 PM, Pid wrote: > On 06/05/2010 17:12, Caldarale, Charles R wrote: > > I'd like to know what's in the conf/Catalina/localhost directory too please. > Here it goes then. Luís l...@kohntarkosz:~/tomcat/conf/Catalina$ ls -la total 12 drwxrwxr-x 3 root tomcat6 4096 2010-01-07 17:11 . drwxr-xr-x 4 root root4096 2010-04-23 15:31 .. drwxrwxr-x 2 root tomcat6 4096 2010-05-06 08:12 localhost l...@kohntarkosz:~/tomcat/conf/Catalina$ cd localhost l...@kohntarkosz:~/tomcat/conf/Catalina/localhost$ ls -la total 32 drwxrwxr-x 2 roottomcat6 4096 2010-05-06 08:12 . drwxrwxr-x 3 roottomcat6 4096 2010-01-07 17:11 .. -rw-r--r-- 1 rootroot 51 2010-04-21 17:30 default_root.xml -rw-r--r-- 1 rootroot 922 2009-10-26 07:19 docs.xml -rw-r--r-- 1 rootroot 78 2009-10-26 07:19 examples.xml -rw-r--r-- 1 rootroot 958 2009-10-26 07:19 host-manager.xml -rw-r--r-- 1 rootroot 948 2009-10-26 07:19 manager.xml -rw-r--r-- 1 tomcat6 tomcat6 51 2010-01-07 17:12 ROOT.xml - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat can't find Java Beans
On Thu, May 6, 2010 at 5:12 PM, Caldarale, Charles R wrote: > > Martin who? If it was Martin Gainty, be very wary - this is another example > of needing to take all of his suggestions with large chunks of salt. There > doesn't seem to be any point in having this directory. Any suggestions > received off-list should be treated with suspicion, since the sender isn't > willing to make them public. It was him. Message understood. > This thread has gone on for a bit, so can you refresh our memories about what > URL you are using, and show us the WEB-INF/web.xml for the webapp of interest > - as well as fixing the name of the bean to conform to the spec, as Pid > already noted. I'm using this address: http://localhost:8080/test/greeter.html Which correctly loads the greeter.html file, the exception pops up when I click the submit button. Since the tutorial didn't instruct to that end I didn't create an web.xml file. I have now created one (listed below) but the the effect is none. Thanks, Luís http://java.sun.com/xml/ns/javaee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";> 30 greeter.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat can't find Java Beans
On 06/05/2010 17:12, Caldarale, Charles R wrote: >> From: Luís de Sousa [mailto:luis.a.de.so...@gmail.com] >> Subject: Re: Tomcat can't find Java Beans >> >> . default_root -> what Martin sugested to create > > Martin who? If it was Martin Gainty, be very wary - this is another example > of needing to take all of his suggestions with large chunks of salt. There > doesn't seem to be any point in having this directory. Any suggestions > received off-list should be treated with suspicion, since the sender isn't > willing to make them public. > >> . test -> contains the greeter example files I posted above > > This thread has gone on for a bit, so can you refresh our memories about what > URL you are using, and show us the WEB-INF/web.xml for the webapp of interest > - as well as fixing the name of the bean to conform to the spec, as Pid > already noted. I'd like to know what's in the conf/Catalina/localhost directory too please. p > - 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 > signature.asc Description: OpenPGP digital signature
RE: Tomcat can't find Java Beans
> From: Luís de Sousa [mailto:luis.a.de.so...@gmail.com] > Subject: Re: Tomcat can't find Java Beans > > . default_root -> what Martin sugested to create Martin who? If it was Martin Gainty, be very wary - this is another example of needing to take all of his suggestions with large chunks of salt. There doesn't seem to be any point in having this directory. Any suggestions received off-list should be treated with suspicion, since the sender isn't willing to make them public. > . test -> contains the greeter example files I posted above This thread has gone on for a bit, so can you refresh our memories about what URL you are using, and show us the WEB-INF/web.xml for the webapp of interest - as well as fixing the name of the bean to conform to the spec, as Pid already noted. - 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
Re: Tomcat can't find Java Beans
On Thu, May 6, 2010 at 4:48 PM, Pid wrote: > > So what's in your tomcat/webapps directory currently? > This: l...@kohntarkosz:~/tomcat/webapps$ ls -la total 28 drwxrwxr-x 7 lads tomcat6 4096 2010-05-06 16:53 . drwxr-xr-x 3 root root4096 2010-01-07 17:11 .. drwxr-xr-x 2 lads lads4096 2010-05-06 16:09 default_root drwxrwxr-x 5 lads root4096 2010-05-05 16:45 JSPTut drwxr-xr-x 4 lads lads4096 2010-05-06 10:41 onjava drwxrwxr-x 4 lads root4096 2010-05-06 16:51 ROOT drwxr-xr-x 3 lads lads4096 2010-05-06 16:51 test . default_root -> what Martin sugested to create . JSPTut -> a JSP tutorial app . onjava -> a Beans tutorial from O'Rilley that doesn't run either . ROOT -> default Tomcat root . test -> contains the greeter example files I posted above Luís - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat can't find Java Beans
On 06/05/2010 16:35, Luís de Sousa wrote: > On Thu, May 6, 2010 at 4:26 PM, Pid wrote: >> >> Can you remove all of the comments from your server.xml and post it here? >> > > Sure, > > > > > > > >className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" > /> > > > >type="org.apache.catalina.UserDatabase" > description="User database that can be updated and saved" > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > pathname="conf/tomcat-users.xml" /> > > > > > connectionTimeout="2" >redirectPort="8443" /> > > > > resourceName="UserDatabase"/> > >unpackWARs="true" autoDeploy="true" > xmlValidation="false" xmlNamespaceAware="false"> > > > > > Neat & tidy. So what's in your tomcat/webapps directory currently? p signature.asc Description: OpenPGP digital signature
Re: Tomcat can't find Java Beans
On Thu, May 6, 2010 at 4:26 PM, Pid wrote: > > Can you remove all of the comments from your server.xml and post it here? > Sure, - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat can't find Java Beans
(Let's keep it on the list shall we?) On 06/05/2010 16:23, Luís de Sousa wrote: >> package packagename >> public class ExampleServlet extends javax.servlet.http.HttpServlet > > I have no clue where this comes from. Looks like the kind of thing > you'd find in a tutorial, but I haven't created any class, servlet or > package with those names. > > My Tomcat seems to be messed up somehow. I'm going to try to run a > simple app in a test server to see if there are differences. Can you remove all of the comments from your server.xml and post it here? p signature.asc Description: OpenPGP digital signature
Re: Tomcat can't find Java Beans
On 06/05/2010 15:19, Luís de Sousa wrote: > On Thu, May 6, 2010 at 3:14 PM, Pid wrote: >>> >>> org.apache.jasper.JasperException: /greeter.jsp(5,10) The value for >> >> Now the contents of the greeter.JSP, please? >> > > Hi again, that was in the link: > > http://www.roseindia.net/ejb/introduction/javabean.shtml But is that what is in your code? We ask questions like this because it's not always the case. > /// > / greeterbean.java > > package ourbeans; > > public class greeterbean GreeterBean is the proper name for the class. > { > > public greeterbean() {} > > public String greetme(String s) > > { > > return "How are you?"+s; > > } > > } > > /// > / greeter.htm > > > > > > Ugly HTML, IMO. p > > > > > > > > > > > /// > / greeter.jsp > > > > > > > > <% > > String s = > request.getParameter("text1"); > > String a = greeter1.greetme(s); > > out.println(a); > >%> > > > > > > /// > > Thanks, > > Luís signature.asc Description: OpenPGP digital signature
Re: Tomcat can't find Java Beans
2010/5/6 Pid : > > The list strips attachments. Otherwise I wouldn't have need to ask for it. > Oops. Here they go then, sorry for the trouble... catalina.2010-05-06.log 06-May-2010 08:04:17 org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 06-May-2010 08:04:17 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 260 ms 06-May-2010 08:04:17 org.apache.catalina.core.StandardService start INFO: Starting service Catalina 06-May-2010 08:04:17 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.20 06-May-2010 08:04:17 org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /media/Hhai/users/lads/Trabalho/Java/HelloWeb/build/web does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:769) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1258) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177) 06-May-2010 08:04:17 org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() 06-May-2010 08:04:17 org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured 06-May-2010 08:04:17 org.apache.catalina.core.StandardContext start SEVERE: Context [/HelloWeb] startup failed due to previous errors 06-May-2010 08:04:17 org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/HelloWeb] has not been started 06-May-2010 08:04:17 org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /var/lib/tomcat6/webapps/default_root does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145) at java.security.AccessControl
Re: Tomcat can't find Java Beans
On 06/05/2010 15:15, Luís de Sousa wrote: > On Thu, May 6, 2010 at 3:11 PM, Pid wrote: >> >> Please post the exact error message and stack trace from the logs. >> > > Hi Pid, please look at the attachments. The list strips attachments. Otherwise I wouldn't have need to ask for it. p signature.asc Description: OpenPGP digital signature
Re: Tomcat can't find Java Beans
On Thu, May 6, 2010 at 3:14 PM, Pid wrote: >> >> org.apache.jasper.JasperException: /greeter.jsp(5,10) The value for > > Now the contents of the greeter.JSP, please? > Hi again, that was in the link: http://www.roseindia.net/ejb/introduction/javabean.shtml /// / greeterbean.java package ourbeans; public class greeterbean { public greeterbean() {} public String greetme(String s) { return "How are you?"+s; } } /// / greeter.htm /// / greeter.jsp <% String s = request.getParameter("text1"); String a = greeter1.greetme(s); out.println(a); %> /// Thanks, Luís - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat can't find Java Beans
On Thu, May 6, 2010 at 3:11 PM, Pid wrote: > > Please post the exact error message and stack trace from the logs. > Hi Pid, please look at the attachments. Thanks, Luís - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat can't find Java Beans
On 06/05/2010 15:13, Luís de Sousa wrote: > Sorry, here goes the example exception. > > Luís > > org.apache.jasper.JasperException: /greeter.jsp(5,10) The value for Now the contents of the greeter.JSP, please? p > the useBean class attribute ourbeans.greeterbean is invalid. > > org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) > > org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) > > org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148) > > org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1272) > org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1178) > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361) > org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411) > org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417) > org.apache.jasper.compiler.Node$Root.accept(Node.java:495) > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361) > org.apache.jasper.compiler.Generator.generate(Generator.java:3426) > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:216) > org.apache.jasper.compiler.Compiler.compile(Compiler.java:332) > org.apache.jasper.compiler.Compiler.compile(Compiler.java:312) > org.apache.jasper.compiler.Compiler.compile(Compiler.java:299) > > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:616) > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269) > java.security.AccessController.doPrivileged(Native Method) > javax.security.auth.Subject.doAsPrivileged(Subject.java:537) > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301) > > org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) > > > 2010/5/6 Luís de Sousa : >> Hello everyone, >> >> Tomcat 6.0.20 on Ubuntu 9.10. I'm trying to deploy simple web >> applications that either use beans or servlets. I'm now down to very >> simple examples like this one: >> >> http://www.roseindia.net/ejb/introduction/javabean.shtml >> >> This is basically a html file, a jsp file that deals with a post and a >> java bean. I'm compiling the java files and copying the resulting >> .class into WEB-INF/classes, using the directory structure to match >> the package names. >> >> Invariably, when the bean is called Tomcat returns an error saying the >> bean is invalid (see example below). It seems that Tomcat isn't >> finding the .class files; do I need to configure something for Tomcat >> to find the beans? I though that for Tomcat 5 and beyond that wasn't >> needed. >> >> Thanks for your help, >> >> Luís >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > signature.asc Description: OpenPGP digital signature
Re: Tomcat can't find Java Beans
Sorry, here goes the example exception. Luís org.apache.jasper.JasperException: /greeter.jsp(5,10) The value for the useBean class attribute ourbeans.greeterbean is invalid. org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148) org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1272) org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1178) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361) org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411) org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417) org.apache.jasper.compiler.Node$Root.accept(Node.java:495) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361) org.apache.jasper.compiler.Generator.generate(Generator.java:3426) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:216) org.apache.jasper.compiler.Compiler.compile(Compiler.java:332) org.apache.jasper.compiler.Compiler.compile(Compiler.java:312) org.apache.jasper.compiler.Compiler.compile(Compiler.java:299) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:616) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:537) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) 2010/5/6 Luís de Sousa : > Hello everyone, > > Tomcat 6.0.20 on Ubuntu 9.10. I'm trying to deploy simple web > applications that either use beans or servlets. I'm now down to very > simple examples like this one: > > http://www.roseindia.net/ejb/introduction/javabean.shtml > > This is basically a html file, a jsp file that deals with a post and a > java bean. I'm compiling the java files and copying the resulting > .class into WEB-INF/classes, using the directory structure to match > the package names. > > Invariably, when the bean is called Tomcat returns an error saying the > bean is invalid (see example below). It seems that Tomcat isn't > finding the .class files; do I need to configure something for Tomcat > to find the beans? I though that for Tomcat 5 and beyond that wasn't > needed. > > Thanks for your help, > > Luís > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat can't find Java Beans
On 06/05/2010 14:54, Luís de Sousa wrote: > Hello everyone, > > Tomcat 6.0.20 on Ubuntu 9.10. I'm trying to deploy simple web > applications that either use beans or servlets. I'm now down to very > simple examples like this one: > > http://www.roseindia.net/ejb/introduction/javabean.shtml > > This is basically a html file, a jsp file that deals with a post and a > java bean. I'm compiling the java files and copying the resulting > .class into WEB-INF/classes, using the directory structure to match > the package names. > > Invariably, when the bean is called Tomcat returns an error saying the > bean is invalid (see example below). It seems that Tomcat isn't > finding the .class files; do I need to configure something for Tomcat > to find the beans? I though that for Tomcat 5 and beyond that wasn't > needed. Please post the exact error message and stack trace from the logs. p > Thanks for your help, > > Luís > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > signature.asc Description: OpenPGP digital signature
Tomcat can't find Java Beans
Hello everyone, Tomcat 6.0.20 on Ubuntu 9.10. I'm trying to deploy simple web applications that either use beans or servlets. I'm now down to very simple examples like this one: http://www.roseindia.net/ejb/introduction/javabean.shtml This is basically a html file, a jsp file that deals with a post and a java bean. I'm compiling the java files and copying the resulting .class into WEB-INF/classes, using the directory structure to match the package names. Invariably, when the bean is called Tomcat returns an error saying the bean is invalid (see example below). It seems that Tomcat isn't finding the .class files; do I need to configure something for Tomcat to find the beans? I though that for Tomcat 5 and beyond that wasn't needed. Thanks for your help, Luís - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org