Win a copy of Rust Web Development this week in the Other Languages forum!

Linwood Hayes

Ranch Hand
+ Follow
since Feb 04, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
6
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 Linwood Hayes

What if

in this case, regardless of whether it is a good practice, such synchronization functions on the "number" var, right ?
5 months ago
Thank you for the input
5 months ago

Mike Simmons wrote:

Linwood Hayes wrote:Does the    synchronized(Integer.valueOf(number)) achieve the supposed synchronization effect on variable "number" ?



Well, there's no method Integer.toInt(), so we would have to guess what it does.  I have a few different guesses which would lead to different results.  I suggest you try compiling the code to see if it is even allowed, then let us know what you mean to ask about.



sorry, I didn't think when I typed..  have corrected it in the code.  it is "valueOf()"
5 months ago



Does the    synchronized(Integer.toInt(number)) achieve the supposed synchronization effect on variable "number" ?
5 months ago
My application has a page of downloading a server side generated PDF file.  In IE it works in a way that in the "save as", the file type auto shows "Adobe Reader", but in Chrome it only shows "All files".


Suppose this code is in a servlet application whose context name is "myApp".  So by setting the cookie path as "/myPath", will the path auto pre-append "myApp", i.e. "/myApp/myPath" ?  or will it just be like "/myPath" ?
1 year ago
For some old spring version app like spring 3, will JDK 11 be compatible with it? I can't find reliable answer on web.  I know if you have a newer version of Spring it requires a minimal JDK version.  But if Spring is old, does it put an "upper" limit on JDK version ? It seems it shouldn't since JDK is back-compatible.  But I am not sure.  Please help if you know.
1 year ago
don't know why.  i posted earlier, not sure how it appeared again.
1 year ago
JSP
In some maven web projects, I see different jstl related jars.  In one pj, I see

<groupId>jstl</groupId>
<artifactId>jstl</artifactId>

But in another project, I see

<groupId>org.glassfish.web</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId>

<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>javax.servlet.jsp.jstl-api</artifactId>

I omitted the version part for simplicity.
What confuse me is

1) what is jstl-api.jar for ?
2) why in the first project, it works fine without jstl-api.jar,  but in the second project it uses a combination of them ?
3) For jstl.jar, the second one is clear it is from "javax.servlet.jsp", but the first one is just "jstl", sounds strange.
1 year ago
JSP

Tim Holloway wrote:I think that probably those projects (POMs) are messed up.

JSTL is the Java Standard Template Library, but as far as I can recall (which isn't very far), there's not going to be a need to explicitly reference a JSTL API or Implementation library in a webapp, since JSTL is a language of its own and it's handled entirely(?) at runtime.

In any event, looking for a specific webserver version of either of those libraries rings major alarm bells. JSTL is part of the webapp server, so in Maven terms, its scope is "provided", not the default (which is "compile").



so you think  makes better sense than the other one ?
1 year ago
JSP
In some maven web projects, I see different jstl related jars.  In one pj, I see

<groupId>jstl</groupId>
<artifactId>jstl</artifactId>

But in another project, I see

<groupId>org.glassfish.web</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId>

<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>javax.servlet.jsp.jstl-api</artifactId>

I omitted the version part for simplicity.
What confuse me is

1) what is jstl-api.jar for ?
2) why in the first project, it works fine without jstl-api.jar,  but in the second project it uses a combination of them ?
3) For jstl.jar, the second one is clear it is from "javax.servlet.jsp", but the first one is just "jstl", sounds strange.
1 year ago
JSP
Inside a WAR deployed to a server, I have a java utility type class (not servlet).  I want to identify the server name inside this java class.  How can I do that ?  
1 year ago
I see the following spring and JDK version requirement:

JDK 6+ for Spring 4
JDK 5+ for Spring 3

Just have a dumb question: so if I use Spring 4 and my installed JDK is 6+, most of java code are Java 6+ style, but some legacy java code is still using  Java 2 or pre Java 5...   Does that break this compatibility requirement ?
1 year ago
In Spring MVC, form is bound into "command" object. is this command object created on server side ,  or on the client side and passed to server ?
1 year ago
Few questions from newbie thinking about learning ML.

1. Do I need to know Big Data and/or Hadoop to learn ML ?

2. Does ML cover Big data and Hadoop ?

3. Does ML cover SAS and/r R ?

Thank you.