santosh batta

Ranch Hand
+ Follow
since Jun 04, 2012
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
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by santosh batta

I've a simple API that returns a string. My objective is to secure my API using LDAP authentication. I've my LDAP configured in my JBoss EAP 7.1 under the security-domain. I've defined my security constraint in the web.xml and the corresponding security-domain in my jboss-web.xml This is my first shot to integrate LDAP with REST API. Not sure what went wrong, but when I hit my API from browser, it keeps prompting for credentials 3 times and then gives below error.

   
If I hit from postman, it gives similar error in json format...

 

web.xml

 

jboss-web.xml

   

API

 

standalone-full-ha.xml configuration:


My dependencies in pom.xml are:

   

My question is, why the API prompts for credentials multiple times when accessed from browser? I confirm there is nothing wrong with the credentials that are given. Also, the json response suggests some unhandled exception. Not sure, where it is coming from. Any suggestions would be helpful.

The same configuration worked for SOAP based services. For REST, its not working. Does it make difference?
2 years ago
We are trying to authenticate our REST api using LDAP. We have ldap security-domain configured in our jboss EAP. There must be a way to tell spring's PreAuthenticatedAuthenticationProviders that the user is already authenticated by another system (LDAP w/JBoss security-domain & the jboss-web.xml has the security-domain specified in it). Here is the code snippet.

 
This kind of configuration was working in EJB with @RolesAllowed annotation and we are trying to make this work in our spring boot app.
2 years ago

Ron McLeod wrote:

santosh batta wrote:the report is not downloaded instead, its trying to print on the postman console and its all garbage.


This is normal Postman behaviour when it is unable to render the content.



Click on the Download button, specify a location to save your content, and view it with an application which can work the content type.



Yup, it worked. Thanks much.
4 years ago
Hi,

I'm working on generating few reports for my application. We used spring boot to write the REST API. I wanted to generate and download the report (I don't want to hard code the download location instead I want to download the report to the user's downloads folder) to the user's machine, also to send a success JSON response to the client.

The report is generation is successful, however.. when I try to download the report and send the successful JSON response to the client, I'm having issue.

When I do this, the report is generated and the JSON response shows successful code.



However, when I do this, the report is not downloaded instead, its trying to print on the postman console and its all garbage.



Can you please suggest, what went wrong?
4 years ago
Hello All,

I'm trying to consume a REST service from my application. Below is the code snippet I'm using.



This is working fine in my machine and test environment. But it fails in PROD. Below is the stack trace



The potential difference between stage and prod environment is the ssl configuration. In stage we are pointing to JSSE2 where as in prod we are pointing websphere. So, I'm trying to override the websphere configuration with jsse2 programatically in my app.

I tried using but its still giving the same error. Any suggestion is really appreciated.

Thanks
5 years ago
Hi All,

In my current application, I'm calling a remote stored proc to get data that is stored in servlet context. My requirement is to call a WS instead of a stored proc to get the same data and store in the context. However, this call is happening during application start up. The service is ssl protected and the certificates are available only after JVM load. With my current design the call fails as the certs are not available.

Currently I'm calling the init class as a plugin in the struts-config. If I want to make the application initialization after JVM load, how to do that in struts? FYI.. the app is using struts 1.0

Your help is much appreciated.
5 years ago
I agree. So, I switched to use href to accomplish it. This is how, I am doing it..


The onclick method is..



When I click on the link, it opens a new window and displays default error page. I believe the action is not called (the sysout I put in the action is not printed on the console). I'm not sure if my href approach is correct. Can you please suggest, how I should use it to call the action? Your help is much appreciated.
5 years ago
The app is using struts 1.0. As you said, it does look like they removed the action attribute when they customized it. Is there a way that I can use href or some other way that I can call the action?
5 years ago
Hi,

I am trying to pass a parameter to action from my jsp using struts html link tag.



My struts-config.xml looks like this...



My action class is..



When I run the code, it says JSPG0218E: Error failed to locate setter method for attribute action in tag class org.apache.struts.taglib.html.LinkTag. Can you suggest what is wrong?

This is what I want to achieve: I want to call my InvoiceAction from the jsp to fetch the invoice info from DB and display it on another invoiceInfo.jsp  page ( I would like the 2nd jsp on a different window like a popup or something )
5 years ago
Hello All,

I'm having trouble deploying my web app on WAS 7.0.0.41. When I deploy on WAS 7.0.0.19 or WAS 8.5.5.10 on my laptop, the app is running just fine with no issues. However, when I deploy it on WAS 7.0.0.41 on remote server, the deployment shows successful. However, when I access the URL it throws below exception.



I check the struts jar files and found that there are 2 versions of struts.jars i.e. struts 1.0 and struts 1.3. In struts 1.0, the ResponseUtils class has the write method, however it is missing in the 1.3 version. There are quite some differences between these 2 versions. In spite of all these differences, it is working fine on local eclipse, but on remote server.. it is complaining the above error.

Please help me fix this.
5 years ago
This was working fine without any issues before. The only difference I notice is websphere server patch upgrade. Earlier I used to deploy it on WAS 7.0.0.1 and now it is WAS 7.0.0.41. There was a fix pack upgrade happened and now current version of WAS is 7.0.0.41. Not sure, if this really matters, but this is the only difference I could see between both work-spaces.
5 years ago
Here is my web.xml...


5 years ago
Hello All,

I'm having trouble with identifying issue with below code snippet. When I click the link "mypage", it throws servlet not found exception. File not found: /servlet/com.df.csImaging.DisplayImageServlet.
I've attached the project structure. The jsp page where below code resides is under WebContent. I'm not a web developer, but the servlet path seems little odd. The puzzle is, it was working all good since 2014 and all of a sudden it broke. I believe there is something wrong with the path specified in the showImage() function, but not sure how to point to the servlet under com.df.csImaging location. Can you please advise?




5 years ago
Hello All,

When I try to deploy my spring MVC web application on web sphere liberty server, it says application MyApp has not started in 30.002 seconds. There are no exceptions/errors on the eclipse console. However, the log shows below error. I tried googling but no clue. Any help is really appreciated. Thanks!

5 years ago
Hi, Thank you for the response. The WAS8.5 server pack (this package is different from what IBM supplies) I was provided with has only java 6 runtime. So, when I choose the WAS installation path, by default it takes jre 1.6 as server runtime. I tried to point the installed JRE location to my oracle's java8 path. However, it is not recognized in the server runtime.
5 years ago