Mohammad Norouzi

Ranch Hand
+ Follow
since Jul 12, 2005
Merit badge: grant badges
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mohammad Norouzi

Hi

I have created a JarLoader class to load jar file at runtime. I want to keep different versions of jar files so I cache the JarLoader in a Map. The problem is when a jar file is loaded and I replace the jar file with a new file, the JarLoader can't find resources inside the jar file and it returns null.

It is strange because it was working before and all of a sudden it changed!!

Here is my jar loader:



The following is the test case I wrote:



I put a breakpoint on "is2" and replaced the jar with new one, and is2 then returned null and the same result for is3

I am wondered how come it was working before!

I also tested this URL "jar:file:/c:\\classpath/my-resources-0.0.1-SNAPSHOT.jar!/" isntead but no change!

Any idea is appreciated.
13 years ago
I find them when user clicks on that... so I can forward the request to a specific path

Ravi Kiran Va wrote:

but for the links, I dont want to change them because I already manage them with servlet filters.



How did you manage to do for the Links <a href="/pages/show.jsp" >Show</a> , how did you find out how many link tags are present in that Html or Jsp page ??


13 years ago
Thanks for your reply.

Let me explain with example. I have an application namely APP1 which is my own application:

http://www.server.com/myapp

in this app, I have a frame or DIV or anything to divide contents. A menu and a content. Menus contains some parameters and when user clicks on an item I build a request to another app namely APP2:

http://www.server.com/otherapp/store.jsp?q=value1

Then I obtain the result from above path and display it in content frame. Now this content contains images and links. but images refer to another path that doesn't exist in my application and they belong to APP2:

<img src="/images/logo.gif" />

and

<a href="/pages/show.jsp" >Show</a>

since these paths are relative the browser adds the context path to them (http://www.server.com/myapp)

I want to rewrite the image sources in a way yo refer to an absolute path which refers to real application like:

<img src="http://www.server.com/otherapp/images/logo.gif" />

but for the links, I dont want to change them because I already manage them with servlet filters.

how can I rewrite image sources?

thanks

Ravi Kiran Va wrote:the question is very confusing to me ( you tried to mention amnay things at a time)

Anyways as far as i understand , for your problem
I would prefer using Jsp Frames .

13 years ago
Hi

I have a servlet in which some part of my page will be displayed by sending a http request to another application (in different context).

Consider this content includes some images and styles and also some hyper links.

I want every hyper links being served through my own servlet. In order to do this, I wrote a filter to manage them.

But the problem is with resources like images. I want to load those resources from their own path. Could you help me how can I do that?

I saw many web applications that bring images and resources from other hosts and applications. Could you please give me an idea on this?
13 years ago
Hi

I have created a simple custom component but it doesn't work. No error is hapenning!

ContentAware.java:



ContentAwareTag.java:



content.tld:



faces-config:



I put <w:content/> in a page but it won't be rendered and the result will be the same <w:content/>

Can you please help me?

Thanks
13 years ago
JSF
Thanks Hany,

I changed the version of jsf-impl to 1.2_08 and it works now.

Thanks
13 years ago
JSF
Hi All,

I have a user interface with a number of links... Each link has some parameters. When user clicks on a link, I want to submit its request to another related URL and then show the response in my page. I don't want to redirect my page, I want to show the response in my own page.

Can you please help me on this?

Thanks
13 years ago
JSF
Hi Hany,
Sorry for being late.
Here is the versions:

JBoss Seam 2.2.0.GA
jsf-impl-1.1_02
jsf-facelet-1.1.14
el-api-1.0

and jsf-1.2 is installed by Weblogic 10.3

thank you

Hany Shafik wrote:Hi Mohamed,

probably you are using the wrong version of el jars. please post the version jsf, seam & el you are using.



13 years ago
JSF
Hi All,

I have a simple page using JSF. I deployed it in Weblogic 10.3. When it's going to display the home page I get following exception:

Can you please help me on this?



the page is as follow:

13 years ago
JSF

James Clarks wrote:Are you having any problems or is there something specific that you do not understand?

In regards to a methodology, it is a best practice to use the Unified Process (UP).

Good luck!



Sorry I used the word methodology in wrong place

I need a design so we can define a number of template for each kind of voucher and extract the information based on each template and create a voucher
Hi all
I am planning to get SCEA. can you advice me how to start and which resource do I have to use
I am a senior j2ee developer with 5 years of experience.

Thanks
Hi
First off let me explain our problem. We are developing a banking system in which there are many subsystems (deposit management, cash management, check management etc) and there is a core system in which accounting vouchers (aka Journal vouchers) are issued. each transaction may have different form of voucher. Each vouchers contains a header and a list of entries. header information are unique and constant but in each entry there are a number of amount (different types of amounts) and a number of parameters to use in voucher entry description

for example a withdraw transaction contains followings:

entry 1:
|---------- (type:amount) withdraw amount
|---------- (type amount) overdraft amount (if any)
|---------- (type amount) shortage amount (if any) // this is used when a linked account is defined for a deposit account
|---------- (type:desc param) deposit account number
|---------- (type:desc param) deposit account type

entry 2: (applicable if a linked account is used)
|---------- (type:amount) withdraw amount
|---------- (type:amount) shortage amount (if any) // if this linked account has connected to another linked account


this form of voucher is for withdraw transaction, and each transaction for each subsystem is different but the whole form always includes a list of amounts and description parameters like above

and we want to be able to change the form at runtime depending on the bank policy. so what design pattern or methodology you suggest? Also if you know a software or API to handle such problem please introduce it to me. This is a bit like report generators but we don't want to get into its complexity


I appreciate if you share your experience with me
Hello
We have configured a distributed transaction in our application server in order to support transaction between Java and .NET running in a service call. The .NET clients are served by webservices and we are using OpenJPA. The problem is that after a bunch of service calls the app. server cannot allocate more connection and it seems the acquired connections won't be released. However this problem will remove if we change it into normal transaction but in this case we can't join the transaction of .NET to Java systems.

I hope you share your experience on this

here is the error:
------
[#|2009-12-21T18:29:24.484-0500|SEVERE|sun-appserver9.1|com.sun.xml.ws.server.sei.EndpointMethodHandler|_ThreadID=27;_ThreadName=httpSSLWorkerThread-8080-6;_RequestID=a56fb08a-bf34-4f98-85eb-989ed77b23ab;|Exception thrown from bean; nested exception is: <openjpa-1.2.1-r752877:753278 fatal general error> org.apache.openjpa.persistence.PersistenceException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: <openjpa-1.2.1-r752877:753278 fatal general error> org.apache.openjpa.persistence.PersistenceException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.
<openjpa-1.2.1-r752877:753278 fatal general error> org.apache.openjpa.persistence.PersistenceException: Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.
-----

Thanks
14 years ago

Henry Wong wrote:What do you mean by "attributes are readable and writable"? Do you mean that the setters and getters are available? Or do you mean that it is defined in the mbeaninfo for the mbean?

Henry



yes attributes have both setter and getter methods and in MBeanAttributeInfo I set the readable and writable as true.
14 years ago
Hello
I had a simple example to getting start with JMX using Standard MBean with some basic attributes and everything was alright but now I have created a Model MBean with two attributes of type String and Integer. All the attributes and operations are shown and even my operation is working fine but those attributes' values are shown as Unavailable and I can't change them.

both attributes are readable and writable but the value text-box in jconsole is disabled and no change is applied.

Can anyboy help me out of this
14 years ago