outofmemory exception
hi I am writing a JSP , Servlet,JavaBean web program. When I execute a jsp page with 2 nested tags, I get a Error 500 message saying that I have a: java.lang.OutOfMemoryError. I have no idea what is causing this. can anyone help.
getServletContext()
Hi, I have a problem I have been trying to solve for a very long time. I first have a initialization servlet set by load_on_startup tag. In this servlet I create a database connection and pass it to the ServletContext like this. getServletContext().setAttribute(dbConnection,dbConnection); Now the problem is how do I retrieve it from a jsp page. From by research, reading through books it shows how to get an attribute using : jsp:useBean action. However this is done if Beans/Objects are put into the setAttribute. In my case it is a database connection object. How do I retrieve this from a jsp page??? I tried (in a jsp page); % Connection connection = getServletContext().getAttribute(dbConnection); % but this returns a null. Connection never gets set.. If someone can help me please..
Re: class reload
Where do I find this topic JDK CLASSPATH vs TOMCAT CLASSPATH ??
class reload
Hi, everytime I edit a JavaBean and recompile it, I have to always shutdown tomcat and restart it again. This seems very tedious. Can anyone help me or am I missing something that I should know about tomcat. Thanx
jsp needs updating
Hi, I am at the process of learning JSP, and there are some things I see problematic. If there is a solution for my problem please let me know. First I don't like the fact that there aren't enough standard tag libraries for pervasive operations like database, cookies, html parsing, etcThere are downloadable libraries however, for example the book I am using uses it's own tag libraries and beans which the user has to download. The problem I see with this is that, it is not a standard, which means that if I want to migrate the code it wouldn't work unless I also transfer over the proper classes and tag libraries. Why don't they have a standard out there for JSP rather than using third party classes and tag handlers. Is there a standard java JSP specification tag libraries out there or do we as programmers have to make all the custom tags/ tag handlers for the common programming tags like database,cookies,parsing. etc... In my opinion JSP is a very hard technology to learn and is very misleading because most think of (including myself) JSP as Java's version of PHP or ASP. But in my opinion JSP technology is harder to learn than Java servlets. The reason why I think this is because with all the things you have to learn like creating your own tags which uses XML,creating scriplets( which in my opinion is the easiest part to JSP), creating your own JavaBean, and to top it all off , not having a standard JSP tag library makes it very diffucult as a programmer. It's a combination of XML,ASP/PHP,JavaBeans and Java Servlet. Does anyone share the same view as me or is JSP just about the scriplets and not about any of the other parts I mentioned.
javabeans with jsp
I don't know where exactly the javabean class goes in order for a jsp script to find it. Lets say that I have a jsp script in: ~/examples/jsp/tester/tester.jsp and tester.jsp uses a bean class called UserBean.class. tester.jsp has this line in the beginning: jsp:useBean id=bean class=UserBean scope=session / My question is from this point where do I put the bean UserBean and do I have to touch the web.xml or server.xml at all to resolve this problem
where is the JSP servlet
I was told that JSP scripts get translated into a servlet, however where do you find it.Where can I find the servlet
jsp help
Hi, this may sound remedial but I was hoping someone can clear jsp up for me. Java Servelets are executed by inputting the necessary information in the web.xml. This would include the servlet name, servlet class name, and the name you want it to be called as when called from browser. This much I know about the servlets. However because I am new to JSP I don't how to set it up and execute. Is it similar to the servlet process? Do you even have to put in an entry in the web.xml file. The examples given with jakarta does clarify much because all of the examples are executed by putting in the directory and .jsp file name in the browser url, obviously you couldn't put the directory name when executing by requesting like this: http://localhost:8080/examples/file_name.jsp I am doing my research by reading books and all but I would also appreciate some feedback from the public.
executing the servlet
What do I put in the url to execute a servlet on a localhost machine. I am using jakarta as standalone. Is it: http://localhost/servletpage ?please help
web.xml
Hi, in the directory ~webapps\examples\Web-inf directory I added this: servlet servlet-name helloworld /servlet-name servlet-class HelloWorldExample /servlet-class /servlet servlet-mapping servlet-name helloworld /servlet-name url-pattern /helloworld /url-pattern /servlet-mapping to the web.xml directory. I am assuming that from this there has to be a java class in the~/webapps/examples/Web-inf/classes directory called HelloWorldExample. However when I call this with a browser do I have to call it like this: http://localhost/examples/helloworld -or- http://localhost/examples/servlets/helloworld -or- http://localhost/examples/HelloWorldExample Also does it matter where you put the servlet helloworld. Currently it's in C:\tomcat\webapps\examples\servlets\helloworld.html
jsp
I am not that familiar with jsp, but with servlets whenever you create a new one you have to add it to the web.xml, stating the name, class and the url identification. If this is not done for the servlet it doesn't work. However for the jsp examples, all of the examples work without an explicit entry in the web.xml stating all the necessary info similarly to the servlet. Can anyone explain why this is.
jsp
Hi, I know how to execute and setup the configure files to execute servlets but can anyone tell the steps involved in executing a JSP scripts Is it the same as executing a servlet???
potential bug
Can anyone confirm a problem I have encountered withe Tomcat. Lets say that I write a servlet called Test.java and put it in the classes directory in the Web-Inf directory, and I decide to change it a little later. So I recompile the servlet and produce a new class file. And have in mind the server is running this whole time. Well, the problem I have encountered is that when I put the new servlet class in the 'classes' directory, where all the classes live, the change doesn't take affect, and sometimes it does. If it doesn''t take affect I have to restart the server to see the new changes. Does anyone else have the same problem..
web.xml
I want to know, whenever you want any servlets to run do you have to put an entry in the web.xml file? Can you run a servlet without putting an entry in there. Lets say I write a servlet called "Test1.java" that uses the 'RequestDispatcher's methods "forward()" or "include()". And lets say that I want to either "foward()" or "include()" a servlet call "Test2.java" , does that mean that I have to put an entry in the web.xml like this: servlet servlet-name Test1 /servlet-name servlet-class Test1 /servlet-class /servlet servlet serlvet-name Test2 /servlet-name servlet-class Test2 /servlet-class /servlet If this is true, meaning, if I have to put an entry in the web.xml file for every script I write would it get pretty messy and hard to organize with all these entrees in the web.xml file.There must a another way.
running jsp
Can anyone tell me if the steps involved running a jsp script is the same as running a servlet. And if it is different can anyone tell me the differences.
database question
Hi I am using MySQL and JDBC mm.mysql Driver to connect to the database. I am having trouble trying to connect. Can anyone tell me if MySQL is even compatible with servlets? From the JDBC mm.mysql Driver it looks as if it is. Also in one of the emails I saw a sample script and they used this driver : "sun.jdbc.odbc.JdbcOdbcDriver" I've seen that driver a lot before in documentations. What database does it work with. And is that database easier to implement than MySQL.
web.xml
I want to know, whenever you want any servlets to run do you have to put an entry in the web.xml file? Can you run a servlet without putting an entry in there. Lets say I write a servlet called "Test1.java" that uses the 'RequestDispatcher's methods "forward()" or "include()". And lets say that I want to either "foward()" or "include()" a servlet call "Test2.java" , does that mean that I have to put an entry in the web.xml like this: servlet servlet-name Test1 /servlet-name servlet-class Test1 /servlet-class /servlet servlet serlvet-name Test2 /servlet-name servlet-class Test2 /servlet-class /servlet If this is true, meaning, if I have to put an entry in the web.xml file for every script I write would it get pretty messy and hard to organize with all these entrees in the web.xml file.There must a another way.
Re: just making sure
My question was that when you have a servlet, a new one you wrote lets say Test.java, do you have to explicitly put an entry in the web.xml for it to be executed. For example: servlet servlet-name Test /servlet-name servlet-class Test /servlet-class /servlet I tried to execute a new servlet by just putting the Test.class file in the 'classes' folder in Web-inf directory, however the server returns a 404 message. So I am thinking that you have to put an entry in the web.xml for the server to know what to execute. And if this is the case and you have an application that requires several servlets do you have to put all the servlets in the web.xml file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Post method not supported....
Hi, I have an unusual problem. I have a feeling that it has to do with either server.xml or web.xml configuration. I wrote a servlet that initializes both 'doGet' and 'doPost' method. The main page is called by the doGet method that prints out the HTML tags which has a Form Method=Post tag in it. When I press submit I get this message: 2001-03-14 07:34:06 - Ctx( /Root ): 400 R( /Root + /BulletinBoard/BulletinBoard + null) HTTP method POST is not supported by this URL It appears that the server is saying that it can't handle the Form Method=Post Post method. Why is it doing this? Anyone knows???
organization
Hi, from my understanding, all compiled classes of servlets have to go in a file called 'classes' in the same directory as the 'web.xml' file in 'Web-inf' directory. And from what I heard all corresponding java sources should go in there to. Now if all files ( source java files and classes files ) go in the one directory called classes wouldn't it get really messy putting everything in one file. Does anyone have any better suggestion for organizing this problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
xml reader
can anyone suggest the best compatible xml reader. Currently I am using word but it is really slow and takes time to browse through... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: executing a servlet.
First thing I am using Tomcat as standalone. So do I type : localhost:8080/examples/Tester as a url to envoke it If I write a servlet lets call it Tester and I put it in: C:\windows\desktop\TOMCAT\webapps\examples\Tester.java as servlet. Do I have to compile it first so that it goes in C:\windows\desktop\TOMCAT\webapps\examples\WEB-INF\classes\Tester.class or will the startup automcatically compile it for me. If this is true that means that I have a servlet called Tester.java in: C:\windows\desktop\TOMCAT\webapps\examples\Tester.java And a Tester.class file in C:\windows\desktop\TOMCAT\webapps\examples\WEB-INF\classes\Tester.class Is this all correct up to now??? Now if I invoke it do I have to point it at the servlet Tester.java or the Tester.class??? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: executing a servlet.
lets say that I make a servelet and put it in this directory-C:\windows\desktop\TOMCAT\webapps\examples\servlets\TEST.html and the server.xml is configured like this: Context path="/examples" docBase="webapps/examples" crossContext="false" debug="0" reloadable="true" /Context Therefore the web-inf folder would been this directory: C:\windows\desktop\TOMCAT\webapps\examples\web-inf I also edit the web.xml file to add this : servlet servlet-name TEST /servlet-name servlet-class TEST /servlet-class /servlet Now if I want to execute this on a web browser how do I do it. I tried http://127.0.0.1/examples/servlets/TEST but this don't work... Any suggestions - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
problems with conf
hi, I am trying to execute servelets, does anyone know the default directory where servelets and JSP scripts are executed in Tomcat. Because I don't know I figured I could set the directory where Servelets and JSP scripts can be executed in "server.xml" however when I click on it , Internet Explorer opens up and I get this message : The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -- -- Reference to undeclared namespace prefix: 'xmlmapper'. Line 5, Position 34 xmlmapper:debug level="0" / can anyone help - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: problems with conf
I get this message when I try to open up server.xml: The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -- -- Reference to undeclared namespace prefix: 'xmlmapper'. Line 5, Position 34 xmlmapper:debug level="0" / does anyone know why - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: problems with conf
can anyone suggest any good books or sites where I can find out more about tomcat and setting /configuring it - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: problems with conf
when I open it with notepad it gets all mushed and ugly, very incoherent. Is there any other editor that can open it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: problems with conf
I got a chance to look at server.xml. And it is almost like apache, however when I type http://127.0.0.1/path to a servlet, I get the page couldn't be find error message. I don't think the connection is even being made. I looked over the server.xml regarding "context" to see the directories where the application files are to be put, and I also looked at the virtual host and the virtual host says to type url http://127.0.0.1/examples/where the servlet is to be find and still nothing . Anyone has any suggestions... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: problems with conf
thanx for your help. However I still have one more question, after you configure it like that wat do you put in the url in your browser. Do you put http://127.0.0.1/examples/servlet.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
executing a servlet.
I am not sure if I am going on the right track, but am I right thinking that the Web-inf xml file controls what servlets are allowed to be be executed and how regarding securities. So lets say that I wrote a servelet called TEST.html and I put it in the directory $TOM_CAT$/webapps/examples as configured in the server.xml file: Context path="/examples" docBase="webapps/examples" crossContext="false" debug="0" reloadable="true" /Context If I want to the server to recognize this script do I have to put an entry in the web.xml script: servlet servlet-name TEST /servlet-name servlet-class TEST /servlet-class /servlet Anyone is this correct?? And after do I have to compile the web.xml file or will it happen automatically.Please help... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
beginners question
Can anyone help me execute .html servlets on the Tomcat. I tried : bin\tomcat.bat ant -f location/of/the/servlet.html client but I get a message saying that this is not an xml format..Please help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
can anyone help
I am knew at this and can anyone tell me how to execute servlets on Tomcat. Please anyoneSOS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]