Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

cow clarke

Greenhorn
+ Follow
since Nov 12, 2009
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 cow clarke

Just invoke a dos command will help you to do this.

Such as "net user add 'xxx' ......"

For I am not a native speaker of English. I can just explain it like this.
11 years ago
I don't think it is a problem.

First you shoul have the zip process ablility in the server size, then zip the files you want to send to the client, then open a binary output stream to transfer it.

That is all. what more J2SE include the ability to zip files.
11 years ago


Don't you think there is something wrong in the import statement. Here <%@ page import="HelloClass" %> shoud be some pakage.
11 years ago


Here show that You can locat doc information from API

The following is the information from this API, which I think is enough for you.

A custom Result type for sending raw data (via an InputStream) directly to the HttpServletResponse. Very useful for allowing users to download content.

This result type takes the following parameters:

contentType - the stream mime-type as sent to the web browser (default = text/plain).
contentLength - the stream length in bytes (the browser displays a progress bar).
contentDisposition - the content disposition header value for specifing the file name (default = inline, values are typically attachment;filename="document.pdf".
inputName - the name of the InputStream property from the chained action (default = inputStream).
bufferSize - the size of the buffer to copy from input to output (default = 1024).
allowCaching if set to 'false' it will set the headers 'Pragma' and 'Cache-Control' to 'no-cahce', and prevent client from caching the content. (default = true)
contentCharSet if set to a string, ';charset=value' will be added to the content-type header, where value is the string set. If set to an expression, the result of evaluating the expression will be used. If not set, then no charset will be set on the header
These parameters can also be set by exposing a similarly named getter method on your Action. For example, you can provide getContentType() to override that parameter for the current action.

Example:



if you do exactly as this statement, I think the problem will be sovled.
11 years ago
Well, on this point, You should not initial your Action just as Servlet 'cause that makes your Action code tight related to other code.
As this framework structure, you can put this stuff in the Interceptor.
11 years ago
I just want to test the sample struts2 app.

I put the blank-app into webapps directory and start tomcat 5.0.18, then on the console I've got the flowing message:

2008-7-2 15:24:58 org.apache.catalina.core.StandardContext start
ERROR: Error filterStart
2008-7-2 15:24:58 org.apache.catalina.core.StandardContext start
ERROR: Context [/struts2] startup failed due to previous errors

Please help me on this topic.
11 years ago
I would believe that it depends on the database system product you are using, which is not job of java program.
It would be helpful to check doc on apache as following:
http://logging.apache.org/log4j/1.2/apidocs/index.html

it is obverisly nothing to do with serlet.

You can use Class as a pramater or use String as a pramater, both are the same.
The times being called of this method depends on the web.xml config file on my opinion.
11 years ago
There are lots of projects on the web site of Apache.
Check the project of Common file upload which depends on IO project.
11 years ago
I am a tech support in china, but I don't like my job.
I wonder what is the path to a java programmer.
Any body can provide me a chance to have it become true?

I've read a lot in the past years about java.

Thanks alot.
11 years ago
I just wonder can "Class.forName("my.properties")" works well?
Class.forName is used to load Class dynamically, isn't it?
Do you mean that "properties" is just a java class definition?
11 years ago
That would be an strange idea, which I've never considered before, but I think it worth your effort to get it through.
Connect to a Servlet, I just wonder what you are doing by then. Do you mean that you would like to request some message from it just like an browser do, or something like web service?

Hoping for further discussion.
11 years ago
You might consider hidden input field.
Also you can use JSTL.
url rewriting can also be an other option.
11 years ago
Do you mean that you have a common class package, and you would like to import it into JSP file, or you've just needs to produce a java file only for the project, which means , you just needs to put your .class file into WEB-INF/classes.

So, it would be good to state your problem more clearly.
11 years ago
JSP