Panda Mima

Greenhorn
+ Follow
since Aug 04, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Panda Mima

I want to have my own image in my applet to act as Button. So, I'll have different images -- for Enabled button status, Disabled, with Mouse Over It, when it is Pressed, etc.
But how to create it as a button? The only thing I found is to have regular Button (JButton) _inside_ of which we can have an image. But nothing more...
17 years ago
I have a GUI Java applet, which I want to be a desktop application also. Is there any way to handle mouse events ALL OVER THE SCREEN, but not only within your applet/Java window?
17 years ago
I have an applet running in browser window. It is a signed applet, because we need to work with local files.
What I need to do is to find out what is the X and Y on the screen of the current browser window, and what is the size of this browser window.

Is there are any way to do that?
17 years ago
How this "client" is detected? By IP? or how?
18 years ago
Hi there,

I know that to change default (30 minutes?) HttpSession expiration time out we put



into web.xml. So with this setting, the user's session will be automatically deactivated after x minutes of inactivity.

My question is: how Tomcat determines this "inactivity"? Does that mean time which user didn't access HttpSession object? or what exactly? Or this user didn't access any server's (okay, application's) page at all, even if page does not use HttpSession?

Please help!
18 years ago
Yeah, I know that, but I need to be able to execute WHOLE JSP page, which will be loaded from somewhere else (i.e. database).

It's not limited to logic:iterate or whatever else. Anything what can be in JSP.

Is it possible at all?
18 years ago
JSP
Do I understand it right that Tomcat is launching all filters, then servlets and even JSPs in the same thread? Of course it can launch other thread and it will handle other filters and servlets, but is there are any logic how it launches it's own new thread? Or can I force somehow to launch EACH filter, EACH servlet, EACH jsp in a new thread of Tomcat?

The problem is that some servlets I use they are thread sensitive, and I've noticed that calling in these servlets return the same value - http-8080-Processor25, which explains to me that all of them are working inside the same Tomcat thread.

But can I force somehow to launch everything in a new thread??

And what are the guarantee that if Filter will be launched in the Tomcat thread, that Servlets which are in chain with the Filter will be in the same thread???

Thanks!!!
[ August 17, 2006: Message edited by: Panda Mima ]
18 years ago
Hello there,

I have a problem.
My custom taglib which I am using on JSP page like:

...
<mytag:out arg="zzz"></mytag>
...



will give an output of something like

...
<logic:iterate ...>
<c:out value="12"/>
</logic:iterate>
...



So the output will use other taglibs.
They could be really a bunch of them, and this is kind of thing which is need to be changed.
Is it possible for taglib somehow force to re-processes page again?

Actually, what I need to do is somehow my JSP/Servlet/anything to generate _JSP_ page (page which will be using anything that any JSP can) and then process it.

Any ideas how to do that?

Thanks!!!
18 years ago
JSP
I have the following interface:


...
public interface MyIF {
public void methodX() throws RuntimeException();
public void methodY() throws MySpecialException();
}
...



and classes:


...
public class MyFirstImpl implements MyIF {
public void methodX() {
// note that there is no 'throws' in declaration of this method
}
public void methodY() {
// note that there is no 'throws' in declaration of this method
}
}
...



and


...
public class MySecondImpl implements MyIF {
public void methodX() throws RuntimeException() {
...
}
public void methodY() throws MySpecialException() {
...
}
}
...



Everything compiles fine. For me it's not very clear, why interface can declare method which throws some exception, and class can implement this method without throwing exception.

Actually I got that from Business Interface pattern explanation. Where your interface extending EJBObject needs to declare methods which are throwing RemoteException(), but in EJB (Bean) class you implement methods which are not throwing this exception. And in this pattern you create mediator interface with all these methods throwing exception, and extend this interface by your interface (EJBObject' one) and implement this interface by your EJB (Bean). And everything works!

Can somebody clarify me if there some rule about that or else?

Thanks!
18 years ago
Hello!

I have a servlet which gets request, processes and gives some specific output as response. I had to pre-parse request information for this servlet, so I've created filter (doFilter(...)). The problem now is that I need I need to be able to modify servlet's output too, but I cannot modify servlet.
It provides some text information, but I need to apply some kind of "after-filter" to it to change it specific way.

Is there are any "after" filter in J2EE?

Usual filter from what I understand helps to change/work with request _before_ servlet will get into it, but what if I need to do something right _after_ servlet?

Please help!
18 years ago
Hello there,

I've asked this question already in Spring's forum, but I'll need this for my old Struts application, so I am asking it here too.

I need to develop Web application and I do need to have this nice feature for bunch of HTML forms which prevents auto submissions.

I mean I need this like question "type number which you see on the image", and it will not allow you to submit with properly typed image.

So the question is -- is there are any specific separate open source framework for this feauture?

Any advice will be helpful!!! Thanks!
18 years ago
Hello there,


I need to develop Web application (I am using Spring for it) and I do need to have this nice feature for bunch of HTML forms which prevents auto submissions.

I mean I need this like question "type number which you see on the image", and it will not allow you to submit with properly typed image.

So the question is -- is there are any specific separate open source framework for this feauture, or may be Spring already has some kind of plugin for it?

Any advice will be helpful!!! Thanks!
Hi there!

Please advice me some good book on JCA (Java Connector Architecture) essentials and basics, which will cover all features like cci, etc.

Thank you!

P.S. Of course I understand it will not be free, I want to buy one! :-)
Hello guys!

I have few questions on Stateful Session Bean, I would be very thankful if somebody will help me out. Thanks!

Let's imagine that we have SFSB (Stateful Session Bean).
To access it we get his Home reference, then EJBObject reference.

Technically and practically we can then serialize it. Two ways for that.
First, we use getHandle() method of EJBObject interface to get serializable handler (because EJBObject is a stub, right) and then we serialize it. To de-serialize we do that and get Handler object, then we call getEJBObject() of Handle interface to get our actual EJBObject reference.
Second, we can just simply use HandleDelegate and it's methods which operate directly with EJBLocalObject and EJBObject.

We can then save serialized data into file or may be into field of database.
I believe I do not have mistakes till this point.
Now my questions.

#1

Once serialized and stored into file or database field client will exit. Will Application Server still keep SFSB alive? Will Application Server know that there is an active (is it considered to be an active?) reference to it? Will it maintain SFSB state? Or serialization into file/field of database is not considered to be an active reference? So is the only way out to put everything only into HttpSession?

#2

If still Application Server is going to keep SFSB and maintain it's state, so how long it will last? There could be a situation when client will never return, or will return in a week. Is there a possibility to limit SFSB and it's state maintaince for an Application Server for some period of time? Somehow? How? And what will happen if Application Server will restart? Will all SFSBs return back alive and with their old states?

#3

Let's imagine that everything works. But we have the following structure. One client (servlet it will be) will start interaction with SFSB, then will save a reference into file or field of database. Exit. And then other client (Swing application) will load reference from file or field of database and will want to work with the same SFSB with already created state (done before). Will this be possible? Or SFSB needs to same client? How SFSB understands something about it's client (same/not?)? What if it's a different servlet? Or the same servlet, but other (new) instance of it? Etc.?

Thank you very much for any help! I really need to find answers to these questions!


---
Panda Mima, pandamima@goowy.com