Re: (newbie) Why tomcat needs network on startup?
It doesn't need network connectivity (at least not as far as i know). Most developers use it within a localhost setting. If you're on windows and you're getting a prompt about a process wanting to open a port, that is just a network security issue, it doesn't mean tomcat requires internet access. On 4/25/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Why does Tomcat need network connectivity on startup. Can't I use it on a machine that is not connected on the network (localhost)? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Who do I have to pay (and how much) to...
You can use mod_jk (Tomcat connector) with apache to do virtual hosting. As for who to pay? Well the mailing list is for technical help not solicitations. On 3/21/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, Matthew wrote: ...get an answer to the following: For Tomcat 5.5.20, how do I configure virtual hosts using a context.xml file in the META-INF directory (of each domain's .war file) as opposed to having to do the following in server.xml Host name=domain.com appBase= . Context path= docBase=webapps/domain/ /Host You cannot configure virtual hosts in context.xml files. If you want to do this, you'll probably have to write a ton of code to make Tomcat work in a different way and install that into the server's libraries. It's far easier to configure virtual hosts using the configuration the way it was intended. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGASsp9CaO5/Lv0PARArvgAJ4sDL50G/IBoYDoiZ1fP7hgRUU/0QCgmhdU coocpO6K4Vfk9b3z389+zng= =fmuO -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: creating user url...
You can create directories using the java.io package. Unless you're going to store a lot of per company info like images and such, using the getPathInfo is the better solution. Even if you want to store per company data, you can store all such files in one directory with ids stored in a database. So for instance if you want to store logo.png for each company, you'll have a directory called logo and a database table called logo with company id as a key and logo id as another column. Then you can use the logo id as part of the file name. On 3/17/07, kace [EMAIL PROTECTED] wrote: thanks Edmond, ill google for getPathInfo(). Can the directory for each company be created on the fly? Kace -- View this message in context: http://www.nabble.com/creating-user-url...-tf3417316.html#a9528021 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: creating user url...
I have never implemented such a solution but I know a lot of sites have similar setup. There are two ways you could do it, one would be to create a directory for each company and then drop an index.jsp file in there . A second and perhaps better solution would be to get the path info of the request from javax.servlet.http.HttpServletRequest.getPathInfo(). so in essence whenever a request comes to your servlet, getPathInfo would extract the part that has the company name. Google to get further info. On 3/16/07, kace [EMAIL PROTECTED] wrote: Hi fellas, I am looking to develop the following and would be grateful if anyone can offer any assistance as to how I can make it happen - what do i have to read up on etc. ive developed my app in jsf/hibernate and spring and i have this still to work out. I would like to give users access from their own url e.g. www.domain-name.com/~companyname which should be set automatically upon registration (if that is possible). Would be hosting on tomcat. Any advice would be appreciated. thanks kace -- View this message in context: http://www.nabble.com/creating-user-url...-tf3417316.html#a9524122 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Newbie..localhost works but not IP
if you're trying to access tomcat running on your pc via the internet you'll need to open ports on your router. If both PCs are behind the same router then you should be able to type in your IP and get tomcat. In any case, you should try google for help with networking, the mailing list is for tomcat issues. On 3/16/07, anna24 [EMAIL PROTECTED] wrote: Hi I am total tomcat Newbie..I tried a lot to search for an effective solution for this problem but could not find the solution: I have installed Tomcat 6 on my Windows Xp machine. http://localhost:8080/ works. When I enter http://[myIPaddress]:8080/ from my machine this too works. But when I enter http://[myIPaddress]:8080/ from a different machine, I not able to see the Tomcat homepage. Please provide me a few pointers on this issue. Thanks a lot, Anna -- View this message in context: http://www.nabble.com/Newbie..localhost-works-but-not-IP-tf3417698.html#a9525336 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: DWR using WAN vs LAN
You may want to limit your question to one topic at a time. I've read through your post and it is difficult to tell what your real problem is. The networking issue, I assume you've already been informed, doesn't belong to the mailing list. Tomcat/Apache/PHP can all work together depending on how you send up your application. Apache's mod_jk is how you make Apache and tomcat work together. If you create an app that uses both Tomcat(jsp) and PHP then you'll have to manage two separate sessions, though that shouldn't be terribly difficult to do. Tomcat is configured to run on 8080 by default you can change that to 80 by editing the server.xml file. All http traffic that doesn't specify a port automatically go to 80. To access your computer from the Internet you'll need to first open the port on your router or remove the computer you want to access from the router's DMZ (not recommended). Make sure you use your actual IP which you can determine by typing what's my IP on google and following the first link. Hope this helps. On 3/3/07, Wayne Bragg [EMAIL PROTECTED] wrote: Chuck, I can't begin to thank you enough for you reply. I know some of these questions are borderline inappropriate for this mailing-list subject but they, at least loosely, apply. My newbism is defiantly showing. First, the idiot I am I didn't realize port 80 was 80 and 8080 was 8080. I thought they somehow referred to the same port, du! That explains allot of my confusion! With that said What happens if you try http://wan-ip:8080/chat-demo? Without the port number, you're sending the URL to something other than Tomcat that's listening on port 80. this is where the confusion starts. Your telling me to send the URL to http://wan-ip:8080/chat-demo; but then you say you're sending the URL to something other than Tomcat that's listening on port 80 Here I go getting confused again, what is it 80 or 8080? Or was that just a slip on your part? I'm going to assume the latter unless you tell me otherwise. Either way, I get page not found if I use anything other than http://localhost:8080/chat-demo which works perfectly or I can get to it at least run the page with http://wan-ip/chat-demo because I have an Alias /chat-demo in Apache config serving on port 80, but that's when I get the Chat is not defined error. I though maybe my provider was blocking port 8080 so I even tried http://localhost:7077/chat-demo which my router is redirecting to 8080. That is what I have to do for Apache and that's what I was talking about when I said A couple of things worth noting. I'm pretty sure my (cable) access provider is blocking 80 so I am forwarding ext. 7075 ext. = web browser pointing to port 7075 and to int. 80 with Apache still running on 80. int = router redirect to port 80. I was referring to my router redirecting port 7075 to port 80. So if I am understanding this correctly I am not getting through to the Tomcat server from the WAN. I also can't get through to Tomcat using http://computer-name:8080/ I can only get through using localhost:8080. I checked XP firewall and have 7077 port (redirected to 8080) opened. Any idea why I cant get to it? script type='text/javascript' src='/chat-demo/dwr/engine.js'/script script type='text/javascript' src='/chat-demo/dwr/interface/Chat.js'/script script type='text/javascript' src='/chat-demo/dwr/util.js'/script Also, where are these files? They're part of the app, nothing to do with Tomcat itself. I realize that they are part of the app. This question was because I though maybe something to do with the paths to them was causing the error. That's because I am not to familiar (yet) with the file/directory structure regarding Tomcat apps directory and was able to find script type='text/javascript' src='/chat-demo/dwr/engine.js'/script script type='text/javascript' src='/chat-demo/dwr/util.js'/script but not script type='text/javascript' src='/chat-demo/dwr/interface/Chat.js'/script which is why I said If they are in the dwr.jar file then I am beginning to understand the organization except the src='/chat-demo/dwr/interface/Chat.js' file isn't in that jar. If it is in the chat.class file then I think I am really beginning to understand the organization. If this is correct then it still leads me back to I'm not getting through to Tomcat from WAN or for some reason using my computer-name either. My Configuration: Windows XP Pro devside.net Web[Developer] Server Suite 1.94 standard installation ASP,MYSQL,PHP (not cgi) and Tomcat5 All are working correctly. If that were really true, would you be asking questions here? What I meant is they are all working correctly independently so to speak. They may even be working perfectly but not configured correctly to allow PHP, MySQL, ASP and Java to work on the same page at the same time which is what I am ultimately trying to accomplish. Is it your router doing the forwarding? If so, external users will need to append :7075 to the host name or IP
Re: Get rid of 8080 port in Tomcat 3.3
80 is a privileged port on *nix systems, you'll need to run tomcat as root (generally not recommended). May I ask why you're still running tomcat circa version 3? On 2/21/07, Frank Nguyen [EMAIL PROTECTED] wrote: Hi, We're still running 3.3.1 – We'd like to get rid of specifying the port 8080 in the http request like HYPERLINK http://www.something.com:8080/http://www.something.com:8080 and have it default to 80 (HYPERLINK http://www.somehting.com/; http://www.somehting.com only) but could not find any way. I tried to define port=80 in server.xml but tomcat threw exceptions. If you know a way, could you help ? Thanks in advance, Frank Nguyen -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 5:06 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date: 2/17/2007 5:06 PM -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: shut out IP-adresses / subnets
You can implement a filter to check all request to your app before processing. But if you don't want an IP address to access your app then I assume you don't want that IP address accessing anything on the OS you're running. If you have access to the OS running your app in this case it better to use a firewall like iptables to block the forbidden addresses. On 1/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello list, I'm unsing Tomcat 5.5 in a intranet environment. Is it possible to shut out special IP adresses or subnets by Tomcat configuration? A Address specified on this 'blacklist' should not get ANY response from Tomcat. Is this possible and if, how? Thanks, Jan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Garbace Collection executes 1GB but HEAP Size at 1.5GB!
use visualGC, you'll see that there are various generations of objects depending on the expected lifetime of those objects. The GC would run on those regularly even if all your allocated memory hasn't been utilized. If you have an app that uses lots of memory or that has a memory leak (which I have had to debug in the past and it is no fun), then you'll see the GC run when the tenure space is full, the tenure space GCing represents major GC cycle. On 1/10/07, Suresh babu [EMAIL PROTECTED] wrote: Hi, Just for your information .. Memmory is divided in young and old generation as object life increasing it will occupy space i old generation, Please refer SUN JVM documentation. GC will keep happening once the memmory (Young generation )reached threshold. Young generation again divided in to survivor 0 and survivor 1 spaces. When a object is created it keeps allocating in survivor spaces alternatively. Two types of GC: Mini GC : Cleaning only with in young generation Full GC: If all objects present in young generation are alive so cleaning happens in old generation hence will become FUll GC Following is the info I have sent a mail to some person (It may be usefull) --- Setting heap size to -Xms256 -Xmx1024 will allocate memmory intially to 256 MB and keeps expanding as allocating more objects up to 1024. My recomendation to you is as mentioned in previos mail set heap size to -Xms1536 -Xmx1536 and verify it. But Do not increase heap size blindly to greater values which may lead to performance issue(Pause times may become more to clean GC). try the heap settings and let me know, If still problem is there just send the verbose output and log file. --- On 1/10/07, starki78 [EMAIL PROTECTED] wrote: Hi I'm profiling my application with -verboseGC. My maximum heap-size is XMS is 1.5GB but the garbage collection always is executed when about 1GB is reached. Why is it so early? Is there anything to control this? I'm using Sun 1.4.2 Thanks and nice greetings Starki -- Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada10gen07 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Suresh Babu, Software Engineer, Computer Associates-India -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: How to forcibly close abandoned database connections?
It is possible that whatever procedure is responsible for checking for abandoned connections only does so when there is actual need for a connection, similar to how a garbage collector works to reclaim memory. If there is no seeming stress on the connection resources then it would make sense not to jump the gun to look for and recycle abandoned connections. Of course I don't know if that is what is happening, but I suspect it might be. On 1/10/07, David Uctaa [EMAIL PROTECTED] wrote: Perhaps I was unclear what it is I'm trying to do. I have a connection pool set up under Tomcat 5.5, connecting to DB2 on an iSeries box using Tomcat's DBCP. It is set up for 30 connections. I am using Lambda Probe (a great open source Tomcat monitoring app) to monitor the datasources. It is showing, let's say, that there are a max of 30 connections allowed, that 11 have been established, and 9 are busy. I know that these 9 are due to a connection pool leak bug that was corrected (but not yet deployed), so even though the application has gone idle and no one is using it, the connections remain busy indefinitely. I have enabled removeAbandoned in my server.xml, but according to the Tomcat docs, abandoned connections are only recycled if there is a need for them, due to the number of available datasources getting low. The number of available datasources are not yet low, so these orphaned connections are still being reported as busy. I'm a little bit anal with regard to keeping things kinda clean on the server, so I would like to have these abandoned connections no longer reported as busy once they are orphaned. Is there a way to find and recycle abandoned connections forcibly? Thanks, David On 1/8/07, David Uctaa [EMAIL PROTECTED] wrote: Tomcat provides the removeAbandoned and removeAbandonedTimeout parameters when setting up data sources in server.xml. But according to the documentation I've read, abandoned connections only get closed and recycled when available connections run low and new connections are requested. Is there a way for me to forcibly close/release abandoned connections on the server from a privileged application running on the same server? BTW, I'm running Tomcat 5.5 on a Windows 2003 box, running against DB2 on an iSeries box (jt400 for the JDBC driver), using Tomcat's DBCP for the pooling. Thanks, David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Standards Complaint Browser Campaign
Web developers aren't suppose to be supporting browsers!! On 1/8/07, Nelson, Tracy M. [EMAIL PROTECTED] wrote: | From: Pierre Goupil [mailto:[EMAIL PROTECTED] | Sent: Saturday, 06 January, 2007 10:18 | | Does anyone know about Tomcat's generated HTML standards compliance ? In | developpement, I'm using Firefox Konqueror, but in production they will | be | using IE, so... Can it be that I run into problems ? Um, is there some reason you aren't using the same browser in development that they'll be using in production? If not, you're just opening yourself up for a world of hurt. I would think it would be difficult to explain to your boss why you have to do some emergency bug-fixing at the 11th hour because you didn't test with the same browser that you *knew* they'd be using in production. Don't get me wrong, I use FF for all my development, but as soon as I finish a feature the first thing I do is make sure it works correctly on IE. There's just no excuse for not supporting the browser that dominates the market (even if you have to use hacks or exceptions). - The information contained in this message is confidential proprietary property of Nelnet, Inc. and its affiliated companies (Nelnet) and is intended for the recipient only. Any reproduction, forwarding, or copying without the express permission of Nelnet is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to this e-mail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Standards Complaint Browser Campaign
Hi Guys Sorry about the off-topic posting but I thought the mailing list consist of the audience for this campaign. A campaign has been launch to try to encourage web developers and webmasters from using IE hacks to obscure the browsers shortcomings. Please read the appeal from the address below and pass the message along to other mailing lists you may be a subscriber to, if you wish to help. http://www.nomoreiehacks.org/ -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Moving Tomcat
First I'll suggest you backup your entire server, it is possible for instance if your server is running Linux that the webapps folder only contain the links to the actual webapp folders residing somewhere else on the filesystem..So again BACKUP before doing anything. About a month ago someone on this mailing list in your position deleted stuff on a server they were managing, I have the feeling they don't have a job anymore. On 1/3/07, Steve Ingraham [EMAIL PROTECTED] wrote: I have a website running with jakarta-tomcat-5.5.9. The server this website resides on is going to have to be rebuilt so I am needing to move everything off of it onto another server. I know very little about tomcat, ok, I really know nothing about tomcat. This website was created before I started managing this network so I was not involved in its construction. My question is this. I believe that all of the content for the webpage(s) reside in /usr/local/src/jakarta-tomcat-5.5.9/webapps. If I copy everything from /usr/local/src from the old server onto the new server will this capture everything needed for the website? Is there anything else I need to know about or that needs moved in order for the website to be accessible from the new server? Any information would be appreciated. Steve -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Moving Tomcat
Hmm Interesting, the person was from Oklahoma Court, is that you again? On 1/3/07, EDMOND KEMOKAI [EMAIL PROTECTED] wrote: First I'll suggest you backup your entire server, it is possible for instance if your server is running Linux that the webapps folder only contain the links to the actual webapp folders residing somewhere else on the filesystem..So again BACKUP before doing anything. About a month ago someone on this mailing list in your position deleted stuff on a server they were managing, I have the feeling they don't have a job anymore. On 1/3/07, Steve Ingraham [EMAIL PROTECTED] wrote: I have a website running with jakarta-tomcat-5.5.9. The server this website resides on is going to have to be rebuilt so I am needing to move everything off of it onto another server. I know very little about tomcat, ok, I really know nothing about tomcat. This website was created before I started managing this network so I was not involved in its construction. My question is this. I believe that all of the content for the webpage(s) reside in /usr/local/src/jakarta-tomcat-5.5.9 /webapps. If I copy everything from /usr/local/src from the old server onto the new server will this capture everything needed for the website? Is there anything else I need to know about or that needs moved in order for the website to be accessible from the new server? Any information would be appreciated. Steve -- talk trash and carry a small stick. PAUL KRUGMAN (NYT) -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Moving Tomcat
If your running fedora/redhat, it usually creates many symlinks and places the actual files into different folders. The only reason this is done I think is for flexibility. For instance with the server running my site now, I have my webapp in a different home directory and created a symlink called ROOT to point to my webapp. This allows my app to become the deault app without having to do anything else. If you have ssh server running, I'll be willing to login to your machine to provide some guidiance. Currently I use not much more than but nautilus to administer my server. On 1/3/07, Steve Ingraham [EMAIL PROTECTED] wrote: . I am looking to copy everything in the /usr/local/src directory. So far I have not been able to see where anything associated with our website resides outside the /src directory. So, if that turns out to be the case could I be confident that everything for the website resides inside the /usr/local/src directory? The running instance of Tomcat indicates that it's in /usr/local/tomcat, not /usr/local/src/... -Dcatalina.home=/usr/local/tomcat There is a link in /usr/local for tomcat that directs to /usr/local/src/jakarta-tomcat-5.5.9. Is it important to have the tomcat link set up this same way on the new server? Is there a specific reason why it would have been set up this way? Mikolaj also mentioned JRE/JDK. Hassan mentioned that there could be a startup script in /etc/init.d that may nave information on where the JRE/JDK is. There is not a startup script. I have to manually startup tomcat whenever this server is rebooted. That's, mmm, wierd. And awkward. :-) Is that a policy thing, or just something no one's ever fixed? It is not a policy issue. I believe it is something no one setup. Since I am the local tomcat novice I have not done anything about it either. I just have to remember to manually start tomcat when I reboot the server (which I have had occasion to forget to do before). What is the /usr/local/java/. . . referring to? Is this needed for the website? Absolutely; that's the JDK referred to above. `java -version` will tell you which one; if it's 1.5.something you may want to just download and install the latest 1.5.x, rather than just copy. Ok, well that resides in /usr/java/jdk-1.5.0. Where can I download a new version? Is the download straightforward for a novice like me? Or do I need to read up on a thing or two before downloading? The machine I am attempting to move this to is running CentOS 4.0. Thanks, Steve -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Moving Tomcat
If you have the second server setup then you can install tomcat and copy the webapps folder over and see what happens. Once you start getting errors from the new server then you can troubleshoot until everything is fixed. It will be difficult to know if everything will work without testing. So I'll suggest to build the new server first, unless of course you'll be using the same hardware then you can't do that. On 1/3/07, Steve Ingraham [EMAIL PROTECTED] wrote: Here is the website in question: http://www.okcca.net/online/ You can't tell where things are by looking from the outside; the URLs used to access the web site can be easily mapped to various locations in the file system by servlet-mappings, appBase and docBase attributes, filters, symbolic links, etc. A well-designed and well-managed web site will have such things documented, but unfortunately many just seem to evolve. Ok, I understand what you are saying about not seeing the location from the outside. However, am I wrong in thinking that I can track down the location if I know where everything is residing? For example, if I click on the judges for retention link on the left side of the main webpage the browser is directed to an address of: http://www.okcca.net/online/JudgeVote.2006.jsp I know that the online directory resides in the /usr/local/src/jakarta-tomcat-5.5.9/webapps/ directory and therefore the JudgeVote.2006.jsp file should be in that online directory. When I navigate to that directory on the server I can see that file. Therefore, I have been looking at each page/link in this manner. I look at the address location in the web browser and then navigating to the appropriate directory in the /usr/local/src/. . . directory I believe it is on the server to verify that the file in question is there. So far this has worked in showing me the exact directory location for each page/link I have looked at. Is this a legitimate way to go about this or am I going to overlook something in using this method? As far as your comment about documentation, I am afraid I have not come across any documentation detailing any of the website design. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Not quite a tomcat question
Happy New Year All. Does anyone use sessions to temporarily hold confirmation codes for user registrations? I have a setup where when the user registers a random confirmation code is generated and appended to a url which is emailed to the user. The user's registration data is stored in a session with the confirmation code as the key. When they click the confirmation link, the code is used to retrieve the registration information and the registration is done. Some users are having trouble because it seems they're encountering invalidated sessions. I know if the registrations is done in one browser and the link (outlook will open IE) opens up a different browser that would lead to the creation of a different session which obviously wouldn't have the registration data. I have seen implementations that enter the confirmation directly into the database but I don't want to do that since it would mean writing more code to check who's account is activated and who's hasn't, and also might lead to garbage in the database of users who never activated their accounts...Any suggestions? -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Help Me on Servlet in Tomcat 5.0
Try this link, they have some good tutorials: http://www.coreservlets.com/Apache-Tomcat-Tutorial/ On 12/28/06, athula bogoda [EMAIL PROTECTED] wrote: Hi All, Can any body give me guidence to run my first servlet on Tomcat 5.0. This is my file... import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType(text/html); PrintWriter out = response.getWriter(); out.println(html); out.println(head); out.println(titleHello World!/title); out.println(/head); out.println(body); out.println(h1Hello World!/h1); out.println(/body); out.println(/html); } } I compiled it(windows environment). But confused where should i should put it and run on my local machine typing http://localhost/ I go through several tutorials.But could not able to success.If any one can help me it would be agreat help. Thanks. Athula. Send instant messages to your online friends http://uk.messenger.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: 404 error when a newly created file is requested
I ran into a similar problem in trying to serve static content with tomcat, tomcat had trouble retrieving dynamically created content unless it was already in the webapp at start, at least that was my experience. Since you're trying to create a jsp, why don't you create one jsp and pass it your preview data, then return that to the user. Even if tomcat could serve newly created jsp, i don't see why you'll create a .jsp page every time the user hits a preview button, one jsp should do. Also you may want to look into autoDeploy etc.. config properties, there are options you can enable to make tomcat notice changes in servlet code (including jsp), I am not sure they apply to newly added JSPs. On 12/15/06, Carl [EMAIL PROTECTED] wrote: Environment: Tomcat 5.5.17, Windows XP Background: I have a jsp page that contains a javascript rich text editor that I use to create snippets of HTML code that are stored in a database and later displayed on other pages. Since the snippets can contain some custom tags, I have a 'Preview' button that reads the snippet directly from the editor, reads a 'preview' jsp file from the file system, places the snippet in the correct place in the file, writes the 'preview' file with the snippet to a temporary file and opens a new window (using javascript) which requests the temporary page from Tomcat. Problem: I can see the newly created temporary file in the file system. I can open it with an editor and it is all good. But, Tomcat returns a 404 error for approximately one minute and then will serve the page upon hitting only the refresh. Analysis: I suspect the system is holding onto the newly written file until it hits some timeout but I have tried everything I can think of to make certain the file has been 'released'. The relevent parts of the copy process: try { File tempFile = File.createTempFile(preview, .jsp, new File(C:/projects/EtrakWebApp/web/jsp/tempfiles)); // read the preview jsp FileWriter fw = new FileWriter(tempFile); File infile = new File(destinationDir+preview.jsp); if( infile.exists() ) { FileReader fr = new FileReader(infile); BufferedReader in = new BufferedReader(fr); while(true) { String line = in.readLine(); if( line==null ) break; System.out.println(line +line ); // insert the text if( line.contains(insert_preview_text) ) { fw.write(previewText+\n); } else { fw.write(line+\n); } } fr.close(); in.close(); } fw.flush(); fw.close(); fw = null; } catch (FileNotFoundException fnf) { fnf.printStackTrace(); } catch (Exception ex) { ex.printStackTrace(); } return returnFileName; Anyone have any ideas? TIA, Carl Kabbe No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.19/587 - Release Date: 12/14/2006 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Servlet with POST Request
Assuming a client would be requesting data via your servlet, I don't believe there is a limit. Your sevlet calls PrintWriter.write(..) and that implements buffering that would flush onces the buffer is full. On 12/15/06, Scott Carr [EMAIL PROTECTED] wrote: Does a servlet require the use of a Content-Length for the Reader to be populated? I trying to use Tomcat instead of writing my own Socket Server. I have a set of lines that I am trying to parse, but I don't have any idea how much is going to be sent up front. It may be 1000Kb, or it may be several Megabytes worth of information, and I want to read each line as they come in, and handle the request on a line by line basis. Any ideas on this? ... Should I write my own socket server? Thanks -- Scott Carr OpenOffice.org Documentation Co-Lead http://documentation.openoffice.org - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Host element question
How do expect that it will resolve the name dev without DNS? you can try using an IP address if you don't have DNS server. On 12/13/06, Jim Reynolds [EMAIL PROTECTED] wrote: Hello, Every new install of Tomcat always has a Host name of localhost and that is good. If I do not have a DNS entry, can I create another Host and use a name of something bogus? Something for me to play with on my local PC? I tried something like this: Host name=localhost appBase=webapps /Host Host name=dev debug=0 appBase=devme unpackWARs=true autoDeploy=true Context path= docBase= debug=5 reloadable=true crossContext=true / /Host And if I hit http://localhost all is happy But if I hit http://dev nothing pops up? Anyone? Thanks, - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Host element question
nice to know that. On 12/13/06, Hassan Schroeder [EMAIL PROTECTED] wrote: On 12/13/06, EDMOND KEMOKAI [EMAIL PROTECTED] wrote: How do expect that it will resolve the name dev without DNS? DNS is not the only name resolution mechanism :-) For desktop development use, just put all the alias hostnames you want in your own /etc/hosts file (or for those stuck on Windows, in something like c:\WINDOWS\system32\drrivers\etc\hosts). An easy and convenient way to separate projects that each need (or expect) their own ROOT context. FWIW, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Tomcat errors
javax.servlet.ServletException: ServletException in '/caser/extension/View.jsp': No getter method for property attributes.datefield of bean oneCol The above error means the bean oneCol doesn't have a getta method. you have to declare a method of the sort getDateFieldif that problem was not occurring before you made your move, then most likely you have mixed up the versions of jar files or class filesUnfortunately it looks like you have moved al ot of stuff so it is probably to possible to revert the changes. Are you using struts? check View.jsp and make the bean oneCol has the appropriate getDatefield... On 12/11/06, Steve Ingraham [EMAIL PROTECTED] wrote: I need some assistance with a Tomcat application problem. I have a MySQL database that is accessed by users via web browser using Apache-Tomcat 5.5.15. Our system was designed and implemented specific to our court by a person who is no longer working here. Today Tomcat was failing when users attempted to log onto the database to input new data. As I began troubleshooting the problem I discovered that /usr was 100% full (13 gigs). I began looking at ways I can move files off of /usr and did move several logs from /usr/local/src/apache-tomcat-5.5.15/webapps/occa/WEB-INF/logs. I also moved some files from /usr/src that appeared to be zip files. There was a directory /usr/local/src that had a file titled occa.war that I also moved off of the /usr/ directory. This is when I believe my problems started. After I moved that file no one could access any data on the website even though we could access the database pages when we tried to view a case an error message returned stating file not found. I then moved occa.war back to the /usr/local/src directory and we could access the data again. However, now there are several different types of errors showing up when user try to view or input data. There are multiple error messages that are showing up depending on what the individual user was attempting to do. I know I am probably being much too vague in my explanations but I don't know enough about Tomcat to detail everything. I would like to ask that if anyone can offer help I would welcome any offers for assistance. If I can explain in more detail please let me know what information I need to provide. Below is one of the messages that is displayed when a user attempts to view one of the web pages. HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: ServletException in '/caser/extension/View.jsp': No getter method for property attributes.datefield of bean oneCol org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont extImpl.java:848) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:781) org.apache.jsp.caser.common.templates.docketLayout_jsp._jspService(org.a pache.jsp.caser.common.templates.docketLayout_jsp:77) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:322) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.j ava:39) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:1063) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProc essor.java:263) org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(Til esRequestProcessor.java:239) org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Tiles RequestProcessor.java:302) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 229) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.j ava:122) com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter. java:118) com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.j ava:52) root cause javax.servlet.jsp.JspException: ServletException in '/caser/extension/View.jsp': No getter method for property attributes.datefield of bean oneCol org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTa g.java:923) org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462) org.apache.jsp.caser.common.templates.docketLayout_jsp._jspx_meth_tiles_
Re: Tomcat errors
For one, you playing with tomcat so I'll presume you're familiar with JSP/Java/Servlet, your problem isn't tomcat, you Veiw.jsp is using an object (oneCol) which is missing a getta method that is used for introspection. Maybe there is a tag in the page that implicitly refereces the datefield property, you need to find that reference and either find the right class/jar file or recompile the oneCol bean class. Again this is a java/jsp/servlet/struts programming issue, not tomcat. On 12/11/06, Steve Ingraham [EMAIL PROTECTED] wrote: This error was not occurring before. I am afraid I am not familiar with Tomcat enough to know the answers to your questions. How do I check View.jsp? I have been trying to revert the changes back by placing the files I moved back to where I thought they belonged. Whatever I am attempting to move back it is having no effect as I still am receiving the errors I mentioned before. I may have these files in the wrong locations. Is there a way that I can know which files should go where? As I know very little about Tomcat my fear is that I may be causing more damage if I make any other attempts to fix my mistakes. I am not sure now how I caused the damage already done nor how to correct it. Steve Ingraham Director of Information Services Oklahoma Court of Criminal Appeals [EMAIL PROTECTED] 405 522-5343 -Original Message- From: EDMOND KEMOKAI [mailto:[EMAIL PROTECTED] Sent: Monday, December 11, 2006 3:30 PM To: Tomcat Users List Subject: Re: Tomcat errors javax.servlet.ServletException: ServletException in '/caser/extension/View.jsp': No getter method for property attributes.datefield of bean oneCol The above error means the bean oneCol doesn't have a getta method. you have to declare a method of the sort getDateFieldif that problem was not occurring before you made your move, then most likely you have mixed up the versions of jar files or class filesUnfortunately it looks like you have moved al ot of stuff so it is probably to possible to revert the changes. Are you using struts? check View.jsp and make the bean oneCol has the appropriate getDatefield... On 12/11/06, Steve Ingraham [EMAIL PROTECTED] wrote: I need some assistance with a Tomcat application problem. I have a MySQL database that is accessed by users via web browser using Apache-Tomcat 5.5.15. Our system was designed and implemented specific to our court by a person who is no longer working here. Today Tomcat was failing when users attempted to log onto the database to input new data. As I began troubleshooting the problem I discovered that /usr was 100% full (13 gigs). I began looking at ways I can move files off of /usr and did move several logs from /usr/local/src/apache-tomcat-5.5.15/webapps/occa/WEB-INF/logs. I also moved some files from /usr/src that appeared to be zip files. There was a directory /usr/local/src that had a file titled occa.war that I also moved off of the /usr/ directory. This is when I believe my problems started. After I moved that file no one could access any data on the website even though we could access the database pages when we tried to view a case an error message returned stating file not found. I then moved occa.war back to the /usr/local/src directory and we could access the data again. However, now there are several different types of errors showing up when user try to view or input data. There are multiple error messages that are showing up depending on what the individual user was attempting to do. I know I am probably being much too vague in my explanations but I don't know enough about Tomcat to detail everything. I would like to ask that if anyone can offer help I would welcome any offers for assistance. If I can explain in more detail please let me know what information I need to provide. Below is one of the messages that is displayed when a user attempts to view one of the web pages. HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: ServletException in '/caser/extension/View.jsp': No getter method for property attributes.datefield of bean oneCol org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCo nt extImpl.java:848) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCont ex tImpl.java:781) org.apache.jsp.caser.common.templates.docketLayout_jsp._jspService(org .a pache.jsp.caser.common.templates.docketLayout_jsp:77) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper. ja va:322) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:29 1) org.apache.jasper.servlet.JspServlet.service
Re: Tomcat errors
whatever files you removed from : /usr/local/src/apache-tomcat-5.5.15 /webapps you need to return... On 12/11/06, Steve Ingraham [EMAIL PROTECTED] wrote: Thank you for your reply. I am afraid I am not familiar with JSP/Java/Servlet's at all. I was playing with it only in the context that I have a Linux RedHat server that had a /usr/ directory that was full. This caused a failure when our users attempted to access our database via their web browsers. In my exploration of the problem I discovered /usr at 100% on the server. So I attempted to free up space by moving some log files from the apache-tomcat/logs directory. I also attempted to move some files from /usr/src and from /usr/local/src/apache-tomcat-5.5.15/webapps. One of those files appears to have caused a separate failure of our web access to certain aspects of the database. My appologies if I am asking the wrong group about this problem. If there is any information anyone has concerning java I would welcome your input. If you can direct me to a java list I will ask there as well. Steve Ingraham Director of Information Services Oklahoma Court of Criminal Appeals [EMAIL PROTECTED] 405 522-5343 -Original Message- From: EDMOND KEMOKAI [mailto:[EMAIL PROTECTED] Sent: Monday, December 11, 2006 3:54 PM To: Tomcat Users List Subject: Re: Tomcat errors For one, you playing with tomcat so I'll presume you're familiar with JSP/Java/Servlet, your problem isn't tomcat, you Veiw.jsp is using an object (oneCol) which is missing a getta method that is used for introspection. Maybe there is a tag in the page that implicitly refereces the datefield property, you need to find that reference and either find the right class/jar file or recompile the oneCol bean class. Again this is a java/jsp/servlet/struts programming issue, not tomcat. On 12/11/06, Steve Ingraham [EMAIL PROTECTED] wrote: This error was not occurring before. I am afraid I am not familiar with Tomcat enough to know the answers to your questions. How do I check View.jsp? I have been trying to revert the changes back by placing the files I moved back to where I thought they belonged. Whatever I am attempting to move back it is having no effect as I still am receiving the errors I mentioned before. I may have these files in the wrong locations. Is there a way that I can know which files should go where? As I know very little about Tomcat my fear is that I may be causing more damage if I make any other attempts to fix my mistakes. I am not sure now how I caused the damage already done nor how to correct it. Steve Ingraham Director of Information Services Oklahoma Court of Criminal Appeals [EMAIL PROTECTED] 405 522-5343 -Original Message- From: EDMOND KEMOKAI [mailto:[EMAIL PROTECTED] Sent: Monday, December 11, 2006 3:30 PM To: Tomcat Users List Subject: Re: Tomcat errors javax.servlet.ServletException: ServletException in '/caser/extension/View.jsp': No getter method for property attributes.datefield of bean oneCol The above error means the bean oneCol doesn't have a getta method. you have to declare a method of the sort getDateFieldif that problem was not occurring before you made your move, then most likely you have mixed up the versions of jar files or class filesUnfortunately it looks like you have moved al ot of stuff so it is probably to possible to revert the changes. Are you using struts? check View.jsp and make the bean oneCol has the appropriate getDatefield... On 12/11/06, Steve Ingraham [EMAIL PROTECTED] wrote: I need some assistance with a Tomcat application problem. I have a MySQL database that is accessed by users via web browser using Apache-Tomcat 5.5.15. Our system was designed and implemented specific to our court by a person who is no longer working here. Today Tomcat was failing when users attempted to log onto the database to input new data. As I began troubleshooting the problem I discovered that /usr was 100% full (13 gigs). I began looking at ways I can move files off of /usr and did move several logs from /usr/local/src/apache-tomcat-5.5.15/webapps/occa/WEB-INF/logs. I also moved some files from /usr/src that appeared to be zip files. There was a directory /usr/local/src that had a file titled occa.war that I also moved off of the /usr/ directory. This is when I believe my problems started. After I moved that file no one could access any data on the website even though we could access the database pages when we tried to view a case an error message returned stating file not found. I then moved occa.war back to the /usr/local/src directory and we could access the data again. However, now there are several different types of errors showing up when user try to view or input data. There are multiple error messages that are showing up depending on what the individual user was attempting to do. I know I am probably being much
Re: tomcat w/o commercial crap
tomcat is from www.apache.org, I think sun donated it a while back. You need java to run tomcat, java is from sun but I don't see what problem that would pose. Alternately you could use GNU Java. On 12/5/06, Enrico Weigelt [EMAIL PROTECTED] wrote: Hi folks, is there any chance to get tomcat working w/o sun's commercial crap ? I'm working on gentoo and can't tomcat it w/o going to the sun shop :(( cu -- - Enrico Weigelt== metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: [EMAIL PROTECTED] cellphone: +49 174 7066481 - -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- - - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: jsp optimization for db driver load and connection
I doubt there is connection pooling when you use the driver directly. There is connection pulling if you use java...DataSource I think. If you store the connection object in session then I suppose you could reuse it. Still using a DataSource implementation that does connection pooling is better. Check out the tomcat doc for how to specify a DataSource resource. On 12/4/06, IT Desk [EMAIL PROTECTED] wrote: This isn't Tomcat specific but general to any jsp container and its jvm. I am working on a site where almost everything is done through the jsp page plus one main java class to store state data. The site's jsp page may do up to 7 queries on the database. On each query, the statements are these: Driver DriverDB = (Driver)Class.forName(db_DRIVER).newInstance(); Connection ConnDB = DriverManager.getConnection(db_STRING,db_USERNAME,db_PASSWORD); PreparedStatement StatementDB = ConnDB.prepareStatement(SELECT * from table); ResultSet resultDB = StatementDB.executeQuery(); My 2 questions are: Does the forName call to load the driver get optimized out? Clearly the driver need only load once. Does the getConnection reuse the same connection that was done in the previous call on the same jsp page? There are some performance problems and I'm wondering if I should try to clean the code up or if the jvm does it for me through optimization. It's running on Tomcat 5.5.20 and JVM 5.x. The client won't pay for any major redesign so I'm looking for something small that could make a big impact. Thanks for any insight. Coral - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: JSP alternative to ASP.NET
You could try Sun's Java Studio Creator, it does have features such drag drop HTML control, I am not sure it has as much control functionality as ASP.NET. I'll personally stay away from that stuff. Java Server Faces I think is also related to that. On 11/28/06, Dima Retov [EMAIL PROTECTED] wrote: Is there alternative to ASP.NET/Visual Studio What I mean is there is something good as ASP.NET not just set of controls. RAD tools like Visual Studio. May be commercial. -- Best regards, Dima mailto:[EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: :8080 problem
probably need to change the server.xml to listen on port 80. On 11/28/06, Janet Ciavarelli [EMAIL PROTECTED] wrote: Hello, I am afraid I don't know much about Tomcat but am trying to get up to speed as quickly as possible. I upgraded the server with ColdFusion MX 7.0.1, and now one of our webapps has stopped working. The following URL used to work before the upgrade: http://webserver.kamloops.ca/imf/sites/DataDownload/disclaimer.html Now it only works if I add in :8080 to the URL as follows: http://webserver.kamloops.ca:8080/imf/sites/DataDownload/disclaimer.html I really don't want to have to ask our webmaster to add in :8080 to all the links. I believe it is some sort of Tomcat issue. But I'm not sure where to start to resolve this problem. If anyone could point me in the right direction, I would really appreciate that. Janet -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: No Start/Stop Options under Start/Programs Apache Tomcat 5.5
I think you need to run the start.bat and stop.bat scripts, they should be somewhere in your install dir. On 11/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have installed Tomcat 5.5 but I do not have any Start or Stop options under Start/Programs Apache Tomcat 5.5 (see screenshot below). Any help would be greatly appreciated. Thanks! Christine A. Avrin Information Technology InterBay Funding, LLC Office: (215) 793-8835 Fax: (305) 817-5221 Change the way you look at things, and the things you look at will change -Dr. Wayne Dyer -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Tomcat start problem in NetBeans
Using CATALINA_BASE: /Users/kanika/.netbeans/5.0/jakarta- tomcat-5.5.9_base Using CATALINA_HOME: /Applications/NetBeans.app/Contents/ Resources/NetBeans/enterprise2/jakarta-tomcat-5.5.9 Using CATALINA_TMPDIR: /Users/kanika/.netbeans/5.0/jakarta- tomcat-5.5.9_base/temp Using JRE_HOME: /Library/Java/Home Listening for transport dt_socket at address: 11555 Nov 13, 2006 12:46:30 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8084 Nov 13, 2006 12:46:30 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 846 ms Nov 13, 2006 12:46:30 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Nov 13, 2006 12:46:30 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.9 Nov 13, 2006 12:46:30 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Nov 13, 2006 12:46:31 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /Users/kanika/ research work/evm/build/web does not exist or is not a readable directory Above errors would seem to indicate a problem with your environment settings. It is saying there is something missing, check the value of the environment variables and make sure the directories they're point to do in fact exist. On 11/13/06, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: kanika thapar [mailto:[EMAIL PROTECTED] Subject: Tomcat start problem in NetBeans Here are the tomcat logs which mainly state error starting static resources Any chance you're not closing files and then running out of file descriptors? This usually results in an OOME, but there may be other manifestations. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Tomcat start problem in NetBeans
my mistake, the error isn't on the environment variables. : java.lang.IllegalArgumentException: Document base /Users/kanika/ research work/evm/build/web does not exist or is not a readable directory You could also try to do a clean build in netbeans, sometimes if you make changes and just compile or do incremental builds you might get problems like this.This is a response to the original poster by the way. On 11/13/06, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: EDMOND KEMOKAI [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat start problem in NetBeans Using CATALINA_BASE: /Users/kanika/.netbeans/5.0/ jakarta-tomcat-5.5.9_base Using CATALINA_HOME: /Applications/NetBeans.app/Contents/ Resources/NetBeans/enterprise2/jakarta-tomcat-5.5.9 Using CATALINA_TMPDIR: /Users/kanika/.netbeans/5.0/ jakarta-tomcat-5.5.9_base/temp Using JRE_HOME: /Library/Java/Home Above errors would seem to indicate a problem with your environment settings. I'm curious - what led you to that conclusion? All of the environment variable values seem to be reasonable, especially since it runs quite happily the first 30-40 times. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: forced to constantly restart Tomcat
If you're getting a connection refused error, it may be that you're using the wrong local host IP address. check the sys/host file, it may have an entry in there that looks like this: your_user_name 127.0.1.1 That would indicate the localhost for your user account is 127.0.1.1 instead of 127.0.0.1 . On 11/2/06, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Tuomas [mailto:[EMAIL PROTECTED] Subject: RE: forced to constantly restart Tomcat I didn't find anything special in the localhost file. The catalina files are more likely to have something of interest. In particular, look during the time period right after you make the browser request. See if anything like these messages is in there: Nov 2, 2006 1:00:42 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Pausing Coyote HTTP/1.1 on http-80 Nov 2, 2006 1:00:43 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Stopping service Catalina Nov 2, 2006 1:00:44 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Stopping Coyote HTTP/1.1 on http-80 If so, whatever caused Tomcat to terminate (assuming it did) may be recorded just in front of them. Could this restarting obligation have something to do with permissions etc? Not likely, but it wouldn't hurt to verify that everything in the Tomcat directory tree is owned by whatever userid you're running Tomcat under (presumably your own), and there are owner write permissions on all directories. Why me? ;-) Why not? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: forced to constantly restart Tomcat
Is there a reason you can't use something like netbeans? which comes bundled with tomcat, that way your don't have to fiddle with the settings. Looks like you may be starting multiple instances of tomcat and the port is already in use. On 11/2/06, Tuomas [EMAIL PROTECTED] wrote: The catalina files are more likely to have something of interest. In particular, look during the time period right after you make the browser request. See if anything like these messages is in there: Here is it. I cannot decipher it. Sorry for the lengthy quotation. Nov 2, 2006 9:27:42 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5679 ms Nov 2, 2006 9:27:42 PM org.apache.catalina.core.StandardServer await SEVERE: StandardServer.await: create[8005]: java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.init(ServerSocket.java:185) at org.apache.catalina.core.StandardServer.await( StandardServer.java:372) at org.apache.catalina.startup.Catalina.await(Catalina.java:615) at org.apache.catalina.startup.Catalina.start(Catalina.java:575) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Nov 2, 2006 9:27:42 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-80 Nov 2, 2006 9:27:49 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/java/jdk1.5.0_09/jre/lib/i386/client:/usr/local/java/jdk1.5.0_09/jre/lib/i386:/usr/local/java/jdk1.5.0_09/jre/../lib/i386 Nov 2, 2006 9:27:49 PM org.apache.coyote.http11.Http11BaseProtocol init SEVERE: Error initializing endpoint java.net.BindException: Permission denied:80 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint( PoolTcpEndpoint.java:297) at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java :138) at org.apache.catalina.connector.Connector.initialize( Connector.java:1016) at org.apache.catalina.core.StandardService.initialize(StandardService.java :580) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java :791) at org.apache.catalina.startup.Catalina.load(Catalina.java:503) at org.apache.catalina.startup.Catalina.load(Catalina.java:523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load SEVERE: Catalina.start LifecycleException: Protocol handler initialization failed: java.net.BindException: Permission denied:80 at org.apache.catalina.connector.Connector.initialize( Connector.java:1018) at org.apache.catalina.core.StandardService.initialize(StandardService.java :580) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java :791) at org.apache.catalina.startup.Catalina.load(Catalina.java:503) at org.apache.catalina.startup.Catalina.load(Catalina.java:523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 3235 ms Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.20 Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Nov 2, 2006 9:27:54 PM
Re: Very basic web server hosting question
CANADAFAST INC. who ever you're, getting obnoxious isn't going to get your issue resolved. As was pointed out by the previous responder, your problem isn't a Tomcat one, this is a Tomcat mailing list. If you know what you're doing you should no trouble accomplishing your task, I have a similar setup (for testing) and have no trouble access my webapp from anywhere on the web on my home PC. We had this discussion the other day. On 10/30/06, CANADAFAST INC. [EMAIL PROTECTED] wrote: I don't care if anyone finds this question interesting or not. I just want a solution, if it were in the linksys manual then I would not have posted the question, I tried solving the problem by calling the linksys tech support, also had a chat session with them, but they don't understand the problem itself. Pid [EMAIL PROTECTED] wrote: The reason no-one is finding this an interesting question is that it's not really anything to do with Tomcat. Your LinkSys router probably has a manual, or at least some basic instructions for how to map external ports to the internal server. CANADAFAST INC. wrote: Hello! I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly in my PC using tomcat. I want to make my PC a webserver, so that ppl from outside can access my JSPs through tomcat 5.5 running on my system. My PC is connected to a router and my router is connected to a cable modem which has a static ip address from my cable ISP. But after that I don't know what to do further. How should I configure my tomcat, so that ppl from outside can access my JSP website. hOW SHOULD i access my pc from outside through my linksys router from port 8080 in which tomcat is running on my pc. Thank you - Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - We have the perfect Group for you. Check out the handy changes to Yahoo! Groups. talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Web server hosting question using tomcat 5.5
Firstly you'll need to configure (open some ports) your router to allow direct access to the tomcat port on your machine. Assuming you know the IP address of your router ( type in google: what's my IP address), user should be able to connect to your app by typing something like http://YourRouter's IP:Tomcat Port/your context path..That should be it. On 10/28/06, CANADAFAST INC. [EMAIL PROTECTED] wrote: Hello! I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly in my PC windows xp using tomcat. I want to make my PC a webserver, so that ppl from outside can access my JSPs through tomcat 5.5 running on my system. My PC is connected to a router and my router is connected to a cable modem which has a static ip address from my cable ISP. But after that I don't know what to do further. How should I configure my tomcat, so that ppl from outside can access my JSP website. Thank you Khinan - Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates. -- * Still searching for the gatekeeper to the Valence-Band, let me out of here! talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Web server hosting question using tomcat 5.5
The 192.168... is an IP only valid behind your router, for someone on the internet to access your app, you'll need to use your router's Iternet IP address. Again you can determine that address by typing What's my IP address in google and then select any of the results. From the URL you stated, I don't see any reference to the context path of your app, tomcat from what I know isn't going to find an abitrary index.html, you must specify which app you're trying to access. So you'll type in your browser: http:// your ip address: tomcat port/your webapp context path On 10/28/06, CANADAFAST INC. [EMAIL PROTECTED] wrote: hi Thanks for ur reply. I actually already new what u just mentioned. The problem is I tried 100s of times to run it my tomcat is running at 8080 on my pc. I enter the ip address like: http://routerip:8080/index.html Is that the correct way, or do I need to change the ports, some ppl say it should be port 80, but I don't know how to chnage to port 80 on tomcat. My router has assigned an ip to my PC which is like 192.168.1.2, so when do I need this local ip. I am getting confused. I hope u have time to answer my problem, i'd really appreciate. Thank u EDMOND KEMOKAI [EMAIL PROTECTED] wrote: Firstly you'll need to configure (open some ports) your router to allow direct access to the tomcat port on your machine. Assuming you know the IP address of your router ( type in google: what's my IP address), user should be able to connect to your app by typing something like http://YourRouter's IP:Tomcat Port/your context path..That should be it. On 10/28/06, CANADAFAST INC. wrote: Hello! I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly in my PC windows xp using tomcat. I want to make my PC a webserver, so that ppl from outside can access my JSPs through tomcat 5.5 running on my system. My PC is connected to a router and my router is connected to a cable modem which has a static ip address from my cable ISP. But after that I don't know what to do further. How should I configure my tomcat, so that ppl from outside can access my JSP website. Thank you Khinan - Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates. -- * Still searching for the gatekeeper to the Valence-Band, let me out of here! talk trash and carry a small stick. PAUL KRUGMAN (NYT) - Get your email and see which of your friends are online - Right on the new Yahoo.com -- * Still searching for the gatekeeper to the Valence-Band, let me out of here! talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Web server hosting question using tomcat 5.5
Your webapp context is the root directory of your web application, I am sorry but you should probably read a bit first before trying to deploy a web app. Check out the following link, it should be easy to see the steps you need to successfully develop and deploy your app in tomcat: http://tomcat.apache.org/tomcat-5.5-doc/index.html On 10/28/06, CANADAFAST INC. [EMAIL PROTECTED] wrote: hi! there I understand the line you told me to type in my brower: http:// your ip address: tomcat port/your webapp context path only problem is what do u mean by the webapp context path? my webapp folder is in c: drive in programfiles folder. Or how should I type the webapp context, how would type in ur PC for instance? Maybe I am a newbie so I did not understand what u meant by the context path. If u have time then please send me a breif explanation. Thank you EDMOND KEMOKAI [EMAIL PROTECTED] wrote: The 192.168... is an IP only valid behind your router, for someone on the internet to access your app, you'll need to use your router's Iternet IP address. Again you can determine that address by typing What's my IP address in google and then select any of the results. From the URL you stated, I don't see any reference to the context path of your app, tomcat from what I know isn't going to find an abitrary index.html, you must specify which app you're trying to access. So you'll type in your browser: http:// your ip address: tomcat port/your webapp context path On 10/28/06, CANADAFAST INC. wrote: hi Thanks for ur reply. I actually already new what u just mentioned. The problem is I tried 100s of times to run it my tomcat is running at 8080 on my pc. I enter the ip address like: http://routerip:8080/index.html Is that the correct way, or do I need to change the ports, some ppl say it should be port 80, but I don't know how to chnage to port 80 on tomcat. My router has assigned an ip to my PC which is like 192.168.1.2, so when do I need this local ip. I am getting confused. I hope u have time to answer my problem, i'd really appreciate. Thank u EDMOND KEMOKAI wrote: Firstly you'll need to configure (open some ports) your router to allow direct access to the tomcat port on your machine. Assuming you know the IP address of your router ( type in google: what's my IP address), user should be able to connect to your app by typing something like http://YourRouter's IP:Tomcat Port/your context path..That should be it. On 10/28/06, CANADAFAST INC. wrote: Hello! I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly in my PC windows xp using tomcat. I want to make my PC a webserver, so that ppl from outside can access my JSPs through tomcat 5.5 running on my system. My PC is connected to a router and my router is connected to a cable modem which has a static ip address from my cable ISP. But after that I don't know what to do further. How should I configure my tomcat, so that ppl from outside can access my JSP website. Thank you Khinan - Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates. -- * Still searching for the gatekeeper to the Valence-Band, let me out of here! talk trash and carry a small stick. PAUL KRUGMAN (NYT) - Get your email and see which of your friends are online - Right on the new Yahoo.com -- * Still searching for the gatekeeper to the Valence-Band, let me out of here! talk trash and carry a small stick. PAUL KRUGMAN (NYT) - Access over 1 million songs - Yahoo! Music Unlimited Try it today. -- * Still searching for the gatekeeper to the Valence-Band, let me out of here! talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Problems with tomcat session timeout on linux
You may want to look into SessionListener/Session event Listener. I am not sure what the issue is with regards to the timeout, setting timeout to 30 means the session should expire in 30 minutes. The timeout is really all you should need as far as wanting to prevent idle sessions, after all that is what it is for. On 10/28/06, Oren Livne [EMAIL PROTECTED] wrote: Dear All: I'm running tomcat 5.5.20 on a redhat 8 linux server (Linux ruready.utah.edu 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 18:00:32 EDT 2006 i686 i686 i386 GNU/Linux). My web application manages its own session pool. Every time a user logs into the site, a session is created and stored in a synchronized map of user ID, session ID. When a user logs out, the session is invalidated and removed from the map. When tomcat destroys a session, the user is logged out. The problem: some times users log in and then close their browser window (at least I assume so), but tomcat never destroys their session. The session-timeout parameter is set to 30 in web.xml. I tried it with session-timeout = 1 on my windows development box, and then it worked -- tomcat did destroy the session after it's been idle for 1 minute. Is it a known linux bug, or is it something in my code? Is there a way to force sessions to be destroyed without writing a thread to look for idle sessions every some time and invalidate them? Any help would be greatly appreciated. Thanks, Oren -- == Oren Livne, Ph.D. Research Assistant Professor of Mathematics RUReady Software Architect Academic Outreach and Continuing Education 1901 East South Campus Dr., Room 2197-D University of Utah, Salt Lake City, UT 84112-9399 Tel : (801) 581-6831 Cell: (801) 631-3885 Fax: (801) 585-5414 Email: [EMAIL PROTECTED] Web: http://ruready.net/oren == - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- * Still searching for the gatekeeper to the Valence-Band, let me out of here! talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: Problems with tomcat session timeout on linux
Well, I must admit, I run Ubuntu myself and I have noticed on a few occasions (after multiple netbeans builds) that the session doesn't get destroyed in a timely manner sometimes. So it is possible that there is an issue but it happens for me very rearly, I don't know whether this is an issue that happens on deployed apps. You can do some googling to see if anything comes up. Unless the user remaining logged in poses a security/resource problem, then you probably shouldn't stress over it, idle sessions do eventually get invalidated. On 10/28/06, Oren Livne [EMAIL PROTECTED] wrote: Hi Edmond, Thanks for your feedback. I am implementing a session listener and a session event with custom sessionCreated() and sessionDestroyed(). Indeed, I thought that the timeout is all I needed, but the point is ... that it doesn't work properly for me on linux. It does on windows. Thanks Oren EDMOND KEMOKAI wrote: You may want to look into SessionListener/Session event Listener. I am not sure what the issue is with regards to the timeout, setting timeout to 30 means the session should expire in 30 minutes. The timeout is really all you should need as far as wanting to prevent idle sessions, after all that is what it is for. On 10/28/06, Oren Livne [EMAIL PROTECTED] wrote: Dear All: I'm running tomcat 5.5.20 on a redhat 8 linux server (Linux ruready.utah.edu 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 18:00:32 EDT 2006 i686 i686 i386 GNU/Linux). My web application manages its own session pool. Every time a user logs into the site, a session is created and stored in a synchronized map of user ID, session ID. When a user logs out, the session is invalidated and removed from the map. When tomcat destroys a session, the user is logged out. The problem: some times users log in and then close their browser window (at least I assume so), but tomcat never destroys their session. The session-timeout parameter is set to 30 in web.xml. I tried it with session-timeout = 1 on my windows development box, and then it worked -- tomcat did destroy the session after it's been idle for 1 minute. Is it a known linux bug, or is it something in my code? Is there a way to force sessions to be destroyed without writing a thread to look for idle sessions every some time and invalidate them? Any help would be greatly appreciated. Thanks, Oren -- == Oren Livne, Ph.D. Research Assistant Professor of Mathematics RUReady Software Architect Academic Outreach and Continuing Education 1901 East South Campus Dr., Room 2197-D University of Utah, Salt Lake City, UT 84112-9399 Tel : (801) 581-6831 Cell: (801) 631-3885 Fax: (801) 585-5414 Email: [EMAIL PROTECTED] Web: http://ruready.net/oren == - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- == Oren Livne, Ph.D. Research Assistant Professor of Mathematics RUReady Software Architect Academic Outreach and Continuing Education 1901 East South Campus Dr., Room 2197-D University of Utah, Salt Lake City, UT 84112-9399 Tel : (801) 581-6831 Cell: (801) 631-3885 Fax: (801) 585-5414 Email: [EMAIL PROTECTED] Web: http://ruready.net/oren == - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- * Still searching for the gatekeeper to the Valence-Band, let me out of here! * When I was coming up, it was a dangerous world, and you knew exactly who they were. It was us versus them, and it was clear who them was. Today, we are not so sure who the they are, but we know they're there. Poet Laureate G.W Bush (I am not a Bush basher by the way) talk trash and carry a small stick. PAUL KRUGMAN (NYT)
serving static html with Tomcat
Hi guys I am a newbee so bear with me. I have tomcat deployed on a ubuntu machine, everything works fine except: My app generates static html pages from jsp and writes the html files to a sub-dir of my context path, however when I click on the link for the file, I get a 404 error. When I restart the application after adding the file, everthing works fine, but obviously I can't redepoly the app everytime a new html is added. I have verified that the links are correct, Any ideas? -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: serving static html with Tomcat
Hi Christopher My directory structure is as follows: context_path/customer/public I make a call to my jsp via something to the effect: URL url = URL(jsp); write the stream i receive to context_path/customer/public/customer_id/index.html The servlet function from within which the above processing is done should return a preview of the page to the user via return (new ActionForward(/customer/public/cutomer_id/index.html)); I am using struts by the way. the returned actionforward results in 404 error. The html is also available on the main site for searching, when i click a link that results from the search I get the same 404 error. When i redeploy the app I can search and the 404 error doesn't happen when I click a result link. It is as if tomcat catalogs all subfolders in your context path upon deployment and doesn't bother actually checking the disk for files??? On 10/23/06, Christopher Schultz [EMAIL PROTECTED] wrote: Edmond, My app generates static html pages from jsp and writes the html files to a sub-dir of my context path Ugh... you are using JSP as a content-generation system? Why!? however when I click on the link for the file, I get a 404 error. Can you give us an example of what the URL of the link is? Or are you just trying to have Tomcat serve a static HTML document that you had previously created? Where (specifically) are you storing these generated HTML documents? When I restart the application after adding the file, everthing works fine, but obviously I can't redepoly the app everytime a new html is added. I have verified that the links are correct, Any ideas? Can anyone comment on Tomcat's caching of path lookups on the disk? That would seem to be a tremendous waste of memory if Tomcat actually remembered that a file didn't exist (not to mention a pain in the neck if you wanted to add files on the fly like this guy). Can someone confirm that Tomcat does nothing of the sort? That's the only reason I could think of for why he can't access his files. -chris -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: serving static html with Tomcat
what's crazy about it??, the site I am creating will contain user generated content, however the content isn't going to be changing frequently so i didn't want to have jsp's hold objects in memory for pages that aren't chnaging too often. I have the user publish their info whenever they make changes to it. On 10/23/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote: EDMOND KEMOKAI wrote: I make a call to my jsp via something to the effect: URL url = URL(jsp); write the stream i receive to context_path/customer/public/customer_id/index.html The servlet function from within which the above processing is done should return a preview of the page to the user via return (new ActionForward(/customer/public/cutomer_id/index.html)); I am using struts by the way. the returned actionforward results in 404 error. It's crazy. You should redesign your application. -- Mikolaj Rydzewski [EMAIL PROTECTED]http://ceti.pl/~miki/ PGP KeyID: 8b12ab02 There are three kinds of people: men, women and unix. -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: serving static html with Tomcat
I'll probably end doing that, I understand apache is better for serving static content. However the problem isn't where user data is stored, my user data is stored in a database. Basically my app is similar to a dating site(it is not a dating site) where a user's profile doesn't chnage regularly so there is no reason to use jsp for accessing such a page, secondly, I am using lucene which can't search jsp directly. I'll eventually install apache and use it to access html. On 10/23/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote: EDMOND KEMOKAI wrote: what's crazy about it??, the site I am creating will contain user generated content, however the content isn't going to be changing frequently so i didn't want to have jsp's hold objects in memory for pages that aren't chnaging too often. I have the user publish their info whenever they make changes to it. I'd use a database to store user submitted data. Or I'd use a separate directory to write files in. Separate - I mean outside tomcat's webapps directory. In my projects I deploy webapps only as war files and I never write anything within app's directory. -- Mikolaj Rydzewski [EMAIL PROTECTED]http://ceti.pl/~miki/ PGP KeyID: 8b12ab02 There are three kinds of people: men, women and unix. -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)
Re: serving static html with Tomcat
I know premature optimization is root of some evil, but I prefer the setup I have at the moment, I think it will work fine. I beleive I will benefit performance wise if I don't have to do constant queries against my db, I am not sure how much performace gain there will be. As far as indexing with lucene, I am using a RAM index, which is updated whenever the user elects to republish content, the index is also stored on disk in xml form so that if the webapp has to be rebooted (which will happen invariably) it will be parsed and reindex into RAM. On 10/23/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote: EDMOND KEMOKAI wrote: I'll probably end doing that, I understand apache is better for serving static content. However the problem isn't where user data is stored, my user data is stored in a database. Basically my app is similar to a dating site(it is not a dating site) where a user's profile doesn't chnage regularly so there is no reason to use jsp for accessing such a page, secondly, I am using lucene which can't search jsp directly. I'll eventually install apache and use it to access html. Why do you insist on generating static content? Write one generic 'profile.jsp', fetch user's data from a database (you already has one) and that's it. Have you measured that accessing db _really_ slows down your system? If not, so don't waste your time with unneeded optimisations. Speaking about Lucene: it's a waste of its power to index html files generated from a database. Index text data you insert into database, not the generated files. -- Mikolaj Rydzewski [EMAIL PROTECTED]http://ceti.pl/~miki/ PGP KeyID: 8b12ab02 There are three kinds of people: men, women and unix. -- talk trash and carry a small stick. PAUL KRUGMAN (NYT)