You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joe Dowd <jo...@hotmail.com> on 2000/11/08 18:54:31 UTC
searchable topic
A while back someone mentioned that there was going to be a way to search
thru past Struts developer questions/answers. If this facility exists would
someone be so kind to let me know how to access it.
Thanks
jd
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
File upload taglib doesn't compile under tomcat 3.2
Posted by Incze Lajos <in...@mail.matav.hu>.
This error comes from compiling the newly submitted upload tag
library: I think uses a servlet 2.3 method, so it should be
replaced by some equivalent legal 2.2 solution.
-----
[javac] Compiling 6 source files to /p/import/build/struts/library/classes
[javac] /p/import/jakarta-struts/src/share/org/apache/struts/upload/DiskMultipartRequestHandler.java:92: cannot resolve symbol
[javac] symbol : method getTempDir ()
[javac] location: class org.apache.struts.action.ActionServlet
[javac] String tempDir = servlet.getTempDir();
[javac] ^
[javac] 1 error
-----
incze
Re: The Struts question
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
structs@hotmail.com wrote:
> Hi There:
> I get a question regarding for the struts structure.
>
> We have existing web based software have our own structures.
>
> Root
>
> Bin
>
> Classes (Class files)
>
> Docs
>
> Src
>
> Web (JSP pages)
>
> Runtime
>
> Conf (Configuration files)
>
> Lib (Library)
>
> Logs
>
> But the struts will ask some structures like this.
>
> Root
>
> WEB-INF
>
> Classes
>
> Jsp
>
> Lib
>
> Session
>
> (JSP pages)
>
> META-INF
>
I am not sure whether the tabbing in the diagram above is correct or not, but
JSP pages in the struts example application, as well as most other web apps, are
under the directory you have labelled "Root", rather than being inside the
WEB-INF directory.
>
> The question comes down is, we want to use struts in our system, but we don'
> t want to change our system structures. I recognize the struts pickup the
> web.xml like default configuration files from WEB-INF directory, and
> hardcode action.xml in action.java. If anybody has similar condition like
> this, please help.
>
You might want to review the servlet specification, version 2.2, which you can
download from <http://java.sun.com/products/servlet/download.html>. This
document dictates the organization of files within a web application, and it's
done this way for some very good reasons.
For many of the Struts-specific issues related to file location (such as where
the "action.xml" file is found), there are usually initialization parameters for
the controller servlet that you can customize. However, you will generally want
to keep configuration files under the WEB-INF directory, because the servlet
container is not allowed to serve these files directly to clients. If you put
"action.xml" under the root directory, for example, a user could type:
http://www.yourcompany.com/yourapp/action.xml
and learn a lot of sensitive things about how your application is organized.
>
> I really looking forward to use this MVC structure in our software.
>
> Thanks
Craig McClanahan
Re: The Struts question
Posted by st...@hotmail.com.
Thanks, I will rethink about the structure a little bit.
Frank Ling
----- Original Message -----
From: "Pierre Métras" <ge...@sympatico.ca>
To: <st...@jakarta.apache.org>
Sent: Wednesday, November 08, 2000 2:08 PM
Subject: Re: The Struts question
> Hi
>
> Struts uses a structure like:
>
> /yourapplication
> JSP pages...
> other directories
> /WEB-INF
> /classes
> /lib
>
> One of the reasons, if I understand correctly, is that the server will
never
> answer to requests for files under the WEB-INF directory.
> For instance, if you put into the web.xml file, as initialization
argument,
> the password used to connect to your database, nobody can try to obtain
that
> file with a request like http://yourserver/yourapplication/WEB-INF/web.xml
> This architecture doesn't depend on the OS: WEB-INF is private to the
> application; files and directories upper are public.
>
> With your structure, you have to manage the permissions for the files and
> directories (OS specific), and someone can obtain your sources if he knows
> that they are stored in the /Src directory (and you forgot to apply
correct
> permissions or your OS doesn't support it).
>
> But all this must be justified in the specifications for servlets
> containers...
>
> Pierre Métras
>
> ----- Original Message -----
> From: <st...@hotmail.com>
> To: <st...@jakarta.apache.org>
> Sent: Wednesday, November 08, 2000 3:15 PM
> Subject: The Struts question
>
>
> > Hi There:
> > I get a question regarding for the struts structure.
> >
> > We have existing web based software have our own structures.
> >
> > Root
> >
> > Bin
> >
> > Classes (Class files)
> >
> > Docs
> >
> > Src
> >
> > Web (JSP pages)
> >
> > Runtime
> >
> > Conf (Configuration files)
> >
> > Lib (Library)
> >
> > Logs
> >
> > But the struts will ask some structures like this.
> >
> > Root
> >
> > WEB-INF
> >
> > Classes
> >
> > Jsp
> >
> > Lib
> >
> > Session
> >
> > (JSP pages)
> >
> > META-INF
> >
> > The question comes down is, we want to use struts in our system, but we
> don'
> > t want to change our system structures. I recognize the struts pickup
the
> > web.xml like default configuration files from WEB-INF directory, and
> > hardcode action.xml in action.java. If anybody has similar condition
like
> > this, please help.
> >
> > I really looking forward to use this MVC structure in our software.
> >
> > Thanks
> >
> >
>
>
Re: The Struts question
Posted by Pierre Métras <ge...@sympatico.ca>.
Hi
Struts uses a structure like:
/yourapplication
JSP pages...
other directories
/WEB-INF
/classes
/lib
One of the reasons, if I understand correctly, is that the server will never
answer to requests for files under the WEB-INF directory.
For instance, if you put into the web.xml file, as initialization argument,
the password used to connect to your database, nobody can try to obtain that
file with a request like http://yourserver/yourapplication/WEB-INF/web.xml
This architecture doesn't depend on the OS: WEB-INF is private to the
application; files and directories upper are public.
With your structure, you have to manage the permissions for the files and
directories (OS specific), and someone can obtain your sources if he knows
that they are stored in the /Src directory (and you forgot to apply correct
permissions or your OS doesn't support it).
But all this must be justified in the specifications for servlets
containers...
Pierre Métras
----- Original Message -----
From: <st...@hotmail.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, November 08, 2000 3:15 PM
Subject: The Struts question
> Hi There:
> I get a question regarding for the struts structure.
>
> We have existing web based software have our own structures.
>
> Root
>
> Bin
>
> Classes (Class files)
>
> Docs
>
> Src
>
> Web (JSP pages)
>
> Runtime
>
> Conf (Configuration files)
>
> Lib (Library)
>
> Logs
>
> But the struts will ask some structures like this.
>
> Root
>
> WEB-INF
>
> Classes
>
> Jsp
>
> Lib
>
> Session
>
> (JSP pages)
>
> META-INF
>
> The question comes down is, we want to use struts in our system, but we
don'
> t want to change our system structures. I recognize the struts pickup the
> web.xml like default configuration files from WEB-INF directory, and
> hardcode action.xml in action.java. If anybody has similar condition like
> this, please help.
>
> I really looking forward to use this MVC structure in our software.
>
> Thanks
>
>
The Struts question
Posted by st...@hotmail.com.
Hi There:
I get a question regarding for the struts structure.
We have existing web based software have our own structures.
Root
Bin
Classes (Class files)
Docs
Src
Web (JSP pages)
Runtime
Conf (Configuration files)
Lib (Library)
Logs
But the struts will ask some structures like this.
Root
WEB-INF
Classes
Jsp
Lib
Session
(JSP pages)
META-INF
The question comes down is, we want to use struts in our system, but we don'
t want to change our system structures. I recognize the struts pickup the
web.xml like default configuration files from WEB-INF directory, and
hardcode action.xml in action.java. If anybody has similar condition like
this, please help.
I really looking forward to use this MVC structure in our software.
Thanks