Win a copy of Spring Boot in Practice this week in the Spring forum!

Mohammad Akon

Greenhorn
+ Follow
since Jul 17, 2007
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 Mohammad Akon

Hello,

I have two instances of JBOSS running on two different physical boxes (e.g. app1.internaldomain.com and app2.internaldomain.com) on the same network and JMS is configured to listen on port 10099. I also created a topic. On the servers' front there is a load balancer (lb.internaldomain.com) which is actually dispatching all the incoming request to the different boxes in a round robin fashion. I've visibility only to the load balancer not to any of the app servers (I can only send request to it). I used a sample application to send messages to the JMS queue. But I am getting the following error:

ERROR:


The configuration I made:


The client code


Any suggestion on the resolution will be highly appreciated.

Thanks.

Mohammad

P.S. My sincere apology if its a repost. In that case please forward me the original post.
10 years ago

James Sabre wrote:

Paul Clapham wrote:

However if you're trying to extract data from a log file on a timely basis, it would be more practical to modify the logging so that you didn't have to hack the log files. For example if you were using log4j you could use its appender which sends data to a socket, and write a socket listener which would then receive the logs directly.



The Log4j site has appenders for publishing to Multicast (unreliable but pretty fast) and for JMS (reliable). Of course one would need a JMS server to use JMS but there are several free ones out there.



But the problem is I do not have access to the available logger(s). Some the third party applications are generating the log files and I do not know what kind of logger they are using and cannot do any computation with them. All I have are the few log files. And yes, I'll be populating msgs to a remote JMS Queue for further msg consumption.
11 years ago

fred rosenberger wrote:would that work if someone edits the middle of the file? or is that something you don't need to worry about?



The updates are always appended to the end of file (they are log files to be precise).
11 years ago
Hello all,

I am developing an application that is monitoring the files (text files only) within a directory. The monitoring part is fine (thanks to threads on file watch). But is there an "efficient" way to capture the modifications made to those files (I need those changes to for reporting)? By efficiency I tried to mean....not going through the whole file again an again and looking for changes....may be using some sort of time-stamps/tag to identify last read line from the files and then read to the EOF?


May be there are other posts on the same topic but unfortunately I could not find them. Would appreciate if anyone can shed some light.

Thanks in advance.

--mmAkon
11 years ago
Hi All,

Not sure if this is the right place for this kind of post!!

I am using Lists.asmx web service within my Java Client to retrieve data ((list of files with their attribute such as Name, author, Date Modified, etc.)) from the sharepoint server. The attributes associated with each list item are displayed as a column header in the sharepoint server. For example:



Sharepoint allows the user to change the column headers, e.g. I can change column header "MyColumn" to "YourColumn".

To do this I am sending the following soap request:


<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/" >
<listName>Test Area</listName>
<viewName></viewName><query>
<Query xmlns:ns2="http://schemas.microsoft.com/sharepoint/soap/" xmlns="">
<OrderBy><FieldRef Name="FileLeafRef" /></OrderBy>
</Query>
</query>
<viewFields><ViewFields>
<FieldRef Name="ID" /><FieldRef Name="Title" /><FieldRef Name="Editor" /><FieldRef Name="Author" /><FieldRef Name="Modified" /><FieldRef Name="Created" /><FieldRef Name="UniqueId"/>
</ViewFields></viewFields>
<rowLimit>120</rowLimit>
<queryOptions>
<QueryOptions xmlns:ns2="http://schemas.microsoft.com/sharepoint/soap/" xmlns=""><IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns><ViewAttributes Scope="Recursive" />
<Folder>Test Area/</Folder>
</QueryOptions></queryOptions>
<webID></webID>
</GetListItems>
</soap:Body>
</soap:Envelope>Folder>Test Area/</Folder>
</QueryOptions></queryOptions><webID></webID>
</GetListItems></soap:Body>
</soap:Envelope>



And the response I am getting is something like:


<listitems xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<rs:data ItemCount="2">
…..
<z:row ows_GUID="{3C5844E1-4F98-4EE5-A789-1DCCA3E1BF3A}" ows_ContentType="DB Base Content Type" ows_BaseName="key facts 8 April" ows_Modified="2009-03-13 17:31:30" ows_EncodedAbsUrl="https://localhost/site/a.txt" ows__ModerationStatus="0" ows__Level="1" ows_ID="1" ows_owshiddenversion="3" ows_UniqueId="1;#{B7ED8578-227D-4202-B18A-369BFE5F28A0}" ows_FSObjType="1;#0" ows_Created_x0020_Date="1;#2008-12-12 16:18:48" ows_ProgId="1;#" ows_FileLeafRef="1;#a.txt" ows_FileRef="1;#site/Test Area/a.txt" ows_DocIcon="txt" ows_Editor="25657;#mohammad" ows_MetaInfo="1;#vti_parserversion:SR|12.0.0.6219 vti_modifiedby:SR|localhost\\mohammad ContentTypeId:SW|0x010100C777E5E4CC2845A982076CBB472177EA00D40C3F427C6AD44FA3313036C6D99659 vti_title:SW| ContentType:SW|DB Base Content Type test:SW|test vti_author:SR|localhost\\mohammad MyColumn:SW|comment1" ows_Last_x0020_Modified="1;#2009-03-13 17:31:31" />
............
</rs:data>
</listitems>



