Mario Rendon

Greenhorn
+ Follow
since Jul 11, 2002
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 Mario Rendon

It's Interesting the Discussion ..
but first let's see the facts.
if you declare a class Abstract it only means to TAG such class Abstract so it's no posible to make an instance of it.

nevertheless where it comes from (all classes come from somewere remember the Object class is parent of all classes)
the usage of an abstract class depends on what you are trying to inforce..
declaring a class abstract just forces anyone that would like to use it; to Extend such class and not ot use directly..

besides declaring a class abstract you could optionaly declare Abstract methods.
so such methods MUST be implemented.

so you got 2 sentences an abstract class. and abstract methods on it ..
so depends on what are you objectives.
abstract would be just an abstraction or in other word just an idea wich you leave to other programers to extend..
in OO Programming you use in each class 2 diferent definitions.
1.- and interface (i would use a struct to use such class)
2.- and an implementation (in the case of concrete classes)
so abstract classes are in the middle of such definitions they are an interface and a partially implemented class.
Yep also you could see that
in the code there are 2 types of Names in each object.
1.- A common Name
(used when you use one of this
import
a class is in java.lang
a class in Default package
a class in the Current Package
an example .
Properties prop= new Properties();
//You should import java.util.Properties;

2.- a Fully cualified Name
it includes the package_name.CLASSNAME;
(you don't use imports)
java.lang.String s1 = new java.lang.String();

Note:
there are 3 imports by default
java.lang.*
(default package)
(current package)
that's why you use
String s1= new String();
without any Import ..

Grettings
I have Recently passed Sun certified Java 2 Platform with a 79 % i 'm thinking to take the Developer's Examination ..
any comments
Grettings
Mario
18 years ago
in My company e have recently bougth a Router that has Firewall capabilities.
have any of you ever experienced with security implemented con Router devices.

the device is a Cisco 1721 Router.
Grettings
19 years ago
Tim:
interesting .. of the 4 ways that tomcat can handle Login .
where i could get more information??

i was about to suggest that Apache got's the schema you were saing but i didn't know that tomcat could use those also .
grettings ..
19 years ago
it depends on the Client not in the
server .
i mean .
if you put context type, what you are doing is to suggest the browser wich application to use .
if the browser doesn't know the application you are suggesting then opens the "Save as" window.
if the browser find's how to manage the info you are sending according to the context type you're putting
then it tries to manage it .
19 years ago
David
the response to your problem with your serlvet resides in the web.xml File .
first
you have to know a lttle of XML (Extended Markup Language ) to understand it; but is quite simple as html does ..

the web.xml is a place where you put and describe each servlet in your web application so...

look for the <Servlet Tag ..
and yo will realize that this tag gives a servlet a name; and also search for the ...
<servlet-mapping Tag and it maps . (relates) the servlet (defined previously) to the URL in the web application ..

so your URL will end like this..

http://localhost:8080/webappsname/mapping
Grettings
19 years ago
Sorry if im tooo easy with this explanation..

Fist ..
in old web server ( with servlet usage)
there used to be a servlet directory where all the servlets ( as cgi used to ) shoud be putted ..

a special directory where all the servlets should go .
and of course the same is Servlet..
later with the comming of the "Application Servers" there's no such directory ..
there's sometig called servlet context . and
there's a new role called WEB Application .
the web application consists in a structure you should follow to make your servlets and your whole application to work .

the structure ( you should create) is the following .
WEB-INF
|______classes
"CASE SESITIVE!"
iside of WEB-INF directory there should be a web.xml .
wich maps . URL's to your servlet classes .
wich are putted under the classes directory

if you use packages you sould also use subdirectories as you use in java ..
in older posts they explain the web.xml contents .

so put your files under the correct structure and
enjoy your sevlets ..
Grettings . .

PD.
Application servers are the context creators for your servlet.
yo could use tomcat it's free and comes with some web applications you coudl use as example

www.apache.org
19 years ago
Mike's Solution is the one i addopted but unfortunatelly if the client press the stop button before the file is uploaded . then in your temp dir there will be some garbage and you have to include a Garbage colection schema ..
Mike have yod had that problem ??
19 years ago
well..
this is a problem with the
different browsers..

1.- Solution to netscape. and any browsers that handle mimetipes Correctly ..
(except IE in some versions )

there's a mapping betwen mimetype and application that Handles it ..
as an example:
open Netscape choose Edit Menu and choose preferences.
in the Applications Part you will find a looong list of MimeTypes Extensions and the program that is used to handle the document..
well when i told you to use "Application/download" the browser found no application to handle the file so it prompts you what to do with the file ..
so problem solved ..
but in the case you want the REAL application to handle the file you should use the REAL mimetype the file you are sending
so if you want to force client download a pdf format file you sould use the mymetype "application/download" but if you desire to open the file you sould use "application/pdf" as the mimetype ..

IE has a different way to use mimetypes .
mymetipes are located inside of the Operating system . so you would find it on Control panel or IE's preferences depending wich version of SO your cleints got (9598 ME 2000 etc.)
IE would use Mimetypes only if the URL hasn't extension. as .exe .html or.txt if the URL has an extension it would give precedence to extension rather than the Mimetype .. in your case the sevlet Has not extension so Probably IE would use Mimetypes ..

as a conclusion is "browsers" option what to to with the file you are sending
you can "Suggest" the Browser what to do with the file using mimetypes; but at the end the browser's option what to do with the file so you can't
Assure in the server side how the Browser would handle the data you are sending
Mimetypes is a Declaration of the type of data you are sending; but not inforces how to manage it..

grettings ..
19 years ago
Extension to David ..
if you use request.encodeURL()
in a client that has cookies enabled.
the encodeURL() won't work ..
the pedestrian solution would be to encode your own URL
using request.getSession().getID()
and use it to encode the URL manually..

your URL would be as follows
ORIGINAL_URL+ ";jsessionid="+ request.getSession().getId();
19 years ago
Also you should check that in the jumps to and from servlets & JSP you are ussing
request.getContextPath()
since if you change from
http://localhost
to
http://127.0.0.1
os someting similar you would be prompted for autentication again
19 years ago
you have to change your content type..

the browser you are using get's the content type "text/plain" and handles it .
just change your this line in your code..

response.setContentType("text/plain");

to response.setContentType("application/download");
19 years ago
you should verifythat the jar files you are ussing in your classpath
in this case "C:\j2sdkee1.3.1\lib\j2ee.jar" contain the Package you are trying to import..
use winzip to see the contents of the Jar file ..
as it were a simple zip file ..

if you don't find the javax.servlet. package
just include the Jar that has it..
19 years ago