|
|
I have the following working in Tomcat and JRun, no problems works great everytime. Then I tested it on a OS/390 system, which is where it will reside, and I am having problems. The following is the code I am using: String agent = request.getRemoteAddr(); // unknown clients will be internet users String incFile = "/text/head2.html"; if ( agent != null ... |
Hello, I've made a couple of JSPs which use some classes as beans. Everything in those beans is static. I thought that if there is only one object in the universe I might resque some memory... But I wonder, what will happen if two client-users try to modify the same object? For example I have an object that adds messages to ... |
Hi all, I am trying to develop a web app using jsps, servlets, and some static html. The task I would like to complete, as elegantly as possible, is to generate dynamic pages utilizing jsps and servlets, but also to include certain static html elements. These static elements, however, change for different users. For instance, user1 and user2 have the same ... |
|
My HTML page contains some static portion and some dynamic. I want to control my static portion with javascript and rest with servlet. eg. I have a form in which i have some text boxes and some buttons like next, prev, delete etc. I want to disable or enable buttons using javascript and populate the text boxes with database. Presently i ... |
|
I have just seen one of our developers having a class with all his keys as public static final Strings. I do not have a problem with that. What I want to know is wheather he will not need to recompile all his files when he changes the values in the keys class. I had this problem with my debug code ... |
Hi Gayathri, This is my question, I have a servlet which has a static block. static{ Timer t = new Timer(); //create a file at a period of time } This is in the servlet. The servlet is going to run in 3 clusters. I assume, this would cause the problem of creating 3 files instead of one. Am I guessing ... |
Hi, I am running jboss-3.2.1 with tomcat-4.1.24 and have configured the following filter scheme in my web.xml: UISCompressionFilter com.unisys.framework.control.UISCompressionFilter compressed true UISCompressionFilter LongServlet UISCompressionFilter /TesteDPR.html UISCompressionFilter /long.jsp ... My filter works fine when accessing a servlet or jsp page but when I try to get html files, the following exception ... |
|
Hi, I want to track the users' requesting a static resource from my application. For example, I would like to track(log) when the user downloads an mp3 song(for example). Now for this, I wrote some code in my already existing filter. Everything works fine,when the user clicks an mp3 song(static resource, it does not goto my servlet), the code in my ... |
If the exception shows a string with properly matched braces...well, I have to admit I didn't see anything obvious that would cause depth to not be == 0 at the end of the method. If the comments are to be believed, why not simply say: //code to check the string for validity first, count and match the number //of each type ... |
Narasimha, I've written some small example apps that you can just drop into the webapps directory of a running instance of Tomcat and run. Any one of these will show you the proper directory structure for a Servlet/JSP app along with simple examples of how to map servlets in web.xml. Simple Servlet Example In a nutshell, your directory structure should look ... |
Originally posted by Nathaniel Stoddard: Static variables are obviously scoped to the JVM they're living in. So, in a clustered environment, if you change one, the other JVMs are not going to know about the change. However, if all you're doing is initializing some stuff from the DD then you're fine. Actually, that's not entirely true. Static variables are scoped to ... |
Hi all, Can somebody explain me what happens exactly when you use static variables in classes (called by servlets) that are running in an environment with loadbalancing. I can't find a satisfying answer about it, when I do a search in the forums. I know that when you configure your loadbalancer to do session binding (session always goes to the same ... |
hi, I have a static set and whenever a new user comes the name of that user will be added in that Set. When user clicks logout the name will be removed from the set. But Instead of logout if the user closes the browser still the users name would be in the set. So is there any way to remove ... |
i have an applcation which displays an image in selecting an item from a drop down list. now, I am selecting the item for n-number of times and viewing the coresponding image after cliking on submit. Now at one point i click "back " button on the browser and i see that it doers not display my previous selction in drop ... |
|
Hi All, I had a question when to use encodeURL & when not to in case we are referring to images (in servlet code) which are residing on a dedicated(caching) server separate from the web/app server. What I read in an article recently is we should be using encodeURL with fully-qualified URL's to reference images outside your web server only if ... |
Ehy ranchers, I'm here again to ask your opinion on a little problem I'm facing right now. So, I got some data which will not change over the total life of my web application, hence I want to cache it somewhere. I'm not in the need to use some tool like EhCache, since data will be retrieved only once when the ... |
Is your aim for the fragments to be browser-cacheable? Or are you just trying to protect against JSP injection attacks? Bear in mind that you'll need to worry about JavaScript injection as well. Rather than "real" HTML would a sub-setted substitute like UBB codes do? Or do you really need "cleansed" HTML? |
The load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application. The optional contents of these element must be an integer indicating the order in which the servlet should be loaded. If the value is a negative integer, or the element is not present, the container is free to ... |