Garrett Smith

Ranch Hand
+ Follow
since Jun 27, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Garrett Smith

Don't have permission to view the topic?

https://coderanch.com/t/497446/JSP/java/FAQ-Setup-Jstl-Jsp

What is this, some form of censorship?
13 years ago

Kris Schneider wrote:
There were definitely some problems with jcp.org, but they seem to have been resolved:

JSP 2.0: http://jcp.org/aboutJava/communityprocess/final/jsr152/



Thanks - that's what I was looking for.
13 years ago
JSP

Kris Schneider wrote:For better or worse, that's actually a quote from the JSP 2.0 Spec. (section JSP.2.3.7). However, the spec. also provides some detail to give the definition of "empty" some context:



Google search results yeilded this thread, a PDF from oracle that crashed Firefox, and a links on jcp.org that resulted in no server response.

Search 1: JSP.2.3.7
Search 2: jsp 2.0 specification

Where can I get the official specification?
13 years ago
JSP
Brain dead, recursive definition.
http://www.oracle.com/technology/sample_code/tutorials/jsp20/simpleel.html

" The empty operator is a prefix operation that can be used to determine if a value is null or empty."



Doesn't say whether or no "" is empty, does it?
13 years ago
JSP
The code is working fine but is there a cleaner strategy using tag files that is simple(r)?

The idea is to make a quiz where the form submits to the same page and displays the results, allowing the user to try again until he gets the right answer. This is a one-off, but I still like to keep the jsp clean anyway.



13 years ago
JSP
You guys are awesome! Thanks.

I think, it *might* be Tiles. All the JSPs are slow except the ones that do not use Tiles.

Example:
1. 4.7k, no Tiles, load-time < 2sec
http://dhtmlkitchen.com/learn/js/enumeration/example/datedcard.jsp

2. 4.2k, Tiles used, load-time > 8sec
http://dhtmlkitchen.com/learn/js/enumeration/set-dontenum.jsp

Now I'm guessing (this is only a guess), that if Tiles pages are slow, maybe Tiles is doing a heavy operation that causes more memory use, possibly handing out references. If this is true, then running JProfiler @ home will reveal it.
[ October 21, 2007: Message edited by: Garrett Smith ]
16 years ago

Originally posted by Ilja Preuss:


You can. The connection wizard is quite good - you tell it what you want to do and how your server is configured, and it will create a configuration and tell you what manual steps you need to do.



DailyRazor that I won't be able to use JProfiler on their servers because they use jsvc instead of java, and that most command-line options needed for JProfiler are not implemented in jsvc. Is this true?

They go on to tell me that I should be using JBoss.

The hosted site has 30-80 sessions at any given time and the environment is different than my local env. I can just try JProfiler locally and hope for the best.
16 years ago

DailyRazor Support

Dear Customer,

Your application was overloading the server, we had to stop your tomcat. You can start it at any time, however if we will notice that it's consuming too much of server resources we will suspend your account.

Thank you.



I guess should say, "you're welcome?"

What the hell?
16 years ago

Originally posted by Ernest Friedman-Hill:
Ah! OK, now we're getting somewhere. Read this, my friend:

http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java
Thanks for that article.

Looks very much like what's happening is that your app is handing out references to some of its objects, so that when it is reloaded/redeployed those object persist and prevent the old classes from being collected.


I get the same symptoms described in that article.

I changed my log4j.properties.
FROM:
log4j.rootLogger=DEBUG, stdout
TO:
log4j.rootLogger=ERROR, stdout

Had no effect.

I contacted the JProfiler folks to see if I could run the profiler remotely. No reply yet. I might have to suck it up and pay the $200 for this.
16 years ago
I got that idea from the stack trace:
16 years ago

Originally posted by William Brogden:

It is also possible that even with correct memory management code, a number of "simultaneous" requests could exceed the allocated memory. What facilities for memory configuration does "DailyRazor" provide?



I asked about increasing PermGen space, but they don't offer that option.

The only option, they say, is to upgrade to a dedicated server.

DailyRazor support:
PermGen space is always limited to 64Mb, this is a hard limit that will not be overriden. If your application require more PermGen space you should upgrade to dedicated server, where you will be able to have as much space as you like.

In any case, this issue has nothing to do with server itself, it's only your application that require too much memory to run, so basically you have only these choices: 1. Somehow optimise your application to use less classes and libraries or 2. Upgrade to dedicated server.



Wow, so I can upgrade to a dedicated server. $3000 USD/year. Yeah, OK. That sounds reasonable for a personal website.

I'm looking into JProfiler to see if and how I can run it remotely.
16 years ago

Originally posted by David O'Meara:
I have been looking at the behaviour of ""+x versus String.valueOf(x) and while the first is slightly shorter and possibly easier to read, my guess is that it involves 3 String instances (one that is probably pooled) while the second would only create the one String instance.

Not a massive difference, but some of them are right in the core of our logic so I thought it was worth pursuing.


Correct me if I'm wrong, but I think it also involves a StringBuilder (implicitly), using +.
16 years ago
OOME. F. I have no idea.

How do I troubleshoot OutOfMemoryError?

All I know is: Tomcat is down, I restart it. IT's up. IT WILL crash again. Sometime.

I have several OOME's in the logfile, I guess I should go w/the 1st? What can I use to profile my app running remotely on DailyRazor servers?
16 years ago

Originally posted by Pat Farrell:


Hey, I'm a professional programmer, I expect to get paid for it to work perfectly.


Sorry, bad joke.

Originally posted by Pat Farrell:

Looks like you are getting help and making progress.
Java is actually fairly easy to do the node/tree stuff



It isn't that hard to hard-code, but will be hard to maintain. I'm not putting markup in my HTML. I've been down that road.

Same thing with the JSON approach. Hard to maintain and requires inefficient client-side HTML transforms.

I'm considering the htmlparser. Parser.parse gives a NodeList.
16 years ago
Now I am copy-pasting HTML into objects, escaping quote marks.
This is madness.

Parsing the list and the iterating the collection on the server would be less error-prone and would keep my HTML out of the objects.

This HTML parser looks like it might be able to do that. I haven't worked with streams in years, though.

http://htmlparser.sourceforge.net/javadoc/org/htmlparser/Parser.html
16 years ago