You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laurent MARQUEZ <la...@artal.fr> on 2003/08/08 14:56:09 UTC

RE : Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF

Hi,
Physically, i have /WEB-INF/common/index.jsp
In web.xml, i access with
 <welcome-file-list>
    <welcome-file>/common/index.jsp</welcome-file>
  </welcome-file-list>
  
Thanks.


-----Message d'origine-----
De : Kommineni, Sateesh (IndSys) [mailto:Sateesh.Kommineni@geind.GE.com]

Envoyé : vendredi 8 août 2003 14:42
À : Struts Users Mailing List
Objet : RE: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Hi,

   You can protect your JSPs in WEB-INF by giving the Doc Root to
/WEB-INF/folder_name and placing the JSP's in folder_name .
   But i don't know why you want WEB-INF in URL !!

   You can access them using /common/index.jsp   

-Sateesh

-----Original Message-----
From: Laurent MARQUEZ [mailto:laurent.marquez@artal.fr]
Sent: Friday, August 08, 2003 6:13 PM
To: struts-user@jakarta.apache.org
Subject: Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF


Hi,
Protect JSPs behind WEB-INF
I would like to call /WEB-INF/common/index.jsp
How can do that?

Best regards,
Laurent.


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


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information. If
the reader of this message is not the intended recipient, you are
notified that any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."


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


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


RE : Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF

Posted by Laurent MARQUEZ <la...@artal.fr>.
Good synthax is :
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<logic:redirect forward="welcome"/>


In Struts-config.xml:
 <global-forwards>
    <forward   name="welcome" path="/WEB-INF/common/index.jsp"/>
  </global-forwards>


But that's does'nt work too,
The borland Application Server return an error:
/WEB-INF/common/index.jsp does'nt exist.

Thanks for all, i will try other..


-----Message d'origine-----
De : Laurent PETIT [mailto:lpetit@sqli.com] 
Envoyé : vendredi 8 août 2003 16:49
À : Laurent MARQUEZ; 'Struts Users Mailing List'
Objet : Re: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Sorry, I was wrong with my action attribute on logic:redirect element,
but a simple look at the Struts doc should have suffice.

Please take a look at :
http://jakarta.apache.org/struts/userGuide/struts-logic.html#redirect

The forward or page attributes should hit the target for you.

My 0.02 EUR,

--
Laurent





----- Original Message -----
From: "Laurent MARQUEZ" <la...@artal.fr>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
"'Laurent PETIT'" <lp...@sqli.com>
Sent: Friday, August 08, 2003 2:37 PM
Subject: RE : Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


SORRY, i like using UPPERCASE.
Error is:
org.apache.jasper.JasperException: /index.jsp(2,0) Attribute action
invalid according to the specified TLD

-----Message d'origine-----
De : Laurent PETIT [mailto:lpetit@sqli.com]
Envoyé : vendredi 8 août 2003 16:30
À : Laurent MARQUEZ; 'Struts Users Mailing List'
Objet : Re: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Can't you be more explicit about the error ?

