Win a copy of Terraform in Action this week in the Cloud forum!

J.C. Bustamante

Greenhorn
+ Follow
since Jul 20, 2009
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by J.C. Bustamante

Hi James/Lester,

Thanks for the info. I will make good use of it!

Cheers,

Juan
11 years ago
Hi All,

I wanted to do simple encryption/decryption of a password field, and I was wondering what crypto libraries you could recommend that I can take advantage of. Does Apache have any? Please let me know.

Thanks,

Juan
11 years ago
My apologies,

The version of the JBoss AS is 5.1.0.GA, and the JBoss service is configured through MBeans.

Thanks,

Juan
11 years ago
Hi M. K.,

I found that the following link was very useful in helping isolate a different log file for my web application. Basically, you would have to add your own log4J configuration (xml or properties) file in your web application, and then code a Custom RepositorySelector which would retrieve the log4J configuration from your web application, and route the logging to your own file defined in the appender that you have configured. The log file should only have logs that are specific to your web application. Please see the link below.

http://community.jboss.org/wiki/log4jrepositoryselector

Hope this helps,

Juan
11 years ago
Hi All,

I have a JBoss Service that has a list of environment specific configurations which it places within the JNDI. My web application picks these configurations up from the JNDI when it initializes. However, if I want to change any of those configurations in the JBoss Service, then I would have to restart the JBoss Server in order for the web application to pick them up. What I would like to know is if there is a way to do any of the following:

1. Reinitialize the web application or web application context at runtime through JBoss.
2. Have the jboss service fire off a change event that could be picked up by a listener on the Web Application side which can then make the necessary updates.

If there are any other solutions, please let me know.

Thanks,

Juan
11 years ago
Hi,

I am wondering if I could build a SAR module that would take the properties, and place them within the JNDI as soon as the server starts. This way we can read the properties from the JNDI through our web application. I am hoping that this is not overkill. This way, the SAR is responsible only for configuration properties and getting them into the JNDI, and our web application would be responsible for running our application with configurations from the JNDI. If anyone has a different solution, please let me know.

Thanks,

Juan
11 years ago
Hi,

I wanted to know if there is a way we can separate the server configurations away from a web application so that we may be free to deploy into any JBoss server without having to worry about server configurations during build time.

This is the situation. We have built a web application that deploys to four separate JBoss instances, and each server has its own set of configurations that are required by the web application. Ideally, I would like to house those configurations on each JBoss server (ideally as a properties or xml), and somehow have the web application read those values (they would be string values similar to those from a properties file) from the server it is deployed against without having to build the application 4 different times. I have thought about using JNDI, but I do not know to implement it without having to place the values within the env-entry tags within the jboss-web.xml/web.xml which defeats the purpose of what I am trying to do.

Our application is a standard J2EE application that uses the following technologies.

- JDK 1.6
- JBoss 5.1.0.GA

If there are any suggestions, please let me know.

Thanks,

Juan
11 years ago
Hi,

According to the java servlet specification, the '*' wildcard only works through an implicit mapping (*.jsp) or at the end of a path mapping (/folder/*). Please see the following web.xml entry



The folders are organized by country (India, US, Mexico) and each of them has an articles folder within them. I want to be able to write a single entry so that it do not have to have a filter mapping for Canada, Mexico, and India and any other country that I choose to add. I tried /*/articles/* but that didn't work because the servlet specification doesn't allow for that kind of entry. I have also tried *.jsp, but I don't want filter 2 to execute for every request. Is there any other way to achieve this that doesn't involve multiple filter mappings?

Thanks,

Juan
11 years ago
Hi,

I am running 2 different applications on the same server domain, but they are both using the same js function to create the cookie. If I set the cookie through javascript in application 1 as mentioned in the code below, the cookie will have the following information.

Name: a_Cookie
Value: 1
Host: localhost
Path: /

When I try to set the same cookie in application 2, a new cookie is created with the following information.

Name: a_Cookie
Value: 2
Host: localhost
Path: /app2

How do I get it so that both applications update the same cookie and not create separate cookies? Is there a way?

Please see the JS code below

JS function



App1 JS call



App2 JS call



Any help is very much appreciated!

Thanks,

Juan
Hi Nishan,

I wanted to know if it was possible to substitute values in the web.xml as variables in a properties file. For example, if I had a property in the web.xml that has the value http://localhost:7001/blah then I want that value to be read from a properties file and not hardcoded in the web.xml when building. I believe that it could be done using Maven. I am looking into it now.

Thanks,

Juan
12 years ago
Hi all,

I wanted to know how do I externalize properties in web.xml? For example, if I wanted to set a login URL or a server name of sorts in the web.xml, is there a way that I could externalize that in a properties file? Please let me know.

Thanks,

Juan
12 years ago
I figured out the issue. Apparently I was using Tomahawk 1.15 which requires that you install the tomahawk taglib into your web application and define the location of the taglib in the web.xml through the faces.LIBRARIES param. However, if you use tomahawk 1.17 and greater, you do not require this.

Cheers,

Juan
12 years ago
JSF
Hi,

I am trying to run an application using Spring Webflow + JSF (My Faces Tomahawk), and I am able to successfully deploy the application on Tomcat 6 through eclipse. However, when I try to hit the flow, the page is not rendering properly. When I do a view source on the page, I noticed that the tomahawk tags haven't been translated into html. The following is my XHTML code.

itemList.xhtml



The following is my web.xml



Any help would be very much appreciated.

Thanks,

Juan
12 years ago
JSF
Hi,

I managed to get it working. Apparantly, I had to modify my project properties to include Apache Tomcat as the target runtime. After I made that change, it started working.

Cheers,

Juan
Hi,

I discovered that the value was null. Although this was not a simple application that I was trying it with and it may not entirely be the reason of why the value could be null. I will try it with a smaller application and let you know the results.

Cheers,

Juan
12 years ago