Now, even if I change "MyColumn" to "YourColumn", with the same soap request I am getting the same response, where as it should give "YourColumn".

Is there anything I can do to get the changed column header?

Any help is appreciated.

Thanks in advance.

-Mohammad
13 years ago
Hello kiran,

Thanks. In page1.jsp the attributes (firstName, lastName,....) these attributes are set by a servelet (e.g. previousServelet). SO I guess using "request.getAttribute();" to retrieve the values, in such case, is OK.

Then again, I want the attribute values should be alive or available to the forwarded servelet (someservelet).

Thanks again.

Mohammad
[ May 14, 2008: Message edited by: Mohammad Akon ]
14 years ago
JSP
Hi all,

My codes are as follows:

page1.jsp



Its printing the values request attributes

in my someservelet code I am trying to get the request attributes but its giving "null":



output comes....

First Name: null

. Apparently, the "request" attribute are not created at all.

Where am I making mistake? How to solve it?

Thanks in advance.

Regards,

Mohammad
14 years ago
JSP
Hi all.........

I have a table "URL" table (list of forwarding urls) in the database. is it possible to use the following codes in the jsps.....



My URLTABLE is something like this
id URLvariable URLvalue
1 google www.google.ca
2 yahoo www.yahoo.com
3 somewhere www.somewhere.com


Is it possible to use jstl like parameters within html:form tag?

If its not the right way then what it should be??

I want my application to forward to different URLs based on my choice...and I don't want to change it manually every time. I already wrote codes to update my "URLTABLE" table.

Thanks very much in advance.

Mohammad
[ May 13, 2008: Message edited by: Mohammad Akon ]
14 years ago
JSP
Thanks,

I browsed the link. But I need to know, more specifically, is there any web application available (in struts) that will mock the services of paypal. For example, checking the following

1. Credit card no (whether it is 16 digit, not the actual CC number)
2. Expiry Date (mock date)
2. Address, etc. (mock address)

on each purchase.

Thanks.

Mohammad
14 years ago
Hi

Has somebody used PayPal inside Struts web application? Is there any demo available with source??


Thanks for hints and examples

Mohammad
14 years ago
Hi all,

I am trying to get the cookie values to display on a page of my web app. It works fine until I try to get any text having a '@' character in it (e.g. 'abc@example.com' or 'a@a'). In such case it is printing the first few characters before the '@' symbol. Does anyone have any explanation/suggestions?

I used similar code like this:
cookie.jsp



setcookie.jsp


showcookievalue.jsp


Ideas or suggestions are highly appreciated.

Thanks.

Mohammad
[ April 10, 2008: Message edited by: Mohammad Akon ]
14 years ago
JSP
you have given too little info to go on. Can you post the code fragments?
14 years ago
Hello,

I want to add a UPS shipping rate calculator to my web application that should take client's ZIP (either in US or in Canada) and calculate the shipping rate for different services (e.g. ground shipping, next day shipping, express shipping, etc).


Any help/tip/suggestion/example is appreciated.

Thanks in advance.

-Mohammad
14 years ago
Hi, I am trying out an example. The codes & configurations are ----->

strusts-config.xml


fragment of editproduct.jsp :- It allows the user to edit a product in the database.


fragment of viewproduct.jsp


When Im loading the editproduct.jsp - its giving me the following error

When I am removing the unbalanced </logic:iterate> tag I am getting the following error:



I appreciate any help/suggestions.

Regards,

Mohammad
[ February 25, 2008: Message edited by: Mohammad Akon ]
14 years ago
Actually I am trying to create a edit profile page.....

my configurations are as follows:

struts-config.xml


EditProfileForm.java


EditProfileAction.java


editProfile.jsp


While trying to load the page I am getting the following error:


[ February 19, 2008: Message edited by: Mohammad Akon ]

[ February 19, 2008: Message edited by: Mohammad Akon ]
[ February 19, 2008: Message edited by: Mohammad Akon ]
14 years ago