Kiran Kumar

Ranch Hand
+ Follow
since Jan 06, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Kiran Kumar

Hello,

I saw that <bean:write> has a "format" attribute for formatting dates and dollar values. But I didn't see similar thing for <html:text>. If my bean has a property called "amount" of type BigDecimal, and I want to display that as a <html:text> for the user to modify the value, How can I format it?

Also, if the user leaves the <html:text> field for BigDecimal as blank, I get an exception. So, is the solution to this is to make all formbean properties to be "String" type?


Thanks,
Kiran
18 years ago
Hello All,

I fixed that issue by instantiating ActionError object as it was null before. But even when the method returns a "false", I am being forwarded to the success page. Here's my action mappings in the config file.


Is there some other setting that I need to do?
Thanks,
Kiran
18 years ago
Hello All,

I am following the TwoField Pluggable Struts Validator example mentioned in dev guide of Struts.

I found that even when my fields are different, there are no errors shown on my JSP. So, I debugged and found that in the method of the validator class I wrote, the code abruptly stops at the line
"errors.add(field.getKey(), new ActionMessage("aerrors.twofields", value, value2));" and the page forwards to the success page.

Here's the method code


Am I doing anything wrong? The only difference between the example available on Struts code and this is that I replaced delegated errors.add(..) method with another one.

Thanks for your time,
Kiran
18 years ago
I wonder if there any tools to do that..
Paul,

We have a "production-like" environment too. In any case, I would like to know how this configuration change across the landscape maintained.

Thanks,
Kiran
Hello All,

It's a very common practice to have a different default logging level for different environments in your landscape, like DEBUG for Dev server, INFO for test and WARN for Production.

How can this be done? I don't want to edit the configuration file before deploying on to production server.

Thank you for your time,
Kiran
Hello All,
I am trying the following thing in a servlet and it doesn't work.



"/search" has been defined in struts-config.xml as an action tag. Also, ActionServlet of struts has been defined in the web.xml with a servlet mapping configured as "/forms/*".

I get the following error


Any pointers?

Thank you for your time,
Kiran
[ March 02, 2006: Message edited by: Kiran Kumar ]
18 years ago
Reid,

I know what you are talking about and unfortunately SAP's server is very highly coupled with its IDE and allows only rigid procedures to be followed without much flexibility. For now, I am planning to have the DTDs as internal to my DDs though it's a nasty solution.

Thanks,
Kiran
Reid,

Thanks for the reply.

Unfortunately, my app server doesn't provide me any documentation if it provides a provision of configuring catalog files. I use SAP Web AS 6.40, incase something strikes for someone reading this article. I guess having DTDs in the war/ear is the way to go. In that case, how does my <!DOCTYPE looks like?

I tried

code:
--------------------------------------------------------------------------------

<!DOCTYPE application SYSTEM "application_1_3.dtd">
and
<!DOCTYPE application SYSTEM "file://application_1_3.dtd">


--------------------------------------------------------------------------------



and putting application_1_3.dtd in my META-INF directory. But it fails.


Thanks,
Kiran
Pratheep,

I am talking about application.xml which is a DD for Enterprise Application and not web application project. I tried putting it in META-INF together with application.xml and used "application_1_3.dtd" as the system identifier. I also tried using "file://application_1_3.dtd" but nothing works.

Thanks,
Kiran
Chengwei,

Thanks for the reply!

I guess having DTDs in the war/ear is the way to go. In that case, how does my <!DOCTYPE looks like?

I tried


and putting application_1_3.dtd in my META-INF directory. But it fails.

Thanks,
Kiran
Hello Experts,

We all know that web.xml and application.xml have


code:
--------------------------------------------------------------------------------

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

--------------------------------------------------------------------------------



and

code:
--------------------------------------------------------------------------------

<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">

--------------------------------------------------------------------------------


.. respectively.

They reference the DTDs on java.sun.com. So, my application depends on the DTD's on an external site. How do I maintain fail over as I don't want my applications to fail incase the DTDs are temporarily down at java.sun.com.

I know that I can have the DTDs copied and put as inline DTDs in my deployment descriptors, but I was thinking about hosting these DTDs on my company's servers and making my deployment descriptors point to them. But, my deployment fails for some reason. Is there more configuration to do in this regard?

In my investigation I read about Catalog files etc. Is that the way to go? If yes, how is it done?

Any pointers appreciated!
Thanks in advance,
Kiran
Hello Experts,

We all know that web.xml and application.xml have



and

.. respectively.

They reference the DTDs on java.sun.com. So, my application depends on the DTD's on an external site. How do I maintain fail over as I don't want my applications to fail incase the DTDs are temporarily down at java.sun.com.

I know that I can have the DTDs copied and put as inline DTDs in my deployment descriptors, but I was thinking about hosting these DTDs on my company's servers and making my deployment descriptors point to them. But, my deployment fails for some reason. Is there more configuration to do in this regard?

In my investigation I read about Catalog files etc. Is that the way to go? If yes, how is it done?

Any pointers appreciated!
Thanks in advance,
Kiran
I found the answer myself. <antcall> with params is the solution.

Thanks anyways,
Kiran
19 years ago
Folks,

Is there a way a target can call another target? I know that we can use "depends", but I want to set few parameters before calling the target.

I would appreciate if someone knows how to do it.

Thanks,
Kiran
19 years ago