You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Caroline Jen <ji...@yahoo.com> on 2004/10/18 15:27:18 UTC

Where Is a Proper Place To Store TEMPORARY Files?

Now, I have this situation: While the web application
is running, I need a place to store an uploaded file
temporarily and then write this file out.

Where is the proper place to create a directory to
store a temporary file?

Is any place in the application OKay?


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Where Is a Proper Place To Store TEMPORARY Files?

Posted by Shinobu Kawai <sh...@gmail.com>.
Oops...

I meant
> I usually use System.getProperty("java.io.tmpdir").
     http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperties()

Best regards,
-- Shinobu Kawai

-- 
Shinobu Kawai <sh...@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Where Is a Proper Place To Store TEMPORARY Files?

Posted by Shinobu Kawai <sh...@gmail.com>.
Hi Caroline,

> Now, I have this situation: While the web application
> is running, I need a place to store an uploaded file
> temporarily and then write this file out.
> 
> Where is the proper place to create a directory to
> store a temporary file?
> 
> Is any place in the application OKay?
I usually use System.getProperty("java.io.tmpdir").
    http://localhost/java/jdk1.5.0/docs/api/java/lang/System.html#getProperties()

Best regards,
-- Shinobu Kawai

-- 
Shinobu Kawai <sh...@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Where's tlds?

Posted by Craig McClanahan <cr...@gmail.com>.
Sounds like you're upgrading from 1.0.2?  If so, struts-form was
replaced by struts-html (in 1.1), and struts-template was deprecated
in 1.1 and removed in 1.2 -- it's replaced by Tiles.

In both cases, upgrading should be fairly straightforward ... the new
libraries are generally supersets of what they replaced, so you need
only change your taglib directives.

Craig


On Tue, 19 Oct 2004 11:36:47 -0500, e-denton Java Programmer
<ja...@e-denton.com> wrote:
> Hi,
> 
> Where are the struts tlds supposed to be?
> 
>  I downloaded the struts zip (jakarta-struts-1.2.4) and the lib
> (jakarta-struts-1.2.4-lib),
> but I couldn't find struts-form or struts-template.
> 
> Thx.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Where's tlds?

Posted by e-denton Java Programmer <ja...@e-denton.com>.
Hi,

Where are the struts tlds supposed to be?

 I downloaded the struts zip (jakarta-struts-1.2.4) and the lib
(jakarta-struts-1.2.4-lib),
but I couldn't find struts-form or struts-template.

Thx.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Latest Struts Install Problem

Posted by e-denton Java Programmer <ja...@e-denton.com>.
Yep, using templates. Are they no longer supported?

----- Original Message ----- 
From: "James Mitchell" <jm...@apache.org>
To: "Struts Users Mailing List" <us...@struts.apache.org>; "e-denton Java
Programmer" <ja...@e-denton.com>
Sent: Monday, October 18, 2004 2:10 PM
Subject: Re: Latest Struts Install Problem


> Are you using the Template library?
> What version of Struts are you moving from?
> That class was deprecated and removed after 1.1.
>
> (BTW, it has been recommended to use Tiles instead of templates for about
2
> years now)
>
>
>
> --
> James Mitchell
> Software Engineer / Open Source Evangelist
> EdgeTech, Inc.
> 678.910.8017
> AIM: jmitchtx
>
> ----- Original Message -----
> From: "e-denton Java Programmer" <ja...@e-denton.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Monday, October 18, 2004 2:56 PM
> Subject: Latest Struts Install Problem
>
>
> > Hi,
> >
> > I just tried to install Struts Struts 1.2.4 and got the error below.
> >
> > Should I be using the binaries or library download (What's the
> difference?)
> > ?
> >
> > Thx.
> >
> > --------
> > exception
> >
> > javax.servlet.ServletException:
> org/apache/struts/taglib/template/InsertTag
> >  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
> >  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> >
>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
> > 56)
> >
> >
>
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
> > sor.java:388)
> >
> >
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
> >  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
> >  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
> >  javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> >
> > root cause
> >
> > java.lang.NoClassDefFoundError:
> org/apache/struts/taglib/template/InsertTag
> >  java.lang.Class.getDeclaredConstructors0(Native Method)
> >  java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
> >  java.lang.Class.getConstructor0(Class.java:1922)
> >  java.lang.Class.newInstance0(Class.java:278)
> >  java.lang.Class.newInstance(Class.java:261)
> >
> >
>
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
> > a:137)
> >
> >
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> > 07)
> >
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> >  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> >  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> >
>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
> > 56)
> >
> >
>
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
> > sor.java:388)
> >
> >
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
> >  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
> >  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
> >  javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Latest Struts Install Problem

Posted by James Mitchell <jm...@apache.org>.
Are you using the Template library?
What version of Struts are you moving from?
That class was deprecated and removed after 1.1.

(BTW, it has been recommended to use Tiles instead of templates for about 2
years now)



--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

----- Original Message -----
From: "e-denton Java Programmer" <ja...@e-denton.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, October 18, 2004 2:56 PM
Subject: Latest Struts Install Problem


> Hi,
>
> I just tried to install Struts Struts 1.2.4 and got the error below.
>
> Should I be using the binaries or library download (What's the
difference?)
> ?
>
> Thx.
>
> --------
> exception
>
> javax.servlet.ServletException:
org/apache/struts/taglib/template/InsertTag
>  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
> 56)
>
>
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
> sor.java:388)
>
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
>  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
>  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>
> root cause
>
> java.lang.NoClassDefFoundError:
org/apache/struts/taglib/template/InsertTag
>  java.lang.Class.getDeclaredConstructors0(Native Method)
>  java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
>  java.lang.Class.getConstructor0(Class.java:1922)
>  java.lang.Class.newInstance0(Class.java:278)
>  java.lang.Class.newInstance(Class.java:261)
>
>
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
> a:137)
>
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 07)
>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
> 56)
>
>
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
> sor.java:388)
>
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
>  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
>  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Latest Struts Install Problem

Posted by e-denton Java Programmer <ja...@e-denton.com>.
Hi,

I just tried to install Struts Struts 1.2.4 and got the error below.

Should I be using the binaries or library download (What's the difference?)
?

Thx.

--------
exception

javax.servlet.ServletException: org/apache/struts/taglib/template/InsertTag
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
56)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
 org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NoClassDefFoundError: org/apache/struts/taglib/template/InsertTag
 java.lang.Class.getDeclaredConstructors0(Native Method)
 java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
 java.lang.Class.getConstructor0(Class.java:1922)
 java.lang.Class.newInstance0(Class.java:278)
 java.lang.Class.newInstance(Class.java:261)

org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
a:137)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
07)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
56)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
 org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Where Is a Proper Place To Store TEMPORARY Files?

Posted by Craig McClanahan <cr...@gmail.com>.
On Mon, 18 Oct 2004 06:27:18 -0700 (PDT), Caroline Jen
<ji...@yahoo.com> wrote:
> Now, I have this situation: While the web application
> is running, I need a place to store an uploaded file
> temporarily and then write this file out.
> 
> Where is the proper place to create a directory to
> store a temporary file?
> 

The servlet container will have already created a temporary directory
for you ... one option would be to use that one:

    File tempDir = (File)
        getServletContext().getAttribute("javax.servlet.context.tempdir");
    File tempFile = new File(tempDir, "myfilename.tmp");

(Documented in section SRV.3.7.1 in the servlet spec.)

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org