Did you try to view the source of the html produced ?

 ( And, oh, please, just DON'T CRY ! )

----- Original Message -----
From: "Laurent MARQUEZ" <la...@artal.fr>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
"'Laurent PETIT'" <lp...@sqli.com>
Sent: Friday, August 08, 2003 2:23 PM
Subject: RE : Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


#################################################################
In /WEB-INF/web.xml
#################################################################
  <welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
  </welcome-file-list>
#################################################################
In /index.jsp
#################################################################
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<logic:redirect action="welcome.do"/>
#################################################################
In /WEB-INF/struts-config.xml
#################################################################
<action    path="/welcome"
forward="/WEB-INF/common/index.jsp">
</action>
#################################################################
And in /WEB-INF/common/index.jsp
#################################################################
<html>
    <head>
        <title>Hello world!</title>
    </head>

    <body>
        <h2>Hello world!</h2>
    </body>
</html>
#################################################################
THAT DOES'NT WORK!



#################################################################
-----Message d'origine-----
De : Laurent PETIT [mailto:lpetit@sqli.com]
Envoyé : vendredi 8 août 2003 16:02
À : Struts Users Mailing List
Objet : Re: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Hi,

you can't do that.

Your welcome file must be accessible directly via
http://yourserver/yourwebappcontext/common/index.jsp, without involving
the pattern matching mechanism -> so it must not be in the WEB-INF
directory.

Just put a single index.jsp at the root of your webapp, with a
<logic:redirect action="welcome.do"/> (for example) in it, in order to
inlvove the Struts mechanism.

--
Laurent




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



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


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


Re: Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF

Posted by Laurent PETIT <lp...@sqli.com>.
Sorry, I was wrong with my action attribute on logic:redirect element, but a
simple look at the Struts doc should have suffice.

Please take a look at :
http://jakarta.apache.org/struts/userGuide/struts-logic.html#redirect

The forward or page attributes should hit the target for you.

My 0.02 EUR,

--
Laurent





----- Original Message -----
From: "Laurent MARQUEZ" <la...@artal.fr>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
"'Laurent PETIT'" <lp...@sqli.com>
Sent: Friday, August 08, 2003 2:37 PM
Subject: RE : Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


SORRY, i like using UPPERCASE.
Error is:
org.apache.jasper.JasperException: /index.jsp(2,0) Attribute action
invalid according to the specified TLD

-----Message d'origine-----
De : Laurent PETIT [mailto:lpetit@sqli.com]
Envoyé : vendredi 8 août 2003 16:30
À : Laurent MARQUEZ; 'Struts Users Mailing List'
Objet : Re: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Can't you be more explicit about the error ?

Did you try to view the source of the html produced ?

 ( And, oh, please, just DON'T CRY ! )

----- Original Message -----
From: "Laurent MARQUEZ" <la...@artal.fr>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
"'Laurent PETIT'" <lp...@sqli.com>
Sent: Friday, August 08, 2003 2:23 PM
Subject: RE : Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


#################################################################
In /WEB-INF/web.xml
#################################################################
  <welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
  </welcome-file-list>
#################################################################
In /index.jsp
#################################################################
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<logic:redirect action="welcome.do"/>
#################################################################
In /WEB-INF/struts-config.xml
#################################################################
<action    path="/welcome"
forward="/WEB-INF/common/index.jsp">
</action>
#################################################################
And in /WEB-INF/common/index.jsp
#################################################################
<html>
    <head>
        <title>Hello world!</title>
    </head>

    <body>
        <h2>Hello world!</h2>
    </body>
</html>
#################################################################
THAT DOES'NT WORK!



#################################################################
-----Message d'origine-----
De : Laurent PETIT [mailto:lpetit@sqli.com]
Envoyé : vendredi 8 août 2003 16:02
À : Struts Users Mailing List
Objet : Re: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Hi,

you can't do that.

Your welcome file must be accessible directly via
http://yourserver/yourwebappcontext/common/index.jsp, without involving
the pattern matching mechanism -> so it must not be in the WEB-INF
directory.

Just put a single index.jsp at the root of your webapp, with a
<logic:redirect action="welcome.do"/> (for example) in it, in order to
inlvove the Struts mechanism.

--
Laurent




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



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


No Bean Specified - error

Posted by Nick Vujasin <ni...@chikli.com>.
Has anyone been able to solve the following error when you submit your jsp.

Root cause of ServletException
java.lang.IllegalArgumentException: No bean specified
        at 
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.
java:837)
        at 
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934)
        at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
        at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
        at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java
:821)........

I have checked user groups and no one seems to have an answer - just the 
same question!  What causes this error and has anyone found a solution to it?
I am not new to struts but this error has me stumpted!

Thanks
Nick

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


RE : Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF

Posted by Laurent MARQUEZ <la...@artal.fr>.
SORRY, i like using UPPERCASE.
Error is:
org.apache.jasper.JasperException: /index.jsp(2,0) Attribute action
invalid according to the specified TLD

-----Message d'origine-----
De : Laurent PETIT [mailto:lpetit@sqli.com] 
Envoyé : vendredi 8 août 2003 16:30
À : Laurent MARQUEZ; 'Struts Users Mailing List'
Objet : Re: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Can't you be more explicit about the error ?

