santosh batta

Ranch Hand
+ Follow
since Jun 04, 2012
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

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
6 months 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.
8 months 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.
9 months 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?
9 months 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 )
9 months 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.
10 months 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.
10 months ago
Here is my web.xml...


10 months 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?




10 months 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!

1 year 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.
1 year ago
Hello All,

I've IBM's websphere 8.5.5.10 installed on my machine and I was provided with JRE 1.6 as server runtime during installation. I'm working on a project that uses Maven 4.0 as project management tool and spring 4.1.5 as MVC framework. We are using oracle's java 8 for development as the problem is obvious, that the code build using java 8 can not be deployed on my websphere server as its runtime is 1.6.

Is there an option that I can switch my websphere server's runtime from IBM's JRE 1.6 to Oracle's JRE 1.8? Your help is much appreciated. Thanks!
1 year ago
Hello All,

My application has n number of fields. When user enters the data and submits the form, the form will be submitted and some business logic will be executed on the server side. If there are any validation errors, will be shown on the page. What I want to achieve is, I want to show a default amount of $0.00 in the amount field when the page is loaded for the first time. Right now, I've something like this..



So, when the form first loads, the payments object gets the value from database and pre-populates the amount field with database value. I don't want that value here. I just want a default $0 and when user enters some amount, I want to post it to the database.
Please note that, the form scope is currently request and I cannot make it to session for other reasons.

Any help is really appreciated.
1 year ago
Hi All,

       I'm trying to implement search functionality on my portfolio (huge system in the back-end). The back-end services are ready to use. However, I have limited experience with front-end design part. I'm using jsps with spring forms. My requirement is that, the search page have number of radio buttons corresponding with inputs (text field). User can select any one the search criteria and enter the value for it and the page returns the details using the back-end services. I want to initially disable all the inputs. When user selects particular radio button, then enable the corresponding input. If user chooses another radio button and comes back to the first one, clear the field.

Is this possible using javascript or jquery or any other framework?

Please note that, the search criteria may have at least 20 or 25 fields.
1 year ago
Hello All,

I'm trying to configure my spring MVC app with java based configuration for the first time. Below is my web.xml



Below is my class to replace web.xml



Below is my spring xml..



And below is my class to replace spring configuration xml...



With xml based configuration, the JdbcTemplate has a reference to JndiObjectFactoryBean datasource as an argument. However, with Java based configuration, it says JdbcTemplate can not accept JndiObjectFatoryBean datasource as an argument. Can you please help me how to fix this? Also with xml configuration I was able to create the datasource bean as abstract="false". How can I implement the same with java config?
1 year ago