- Upvotes Received
- 7
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
53 Posted Topics
Hi have 2`springboot` applications running on ports `8085` and `8084`. When I try to use `RestTemplate` to try to connect from one service to another, I get a `BadGateway 502` exception. Below is the stacktrace head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx/1.17.9</center> </body> </html> ]] with root cause org.springframework.web.client.HttpServerErrorException$BadGateway: … | |
Re: I have been impacted by this a well. I joined DaniWeb 9 years ago and it was an amazing place to find the right answers as I was a newbie then. Over the last 6/7 years I was redirected to stackoverflow more. It somehow hit me suddenly today and I … | |
Hi, I have 2 checkboxes beside each other. When I resize me window, these move apart. How to make sure that they don't do so. Below is the code and css for the same. Please not that its handlebar code.Thanks!! Handlebar Code {{#controlGroup (lz "label.insight_chart_name") class="chart-name-group" required=true}} {{input "text" id="chart-name" … | |
Hi, I have a scenario where I have 2 labels that need to be configured. The names of the labels are 'Out Data' and 'In Data'. I only have one field in the database called 'Data'. Whether it is 'Out' or 'In' is decided at the runtime by the value … | |
Re: My personal preference is to use Guava's ComparisonChain. Its a much more subtle way of doing the comparison. | |
Re: `@Parameter(name = "databaseZone", value = "UTC")` Did you try to change this? Jadira defaults to using UTC in the database, and the JVM zone in the application. | |
Re: Why don't you try threads? Ignore this comment. | |
| |
Re: After your initial calculation, you are not updating the values. So obviously, they will not change. Please update them as well. | |
I have a class where there are a few `static final String` variables that have few values that repesent color values. The class is basically used to get the color values. Is it better to convert this to enum? public class Color{ public static final String GRAY50 = "#808080"; public … | |
Re: > I am wondering if this is where am getting it. look it over many times, and I know you all are tired of me but am learning. 1. To be precise to you question. Put at `try` around your code. `catch` your exception and print the stack trace. That … | |
Re: Hey Divinity, A little word from the unwise. Eclipse provides a wonderful debugging mechanism that will take you through the code. Best to debug issues like this using that if you are stuck. It will help you out in the longer run. Cheers!! > I have missed more than 9000 … | |
Re: can you please post the error that you see in the server. | |
Re: I think its better you post an example of what you understood and ask a question based on that. Your question seems to be as vague as the explaination that you read :). | |
Re: Since, this is a Java sub-forum, I assume that you have asked this w.r.t java. From my personal point of view below are a few things that are really necessary for writing a java program. 1. Understand the requirement clearly. Even for the smallest of the program. 2. Design your … | |
Re: > I don't see how you can pass a Map<String, LinkedList> to a method that requires a Map<String, String> Did he say that he is passing Map<String, LinkedList>? | |
Is it better to log `exception` or `exception.getMessage()`while logging an info log or an error log. I'm pretty sure that is related to the context but I'd like to know from a technical perspective on which would be better for any application or if its all the same. | |
I recently faced a problem when I was trying to run a junit test in eclipse. I was getting a ClassNotFoundExcpetion. So, I googled a bit and tried out a solution where I had to move the JRE System Library below the rest of the jars and it worked!!! But … | |
I have an idea for an android app/add-on. I'm basically a Java programmer and I can develop this using HTML/CSS/JQUERY etc. However, I have no idea on how to develop this for Andriod. Where would be a good place to getting start on app development. | |
Re: > In that first piece of code you definitely need to close the streams. Would flush have worked in this case? | |
Re: Please check if there are invalid columns specified in the update statement. This is generally thrown in such a case. | |
Hi, I have an issue with redirecting from my Spring controller to another servlet. Something similar to RequestDispather.forward. I get the below error. org.springframework.web.servlet.DispatcherServlet noHandlerFound No mapping found for HTTP request with URI [/xxx/xxx/xxx/abc.fcc] in DispatcherServlet with name 'dispatcher'. Is it possible to redirect directly to this url? | |
I have a `jsp` page where I enter a username and click on a submit button. On clicking this button, I post the username along with a hidden target page value to the other application. The other application does its processing and issues some cookies and redirects to the target … | |
![]() | Re: The below code snippet is not correct. One of the 'i''s should be replaced with 'number' if(i == i { break; } if(i == i+1){ break; } ![]() |
Re: I think that you need to use an loop to write the bytes from "man" into the output stream. Also try to flush the outputstream before you close it. | |
Re: 1.You would get an error saying that there is no main type when you try to run removing static from the main() . 2.If you remove static from compute() and not the main() then you may not access it from main() as its a static method. You will get an … | |
Re: Hi, Can you please share some more details about what you are trying to achieve here. Thanks ![]() | |
Re: Hi, This form doesnt encourage, direct answers to be provided. Please post some code/ idea that you already have and someone will be able to look into it and guide you. | |
Re: Below is a sample code snippet showing difference between static method and instance method. Declaration Static Method class DetailsBean{ pubic static String setName(String name){ this.name = name; } } Instance Method class DetailsBean{ pubic String setName(String name){ this.name = name; } } How to access Static Method public class User{ … | |
Re: Its a simple enough program........if u try it out im sure u can figure it out..... all the best :) | |
Hi, My database is showing null value when I try to insert the file path I upload. protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); String name=request.getParameter("fileUpload"); String destPath = ""; String relativeDestPath=getServletContext().getRealPath(destPath); System.out.println("Relativepath is"+relativeDestPath); PrintWriter out = response.getWriter(); String fileName=name.substring(name.lastIndexOf("\\")); String pathName=name.substring(0,name.lastIndexOf("\\")); String destName = relativeDestPath+fileName; … | |
Hi, None of the images that I try to add using HTML, CSS are being displayed on Chrome. I have tried methods like clearing cache and other tweakings of my browser but no use. Is there some code that I need to include to ensure that images are being dispalyed … | |
Re: one thing i didnt understand is why are u setting it agian in the Calculate(). Try getting the values from the already set values into new variables and add them. | |
Hi, I have a page with 2 frames . 1. Header 2.Display In the header page i have a menu bar with sub menus. But when i display this, my page is showing in improper format i.e there is a side scrolling for the header page when im trying to … | |
Hi I'm trying to connect using oracle10g with eclipse but its not able to locate the driver at all . [CODE] <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*" %> <% String uname="system"; String pwd="*****"; String url = "jdbc:oracle:thin:@localhost:1521:XE"; Connection con = null; Statement stmt = null; ResultSet rst = null; … | |
Hi, I've noticed that in eclipse when you give "Exception" and click on exception it is redirecting to that link.. But actually according to java even if we give keywords or anything inside quotations(" ") it shouldnt be considered right? So is this a bug in eclipse? Thanks | |
Hi, I need to eliminate all special characters in my file except "space" .. Please check the program below and tell me what I need to change [CODE] import java.io.*; import java.util.Scanner; public class TestScript { public static void main(String args[]) throws Exception { System.out.println("Please Enter the filename\n"); Scanner sc … | |
Hi, I've seen a program called guessing game in a book. There are basically 3 players in the game. The program generates a random number and the players guess for that number. I wrote my own code for it and need your advice on how to improve the Object Oriented … | |
Re: If you are using a third party claendar they will clearly give the instructions on how to use it. | |
Hi, I'm getting the following while trying to execute my spring program [CODE] 5 Jul, 2011 7:22:08 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@18a47e0: display name [org.springframework.context.support.ClassPathXmlApplicationContext@18a47e0]; startup date [Tue Jul 05 19:22:08 IST 2011]; root of context hierarchy 5 Jul, 2011 7:22:08 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions … | |
Hi, Can any1 tell me wht is the problem if i can't find an import in a main class [CODE] import org.springframework.context.ApplicationContext; [/CODE] It says that the import cant be resolved. thanks | |
Hi, Can some1 plz explain wht is the advantage of Inversion Of Control concept of Spring. I know that there is no need to instantiate in the class and the container will do it like [CODE] Hello h = new Hello(); [/CODE] The above need not be given and we … | |
Re: inside the conf folder there is one file called server.xml ... I think you can find it there....... [code=xml] <Connector port="8084" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />[/code] Here you can fix the port number .... anyway plz try it and sorry if im wrong Thanks | |
Guys, I want to get good at servlets and JSP .... please tell me what all I should do to achieve this ..... I know that theory alone wouldnt help me .. so what kind of stuff do i need to practice ..... and where can i find them Thanks | |
Re: hi ..... i think it would be better if u use next() instead of nextLine(); ........ well it is working for me better that way ........... I'm kinda new so I tried to do some modifications ....... please correct me if im wrong somewhere....... [CODE] import java.util.*; public class Membership … | |
Hi , I'm new to servlets and I'm trying out the Date function in servlets. Instead of printing todays date it is giving something like "Date@fbb7cb" this . Could you please point of my mistake .... Following is the code snippet [code] PrintWriter pw = response.getWriter(); Date today = new … | |
Hi , I have two string which have time in them like one= 11:54:30.360 two= 11:54:30,427 Wht is the best way to get the difference between them Thanks | |
Hi, I'm aware that there are two types of transaction logging: 1. Circular Logging 2. Archival Logging How do we know what type of logging we use? I mean is there any method to find out? If this is not the right place to post this thread please redirect me … | |
Hi What is the best way to go forward with finding all possible combinations of nCr Eg: 5C3 for the number 12345 123 134 135 145 234 235 345 Like that thanks ![]() |
The End.