Did you try to view the source of the html produced ?

 ( And, oh, please, just DON'T CRY ! )

----- Original Message -----
From: "Laurent MARQUEZ" <la...@artal.fr>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
"'Laurent PETIT'" <lp...@sqli.com>
Sent: Friday, August 08, 2003 2:23 PM
Subject: RE : Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


#################################################################
In /WEB-INF/web.xml
#################################################################
  <welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
  </welcome-file-list>
#################################################################
In /index.jsp
#################################################################
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<logic:redirect action="welcome.do"/>
#################################################################
In /WEB-INF/struts-config.xml
#################################################################
<action    path="/welcome"
forward="/WEB-INF/common/index.jsp">
</action>
#################################################################
And in /WEB-INF/common/index.jsp
#################################################################
<html>
    <head>
        <title>Hello world!</title>
    </head>

    <body>
        <h2>Hello world!</h2>
    </body>
</html>
#################################################################
THAT DOES'NT WORK!



#################################################################
-----Message d'origine-----
De : Laurent PETIT [mailto:lpetit@sqli.com]
Envoyé : vendredi 8 août 2003 16:02
À : Struts Users Mailing List
Objet : Re: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Hi,

you can't do that.

Your welcome file must be accessible directly via
http://yourserver/yourwebappcontext/common/index.jsp, without involving
the pattern matching mechanism -> so it must not be in the WEB-INF
directory.

Just put a single index.jsp at the root of your webapp, with a
<logic:redirect action="welcome.do"/> (for example) in it, in order to
inlvove the Struts mechanism.

--
Laurent




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


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


Re: Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF

Posted by Laurent PETIT <lp...@sqli.com>.
Can't you be more explicit about the error ?

Did you try to view the source of the html produced ?

 ( And, oh, please, just DON'T CRY ! )

----- Original Message -----
From: "Laurent MARQUEZ" <la...@artal.fr>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
"'Laurent PETIT'" <lp...@sqli.com>
Sent: Friday, August 08, 2003 2:23 PM
Subject: RE : Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


#################################################################
In /WEB-INF/web.xml
#################################################################
  <welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
  </welcome-file-list>
#################################################################
In /index.jsp
#################################################################
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<logic:redirect action="welcome.do"/>
#################################################################
In /WEB-INF/struts-config.xml
#################################################################
<action    path="/welcome"
forward="/WEB-INF/common/index.jsp">
</action>
#################################################################
And in /WEB-INF/common/index.jsp
#################################################################
<html>
    <head>
        <title>Hello world!</title>
    </head>

    <body>
        <h2>Hello world!</h2>
    </body>
</html>
#################################################################
THAT DOES'NT WORK!



#################################################################
-----Message d'origine-----
De : Laurent PETIT [mailto:lpetit@sqli.com]
Envoyé : vendredi 8 août 2003 16:02
À : Struts Users Mailing List
Objet : Re: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Hi,

you can't do that.

Your welcome file must be accessible directly via
http://yourserver/yourwebappcontext/common/index.jsp, without involving
the pattern matching mechanism -> so it must not be in the WEB-INF
directory.

Just put a single index.jsp at the root of your webapp, with a
<logic:redirect action="welcome.do"/> (for example) in it, in order to
inlvove the Struts mechanism.

--
Laurent




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


RE : Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF

Posted by Laurent MARQUEZ <la...@artal.fr>.
#################################################################
In /WEB-INF/web.xml
#################################################################
  <welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
  </welcome-file-list>
#################################################################
In /index.jsp
#################################################################
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<logic:redirect action="welcome.do"/>
#################################################################
In /WEB-INF/struts-config.xml
#################################################################
		<action    path="/welcome"
			forward="/WEB-INF/common/index.jsp">
		</action>
#################################################################
And in /WEB-INF/common/index.jsp
#################################################################
<html>
    <head>
        <title>Hello world!</title>
    </head>

    <body>
        <h2>Hello world!</h2>
    </body>
</html>
#################################################################
THAT DOES'NT WORK!



#################################################################
-----Message d'origine-----
De : Laurent PETIT [mailto:lpetit@sqli.com] 
Envoyé : vendredi 8 août 2003 16:02
À : Struts Users Mailing List
Objet : Re: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Hi,

you can't do that.

Your welcome file must be accessible directly via
http://yourserver/yourwebappcontext/common/index.jsp, without involving
the pattern matching mechanism -> so it must not be in the WEB-INF
directory.

Just put a single index.jsp at the root of your webapp, with a
<logic:redirect action="welcome.do"/> (for example) in it, in order to
inlvove the Struts mechanism.

--
Laurent



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


Re: Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF

Posted by Laurent PETIT <lp...@sqli.com>.
Hi,

you can't do that.

Your welcome file must be accessible directly via
http://yourserver/yourwebappcontext/common/index.jsp, without involving the
pattern matching mechanism -> so it must not be in the WEB-INF directory.

Just put a single index.jsp at the root of your webapp, with a
<logic:redirect action="welcome.do"/> (for example) in it, in order to
inlvove the Struts mechanism.

--
Laurent


----- Original Message ----- /
From: "Laurent MARQUEZ" <la...@artal.fr>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Friday, August 08, 2003 1:56 PM
Subject: RE : Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Hi,
Physically, i have /WEB-INF/common/index.jsp
In web.xml, i access with
 <welcome-file-list>
    <welcome-file>/common/index.jsp</welcome-file>
  </welcome-file-list>

Thanks.


-----Message d'origine-----
De : Kommineni, Sateesh (IndSys) [mailto:Sateesh.Kommineni@geind.GE.com]

Envoyé : vendredi 8 août 2003 14:42
À : Struts Users Mailing List
Objet : RE: Seven Lessons from the Trenches: 4. Protect JSPs behind
WEB-INF


Hi,

   You can protect your JSPs in WEB-INF by giving the Doc Root to
/WEB-INF/folder_name and placing the JSP's in folder_name .
   But i don't know why you want WEB-INF in URL !!

   You can access them using /common/index.jsp

-Sateesh

-----Original Message-----
From: Laurent MARQUEZ [mailto:laurent.marquez@artal.fr]
Sent: Friday, August 08, 2003 6:13 PM
To: struts-user@jakarta.apache.org
Subject: Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF


Hi,
Protect JSPs behind WEB-INF
I would like to call /WEB-INF/common/index.jsp
How can do that?

Best regards,
Laurent.


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


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information. If
the reader of this message is not the intended recipient, you are
notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.
If you have received this message by error, please notify us
immediately, return the original mail to the sender and delete the
message from your system."


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


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



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


RE : RE : Seven Lessons from the Trenches: 4. Protect JSPs behind WEB-INF

Posted by Laurent MARQUEZ <la...@artal.fr>.
To access /WEB-INF/common/index.jsp

Web.xml:
<welcome-file-list>
    <welcome-file>/common/index.jsp</welcome-file>
</welcome-file-list>


That does'nt  work!
How can i do?

Best regard, 
Laurent.


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