MSD

Greenhorn
+ Follow
since Jan 22, 2000
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 MSD

Hi,
I have a JSP page(page1.jsp) that uses the jsp:include tag to include another JSP page(page2.jsp) in its body.
The problem I am facing is that when I access page1.jsp without initializing page2.jsp first, the JSP engine throws an error saying include call failed. Here's the corresponding entry in error log :-

However, when I access page2.jsp first and then access page1.jsp (in this case, page2.jsp has been initialized), the include call works fine.
I didn't have the same problem on iP4.1, but am now getting it after upgrading to iP6
Maybe there's some configuration that I need to do?
All help appreciated.
Thanx,
Mohammed.
16 years ago
JSP
Hey Dan,
Thanx a lot for the reply(even if it came after a year)
Well, the dialog needs to be modal, we don't want the user to do anything till a response comes back from the URL.
We finally had to use multi-threading for this one. What happens it that the modal dialog blocks the main thread. So instead, we initialize the dialog in a separate thread. Then, the main thread keeps running and the GUI is properly refreshed.
Thanx once again.
Regards,
Mohammed.
16 years ago
I think you can do this easily by using a method in JFrame. Let's say you have 'f' is object of JFrame :-

Hope this helps,
Mohammed.
17 years ago
I have a container (applet or frame) that contains a main panel in it. I set the layout of the main panel to BorderLayout and add another panel to the SOUTH and a component/panel to the CENTER. The bottom panel has FlowLayout and I add several labels to it. When i display this, only some lables are displayed. What I want to so is to be able to wrap the labels in the bottom pane. Also, can I resize the top container so the preferredSize of the two panels ?
The code :

All help thoroughly appreciated.
Thanx.
17 years ago
I have two remote applications communicating through port 9091. I want to write Logging mechanism that will allow me to log all the data exchange between these applications without disturbing them. It is required that I do not change any of the existing code for the applications to allow logging.
I was wondering if I could use a PushBackreader.
Any ideas appreciated.
Thanx,
Mohammed.
17 years ago
Hi,
I am trying to create a ProgressBar Dialog that will pop-up and display the progress when i try to access data from a url. I have a main frame from where i want to be able to pop-up this progress dialog. What happens is that the progress bar does not refresh till the data has been fetched from the url.
All help is appreciated.
Thanx.
18 years ago
Hi,
You are right. The output is null.
A font is assigned to a component when it first becomes visible. Since you never made the button visible, the font returned was null. Just add the following before System.out.println and it should work :

The default font for a component is picked up from system. On mine it is "dialog" (ie san serif), styl plain, size 12.
Hope this helps,
Mohammed

Originally posted by Helmut Lerch:
Hy all,

suppose the following Code:
<pre>
import java.awt.*;
public class TestFonts {
public static void main (String[] args) {
Frame f = new Frame();
Button bt = new Button();
f.add(bt);
System.out.println(bt.getFont());
}
}
</pre>
The Output is "null".



My Questions:

1.) When is a Font assigned to a Component if we don't use setFont(Font f)?

2.) Which "default" Font is used by a Component if we don't assign a Font to a Component by using setFont(Font f)? (And how can we get it?)

Thanks for help.


18 years ago
I have tried /abcd, which works and points to c:\abcd. I tried c:/abcd which didn't work.
jswdk home = c:\jswdk-1.0.1
context dir = c:\abcd
Further suggestions anyone?
18 years ago
Hi all,
I am trying to run a servlet using the jswdk engine. what i want to do is to put the servlets in a different direcory(d than that of the jswdk root (c:\jswdk-1.0.1).
Also, i tried putting the folder(abcd) in c: root and it works when i give a relative path(/abcd) for docBase in WebApplication tag, but the docBase is not taking an absolute path, ie /abcd works, but c:/abcd doesn't).
Any suggestions?
Thanx in advance
18 years ago
You can write a generic servlet by extending HttpServlet, though it doesn't make much sense.
The HttpServlet overrides the service() method of GenericServlet and reroutes the request to doGet() or doPost() method depending on the request type. So you can subclass the HttpServlet and override the service method to provide our own behaviour.
18 years ago
Well, the servlet engine is itself thredsafe, so you don't need to make your servlets threadsafe. IF you want only a single thread to access your servlet you can use the single-thread model (wel explained in Servlet Programming, O'Reilly).
Hope this helps.
18 years ago
Hi,
THanx for the info. I tried the links and well....they need some modification. I found tomcat at http://jakarta.apache.org/tomcat/ . The caucho server gave me a java.lang.NullPointerException!!! maybe their server nulled out !!
Any other WEB servers that have servlet/JSP engines inbuilt? oh yeah, and they need to be free for download (atleast for development)
Thanx again.
[This message has been edited by Mohammed Dohadwala (edited November 29, 2000).]
[This message has been edited by Mohammed Dohadwala (edited November 29, 2000).]
18 years ago
Hi all,
I am startin got learn JSP and servlets and have downloaded the jswdk engine. DO u know of nay better engines? I know of JRun...any other, which can act as a web server also.
Thanx in advance
18 years ago
Hi,
I guess a similar query is posted in this forum - http://www.javaranch.com/ubb/Forum7/HTML/000705.html
I think what u r doing is you are requesting the page using GET but doing database lookup in doPost. This error is usually generated if the resource at the given URI does not accept the requested method.
Hope this helps.
-Mohammed
18 years ago
Request line means the complete HTTP request that i ssent to the server. Requested URI refers to the location of the resource/application on the server.
Yep, the previous reply is on the dot. There are other cases. For example, if u refer to a servelt froma page using POST but in the servlet, u haven't provided a doPost, only doGet. I did get this error with JRun, don't know about other Servlet engines.
Hope this helps.
-Mohammed
18 years ago