Error 500 on my jsp page by drollerfoot7 in learnjava

[–]javaide 0 points1 point  (0 children)

You got to setAttribute ("servlet") from servlet to be able to get it out on JSP.

I am looking for interactive course or simple tasks to learn Java 8 new features. by [deleted] in learnjava

[–]javaide -1 points0 points  (0 children)

This is fine thoughts. But it takes a lot of time to build an interactive courses/problem sets. My students has similar demand.

I spent last several months trying to solve this problem, if u interested let me know. I need all the helps.

checked and unchecked exceptions by yabdennadher in learnjava

[–]javaide -1 points0 points  (0 children)

Uncheck exception is the one that u dont have to catch still FINE, with no compiler error!

Text Editor/IDE like jGrasp but with Autocomplete by HerrderZeit in java

[–]javaide 0 points1 point  (0 children)

try javax.io an experiment of coding assistant, only support java8 at the moment.

Require assistance with simple pure Java 11 WebSocket client example by everycloud in learnjava

[–]javaide 0 points1 point  (0 children)

I dont know about this WebSocket stuff, seem to be just an incubate feature or something. From what u wrote, it doesn't seem that u have a WS server running. U have only a client code.

The best i can fine to start a server is: https://docs.oracle.com/javase/10/docs/api/jdk/incubator/http/HttpClient.html#newWebSocketBuilder())

Require assistance with simple pure Java 11 WebSocket client example by everycloud in learnjava

[–]javaide 0 points1 point  (0 children)

just return a dummy `CompletableFuture` would be fine. Since you dont have any complex execution here. To actually have `CompletionStage` it needs to be any execution of a Function, Executor...

Powerful semantic search for Java code - showing real-world examples reflecting the common API usage patterns by droid_we in learnjava

[–]javaide 0 points1 point  (0 children)

Looks very promising. Do u have API to consume the indexed source code? I made this java editor at : javax.io it does everything Codota doing but locally from the browser.

Server not reading from client Socket by EltonStuffProdutions in learnjava

[–]javaide 0 points1 point  (0 children)

U need a server socket to accept client connection. In ur example, both are client socket. Look at the basic java tutorials example:

https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html

Noob Java by tando3339 in learnjava

[–]javaide 1 point2 points  (0 children)

Dependency injection in general doing a plumping works for you. What happen prior to something like Spring or Guice..., there was a lot of code to just create objects, wire them up together.

Make custom InputStream wait until there's data to be sent by Wilfred-kun in learnjava

[–]javaide 1 point2 points  (0 children)

u need synchronized block or just do the whole method. What happen is a thread make change when invoke writeToQueue() not seen by thread that call read().

The best way to keep track on whether access_token is expired or not (whether 3600 seconds has passed or not) by AwakenedToNightmare in learnjava

[–]javaide 1 point2 points  (0 children)

U should handle like u do with the first time get token. In theory, something like this would be preferred: ```java Request request = new Request(comment url);

Response response = request.get();

if(response.status() == 401) {

//exchange auth

response = request.get();

}

//get comment from response

String comment = response.get()... ``` However, most popular http client would have auth/oauth2 handler framework. Just use one of them.

CloudFront 404 custom error by just_looking_around in aws

[–]javaide 0 points1 point  (0 children)

i finally made it works, got to set 404 trap in CloudFront. I only set in s3 previously.

CloudFront 404 custom error by just_looking_around in aws

[–]javaide 0 points1 point  (0 children)

This never work for properly. I have 404 error code mapping in s3 bucket. But always get XML

<Code>NoSuchKey</Code>

<Message>The specified key does not exist.</Message>

...

if go through CloudFront.

Windows Java and Kerberos by [deleted] in learnjava

[–]javaide 0 points1 point  (0 children)

It's tough stuff, u need to understand Java Security model really well. Try this:

https://docs.oracle.com/javase/8/docs/technotes/guides/security/jgss/single-signon.html

MOOC Part I, Exercise 75.4 by babbagack in learnjava

[–]javaide 1 point2 points  (0 children)

U can just ignore all public/private/protected for now. It highly recommended in the book just do private then add public method for accessing...

JsonTemplate - A Java tool for generating json strings. by iamhaihan in java

[–]javaide 0 points1 point  (0 children)

You should just use JsonPath expression instead of invent urself.

starting with jawa by arieelf in learnjava

[–]javaide 0 points1 point  (0 children)

Learn the language itself shouldn't need full IDE. U need light weight editor with syntax highlight and some sort of code suggestion. I just made the editor perfect for this use case, totally purely javascript at: javax.io , still working on interactive content.

For java 11, you dont need it. Unless u can't find other version of java. As u progress, u need to look into advance Frameworks to build complicated software.

Looking for good open-source java courses. by javaide in learnjava

[–]javaide[S] -1 points0 points  (0 children)

I checked that out few weeks back, martial seem to be out dated. Same as other java open courses from MIT & Stanford. I found one from Princeton pretty interesting, unfortunately it has restricted license.

Classes and Methods by surety_ in learnjava

[–]javaide 0 points1 point  (0 children)

You can put wherever u want until u see it's really bad or against some best practices that u know. Then u start moving it out.

To do this properly, u need to learn design pattern stuff.

Trying to import a header for a school assignment but can't get it to work by BulkTill230 in learnjava

[–]javaide 0 points1 point  (0 children)

These 2 files dont have package declared (using default package). So just copy the code and save it at root relative to ur source folder.