Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Sushil Jamsandekar

Greenhorn
+ Follow
since Aug 11, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sushil Jamsandekar

Why we should go for single page web development? Doing everything through javascript won't be difficult for maintenance?
Yes Marco, adapter implemetation looks good.

Thaks all for your help !!

-Sushil
7 years ago
Hi Ulf,

When I say replacing is not an option, I mean to say; the jar file is my company provided framework and we get newer versions once in a month or two. If we want to leverage the newer functionalities (use new verions through IVY) we need to keep in mind always to modify the jar file whenever there are changes required. Which may not be the right approach.

I will give more thoughts on Marco's suggestion.

Thanks for your reply.

Thanks,
Sushil

7 years ago
Due to different logic required, I need to change the functionality of one of the method. Replacing the class is not an option. We can not do that. Creating our own API would require duplication of lot of code same as jar file.
7 years ago
Hi All,

I have a third party JAR file in which I need to give different implementation for one class. So I have used the same package structure and same class name in my application. When I am using the class it is using the new implementation created but when I am using the sevices from jar, it seems it is using the jar class and not the one which I have created to hide it. Is there a possibility that they are getting loaded by different class loaders?

Thanks,
Sushil
7 years ago
Hi,

I am running below program and getting output as given below. As per my understanding static variables are not serialized, but it seems they are getting serialized. Where I am making a mistake?



And ouput of above program is

private - protected - public
private static - protected static - public static
private - protected - null
private static - protected static - public static

Thanks,
Sushil
8 years ago
In below code, ClassB is having method with same name as ClassA but different return type. As overriding requires return type should also be same, this method should act as different method. But it gives compile time error as "This instance method cannot override the static method from ClassA". Why cant it acts like a new method?
8 years ago
you can use intercepting filter to filter out the request. Check in session if user is logged in and prevent the request going to login page
9 years ago
In your web.xml try putting following elements inside <servlet></servlet>



Also you need to download the taglib : struts-html.tld and make its refarance in web.xml like


Am not sure if we can referance the tld directly with the uri you have provided.
10 years ago
Hi,

I am new to struts validator. I am using following form to hold the data that user enters.


tableData holds list of objects of another bean MyTableBean which has following attributes

I want to validate above values through validation.xml file. I have written following code in xml file

Above code is not validating the input, even i am not getting proper JavaScript on the front end.
Please let me know if i am doing anything wrong.
11 years ago
Hi,
I have two applications deployed in jboss. Initialy both creates separate log files, but afterwords only one log file gets all log messages.

I need to have separate log files. Please advice.
Thanks
11 years ago
Congratulations Dude !!!
12 years ago
Chinese vegetables
12 years ago
Use login-config.xml from conf folder and modify it as follows

<!-- Authentication mechanism for Your Application -->
<application-policy name = "XXXRealm">
<authentication>
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "optional">
<module-option name = "unauthenticatedIdentity">guest</module-option>
<module-option name = "dsJndiName">java:/DATASOURCE_NAME</module-option>
<module-option name = "principalsQuery">SELECT USER_ID FROM USER_TABLE WHERE USER_ID = ?</module-option>
<module-option name = "rolesQuery">SELECTDISTINCT USER_FLAG, 'Roles' FROM USER_ROLES WHEREUSER_ID = ?</module-option>
<module-option name="debug">true</module-option>
</login-module>
</authentication>
</application-policy>

Similarly you have to add the <security-constraint> and <login-config> elements in your web.xml file

I dont know if struts2 uses different types of datasource files, but i have used conventional Jboss datasource file which has following syntax

<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>x</user-name>
<password>y</password>
</local-tx-datasource>
</datasources>
12 years ago