Dumitru Husleag

Greenhorn
+ Follow
since Oct 01, 2003
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 Dumitru Husleag

Hi,

I want to have a non-resizeable JDialog. Can I do it simple without watching events ?
12 years ago
The following code solves the problem:

try{
obj.getClass().getMethod("seeOuter", null).invoke(obj, null);
}
catch(NoSuchMethodException nsmx){
System.out.println("NoSuchMethodException: "+nsmx.getLocalizedMessage());
}
catch(IllegalAccessException iax){
System.out.println("IllegalAccessException: "+iax.getLocalizedMessage());
}
catch(InvocationTargetException itx){
System.out.println("InvocationTargetException: "+itx.getLocalizedMessage());
}


On page 5 of this tutorial you can read this:

The method attribute of the <form> tag can be specified as "HEAD" to cause the
browser to send a HEAD request to the server.



According to W3C HTML40 Specs that is totally wrong:


<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->
<!ATTLIST FORM
%attrs; -- %coreattrs, %i18n, %events --
action %URI; #REQUIRED -- server-side form handler --
method (GET|POST) GET -- HTTP method used to submit the form--
enctype %ContentType; "application/x-www-form-urlencoded"
accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
name CDATA #IMPLIED -- name of form for scripting --
onsubmit %Script; #IMPLIED -- the form was submitted --
onreset %Script; #IMPLIED -- the form was reset --
accept-charset %Charsets; #IMPLIED -- list of supported charsets --
>

SCJP first,
Sorry
Q1: I am wondering what is the purpose of the taglib tag in web.xml
After all you can live without it. I mean to use a custom tag it is enough to use the taglib directive with a absolute uri like this
<%@ taglib uri="/WEB-INF/Sample.tld" prefix="S"%>
and it works.
So, can anybody tell me when to use <taglib> in web.xml ?
Q2: could you please state the right definition for the <uri> atribute of the taglib directive (absolute, relative: if relative then relative to what ?) ?
Also please state clearly the difference for the <taglib-uri> and <taglib-location> tags from the taglib tag from web.xml
Also please clear out <uri> tag from the .tld file.
And a last one: the specs confuses me because uses 'uri' like a 'url' when talking of 'relative uri' or 'absolute uri'.
[I am talking about JSP1.2 specs]
Thanx a lot
Hello Joseph,
One posible solution is to use a META refresh tag like this:
<META HTTP-EQUIV=Refresh CONTENT="10; URL=your_controller_address">
in a page that displays a progress bar.
It involves some work on the server side (launch the processing in another thread then send to client a page displaying the progress bar).
The Refresh makes the browser ask the server again tha page every 10 seconds (you can change it; it's just an example).
Search for a complete example.
Good luck
13 years ago
JSP

My problems is JSP pages are maintains Caches.


By the way: the way you express it makes me think you do not really understand caching. Browser or proxy caches your pages (html translated pages not JSP).
Caching might be a complex problem:
- it depends on users browser setting
- it depends on your web server settings
- it depends on HTTP headers (cahe related) you set in your page (check also your HTTP protocol version)
- it depends if there is a proxy between the server and browser
Read more.
13 years ago
JSP
Hello Jignesh,
Your problem is not on the server side but on the client side.
You need to set the right HTTP headers (look the HTTP spec) to force the browser to ask again the page and not use the cache (read more about cache and HTTP protocol).
You shoud use 'Expires, -1' and 'Control-cache, no-cache'
Keep also the 'cache-control, no-store' header if you want to reload from server your page when the user clicks Back button to reload the previous page.
I do not remenber exactly but IE 4 or 5 ignores completely one of these headers.
Good luck
13 years ago
JSP
Hello,
Try to put this tag in your page:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
13 years ago
JSP
I didn't have your problem but I recommend you all to use some tools to watch the http or https frames.
I worked with SnifferPro and CommView. I'm sure this will help you find the problem or at least getting closer to it.
Good luck
13 years ago
JSP
Your answer is corect Ortimus
Servlet mapping solved the problem:
...
<servlet-mapping>
<servlet-name>ParamsTest</servlet-name>
<url-pattern>/jspParamsTest</url-pattern>
</servlet-mapping>
...
and a call of this form
...
<form method="POST" action="./jspParamsTest">
...
Thanx alot Ortimus
Subject can be closed
I made a simple page that reads some information. And I set in web.xml a servlet:
....
<servlet>
<servlet-name>ParamsTest</servlet-name>
<jsp-file>/jspGetParams.jsp</jsp-file>
<init-param>
<param-name>initParam</param-name>
<param-value>initValue</param-value>
</init-param>
</servlet>
...
and in the page I call this:
...
Servlet init param : <%= getInitParameter("initParam")%>
...
wich gives me this
...
"Servlet init param : null "
I works right if I use a servlet class instead of a jsp page.
Question: What am I missing ?
What is the diference between the two methods of the HttpServletResponse ?
Tieyi , I tried also with NONE for transport-guarantee and it doesnt solve the problem.