You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Honza Spurný <sp...@master.cz> on 2003/10/21 18:23:11 UTC

Problem with redirecting to SSL connection after requesting only application directory

Hi there,

I'm novice in struts and TomCat and
I have following problem:

1.)
I have web application (let's call it MyApp) that I would like to protect by
SSL connection, it means, that everything that is in
$TOMCAT_HOME$/webapps/MyApp/ I'd like to request on SSL secure connection.

2.)
I can established SSL connection on exactly files -- when I request for
example http://myServer/MyApp/index.jsp it is automatically redirect to
https://myServer:8888/MyApp/index.jsp (8888 is my SSL port) -- that OK.

3.)
In my web.xml file I specified that I want index.jsp to be as Welcome page
(since I have thought that this means, that when somebody send request only
for MyApp directory the page index.jsp is returned -- TomCat returns
http://myServer/MyApp/index.jsp for requested http://myServer/MyApp/ ...)

This was the introduction, and now the question:

- When I would like to access only http://myServer/MyApp/ the "Page not
found"-error is returned.
- When I would like to access https://myServer:8888/MyApp/ the
https://myServer:8888/MyApp/index.jsp page is returned (correctly, as was
described in paragraph 2.)
- When I would like to access http://myServer/MyApp/index.jsp the
https://myServer:8888/MyApp/index.jsp page is returned (correctly, the
connection was redirect to SSL as was described in paragraph 1.)

PLEASE, can anybody help me with this, since I need the index.jsp to be
accessible on SSL connection only by requesting the directory -- after the
request for http://myServer/MyApp/ is received, the TomCat should return
https://myServer:8888/MyApp/index.jsp page. This I'm not still able to aim.
PLEASE help me.

If any idea or any detailing question, feel familiar to ask. THX, very much.

Honza Spurny

------- Here is what i have in my MyApp/WEB-INF/web.xml -------
<web-app>
 <display-name>name</display-name>

 <security-constraint>
  <display-name>name</display-name>
  <web-resource-collection>
   <web-resource-name>name</web-resource-name>
   <url-pattern>/*</url-pattern>
   <http-method>GET</http-method>
   <http-method>POST</http-method>
  </web-resource-collection>

  <user-data-constraint>
   <transport-guarantee>INTEGRAL</transport-guarantee>
  </user-data-constraint>

 </security-constraint>

 <!-- Action Servlet Configuration -->
 <servlet>
  <servlet-name>action</servlet-name>
  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  <init-param>
   <param-name>config</param-name>
   <param-value>/WEB-INF/struts-config.xml</param-value>
  </init-param>
  <load-on-startup>2</load-on-startup>
 </servlet>

 <!-- Action Servlet Mapping -->
 <servlet-mapping>
  <servlet-name>action</servlet-name>
  <url-pattern>*.do</url-pattern>
 </servlet-mapping>

 <!-- The Welcome File List -->
 <welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
 </welcome-file-list>

 <!-- Application Tag Library Descriptor -->
 <taglib>
  <taglib-uri>/WEB-INF/app.tld</taglib-uri>
  <taglib-location>/WEB-INF/app.tld</taglib-location>
 </taglib>

 <!-- Struts Tag Library Descriptors -->
 <taglib>
  <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
 </taglib>

 <taglib>
  <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
 </taglib>

 <taglib>
  <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
 </taglib>

</web-app>


------- Here is what i have in my MyApp/index.jsp -------
<P>Welcome to index.jsp ...</P>


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


Date form bean property

Posted by Honza Spurný <sp...@master.cz>.
I have question about using Date object property in form bean. Is using
other type than String or int possible?

I want to have setter method which parses String to Date and a getter method
which returns Date object.

tom


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


Re: Problem with redirecting to SSL connection after requesting only application directory

Posted by Adam Hardy <ah...@cyberspaceroad.com>.

On 10/22/2003 11:27 AM Honza Spurný wrote:
> this has seem to a serious fault, BUT, after I changed it, it still works as
> before.  :(
>>>----------------------------------------------
>>>My /MyApp/WEB-INF/web.xml looks like this now:
>>>----------------------------------------------
>>>
>>><web-app>
>>> <display-name>Application</display-name>
>>>
>>> <!-- Action Servlet Configuration -->
>>> <servlet>
>>>  <servlet-name>action</servlet-name>
>>> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>>><init-param> <param-name>config</param-name>
>>><param-value>/WEB-INF/struts-config.xml</param-value> </init-param>
>>><load-on-startup>2</load-on-startup> </servlet>
>>>
>>> <!-- Action Servlet Mapping -->
>>> <servlet-mapping>
>>>  <servlet-name>action</servlet-name>
>>>  <url-pattern>*.do</url-pattern>
>>> </servlet-mapping>
>>>
>>> <!-- The Welcome File List -->
>>> <welcome-file-list>
>>>  <welcome-file>index.jsp</welcome-file>
>>> </welcome-file-list>
>>>
>>> <!-- Application Tag Library Descriptor -->
>>> <taglib>
>>>  <taglib-uri>/WEB-INF/app.tld</taglib-uri>
>>>  <taglib-location>/WEB-INF/app.tld</taglib-location>
>>> </taglib>
>>>
>>> <!-- Struts Tag Library Descriptors -->
>>> <taglib>
>>>  <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
>>>  <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>>> </taglib>
>>>
>>> <taglib>
>>>  <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
>>>  <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
>>> </taglib>
>>>
>>> <taglib>
>>>  <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
>>>  <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
>>> </taglib>
>>>
>>> <!-- SECURITY -->
>>>
>>> <security-constraint>
>>>  <web-resource-collection>
>>>   <web-resource-name>SecAppl</web-resource-name>
>>>   <url-pattern>/*</url-pattern>
>>>   <http-method>GET</http-method>
>>>   <http-method>POST</http-method>
>>>  </web-resource-collection>
>>>
>>>  <user-data-constraint>
>>>   <transport-guarantee>CONFIDENTAL</transport-guarantee>
>>>  </user-data-constraint>
>>> </security-constraint>
>>>
>>></web-app>
>>
>>I think I see your problem - the transport guarantee is spelt with one
>>more I than you have: CONFIDENTIAL

Hmm. Disappointing, it is, yes.

OK then - what strikes me as strange now is that you are not specifying 
any authentication method. Why would you want to encrypt the stuff, if 
you don't care who looks at it?

I think you should enter an auth-method and a login-config before you 
look any further.

By the way, this is getting to be really tomcat-related and not much to 
do with struts, so if you still have problems, I suggest you mark it as 
OT or move it to the tomcat list. Unless you can bring the discussion 
back on topic!

Adam


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


Re: Problem with redirecting to SSL connection after requesting only application directory

Posted by Honza Spurný <sp...@master.cz>.
Adam,

this has seem to a serious fault, BUT, after I changed it, it still works as
before.  :(

Honza Spurny

Adam Hardy wrote:
> On 10/22/2003 10:42 AM Honza Spurný wrote:
>> Hi,
>>
>> I've changed the order of elements... according to DTD file, but it
>> didn't help. The same problem aswas described in first mail
>> appears...
>>
>> Does anybody have any idea.
>>
>> Thanks.
>> Honza S.
>>
>> ----------------------------------------------
>> My /MyApp/WEB-INF/web.xml looks like this now:
>> ----------------------------------------------
>>
>> <web-app>
>>  <display-name>Application</display-name>
>>
>>  <!-- Action Servlet Configuration -->
>>  <servlet>
>>   <servlet-name>action</servlet-name>
>>
>>
>>
>>
>>
>>
>>  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>> <init-param> <param-name>config</param-name>
>> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param>
>> <load-on-startup>2</load-on-startup> </servlet>
>>
>>  <!-- Action Servlet Mapping -->
>>  <servlet-mapping>
>>   <servlet-name>action</servlet-name>
>>   <url-pattern>*.do</url-pattern>
>>  </servlet-mapping>
>>
>>  <!-- The Welcome File List -->
>>  <welcome-file-list>
>>   <welcome-file>index.jsp</welcome-file>
>>  </welcome-file-list>
>>
>>  <!-- Application Tag Library Descriptor -->
>>  <taglib>
>>   <taglib-uri>/WEB-INF/app.tld</taglib-uri>
>>   <taglib-location>/WEB-INF/app.tld</taglib-location>
>>  </taglib>
>>
>>  <!-- Struts Tag Library Descriptors -->
>>  <taglib>
>>   <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
>>   <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>>  </taglib>
>>
>>  <taglib>
>>   <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
>>   <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
>>  </taglib>
>>
>>  <taglib>
>>   <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
>>   <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
>>  </taglib>
>>
>>  <!-- SECURITY -->
>>
>>  <security-constraint>
>>   <web-resource-collection>
>>    <web-resource-name>SecAppl</web-resource-name>
>>    <url-pattern>/*</url-pattern>
>>    <http-method>GET</http-method>
>>    <http-method>POST</http-method>
>>   </web-resource-collection>
>>
>>   <user-data-constraint>
>>    <transport-guarantee>CONFIDENTAL</transport-guarantee>
>>   </user-data-constraint>
>>  </security-constraint>
>>
>> </web-app>
>
> I think I see your problem - the transport guarantee is spelt with one
> more I than you have: CONFIDENTIAL
>
> Try that.
> Adam


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


Re: Problem with redirecting to SSL connection after requesting only application directory

Posted by Adam Hardy <ah...@cyberspaceroad.com>.

On 10/22/2003 10:42 AM Honza Spurný wrote:
> Hi,
> 
> I've changed the order of elements... according to DTD file, but it didn't
> help. The same problem aswas described in first mail appears...
> 
> Does anybody have any idea.
> 
> Thanks.
> Honza S.
> 
> ----------------------------------------------
> My /MyApp/WEB-INF/web.xml looks like this now:
> ----------------------------------------------
> 
> <web-app>
>  <display-name>Application</display-name>
> 
>  <!-- Action Servlet Configuration -->
>  <servlet>
>   <servlet-name>action</servlet-name>
>   <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>   <init-param>
>    <param-name>config</param-name>
>    <param-value>/WEB-INF/struts-config.xml</param-value>
>   </init-param>
>   <load-on-startup>2</load-on-startup>
>  </servlet>
> 
>  <!-- Action Servlet Mapping -->
>  <servlet-mapping>
>   <servlet-name>action</servlet-name>
>   <url-pattern>*.do</url-pattern>
>  </servlet-mapping>
> 
>  <!-- The Welcome File List -->
>  <welcome-file-list>
>   <welcome-file>index.jsp</welcome-file>
>  </welcome-file-list>
> 
>  <!-- Application Tag Library Descriptor -->
>  <taglib>
>   <taglib-uri>/WEB-INF/app.tld</taglib-uri>
>   <taglib-location>/WEB-INF/app.tld</taglib-location>
>  </taglib>
> 
>  <!-- Struts Tag Library Descriptors -->
>  <taglib>
>   <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
>   <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>   <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
>   <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>   <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
>   <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
>  </taglib>
> 
>  <!-- SECURITY -->
> 
>  <security-constraint>
>   <web-resource-collection>
>    <web-resource-name>SecAppl</web-resource-name>
>    <url-pattern>/*</url-pattern>
>    <http-method>GET</http-method>
>    <http-method>POST</http-method>
>   </web-resource-collection>
> 
>   <user-data-constraint>
>    <transport-guarantee>CONFIDENTAL</transport-guarantee>
>   </user-data-constraint>
>  </security-constraint>
> 
> </web-app>

I think I see your problem - the transport guarantee is spelt with one 
more I than you have: CONFIDENTIAL

Try that.
Adam


-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


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


Re: Problem with redirecting to SSL connection after requesting only application directory

Posted by Honza Spurný <sp...@master.cz>.
Hi,

I've changed the order of elements... according to DTD file, but it didn't
help. The same problem aswas described in first mail appears...

Does anybody have any idea.

Thanks.
Honza S.

----------------------------------------------
My /MyApp/WEB-INF/web.xml looks like this now:
----------------------------------------------

<web-app>
 <display-name>Application</display-name>

 <!-- Action Servlet Configuration -->
 <servlet>
  <servlet-name>action</servlet-name>
  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  <init-param>
   <param-name>config</param-name>
   <param-value>/WEB-INF/struts-config.xml</param-value>
  </init-param>
  <load-on-startup>2</load-on-startup>
 </servlet>

 <!-- Action Servlet Mapping -->
 <servlet-mapping>
  <servlet-name>action</servlet-name>
  <url-pattern>*.do</url-pattern>
 </servlet-mapping>

 <!-- The Welcome File List -->
 <welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
 </welcome-file-list>

 <!-- Application Tag Library Descriptor -->
 <taglib>
  <taglib-uri>/WEB-INF/app.tld</taglib-uri>
  <taglib-location>/WEB-INF/app.tld</taglib-location>
 </taglib>

 <!-- Struts Tag Library Descriptors -->
 <taglib>
  <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
 </taglib>

 <taglib>
  <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
 </taglib>

 <taglib>
  <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
  <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
 </taglib>

 <!-- SECURITY -->

 <security-constraint>
  <web-resource-collection>
   <web-resource-name>SecAppl</web-resource-name>
   <url-pattern>/*</url-pattern>
   <http-method>GET</http-method>
   <http-method>POST</http-method>
  </web-resource-collection>

  <user-data-constraint>
   <transport-guarantee>CONFIDENTAL</transport-guarantee>
  </user-data-constraint>
 </security-constraint>

</web-app>


Adam Hardy wrote:
> On 10/22/2003 10:07 AM Honza Spurný wrote:
>> Hi Adam,
>>
>> please, could you help me more? I've checked TLD and didn't find
>> anything wrong... :-( Where is the problem?
>>
>> Thanks
>>
>> Adam Hardy wrote:
>>
>>>
>>> Hi Honza,
>>> I'm pretty sure that you have got to have the xml entities in your
>>> web.xml in a different from what you are using. I am surprised the
>>> web-app is loading at all. Have a look at the order the entities
>>> should
>>> be in, in the DTD specified at the top of the file.
>
> Sorry, looks like I accidentally missed out the main word I meant to
> say: the order that the elements appear in is important.


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


Re: Problem with redirecting to SSL connection after requesting only application directory

Posted by Adam Hardy <ah...@cyberspaceroad.com>.

On 10/22/2003 10:07 AM Honza Spurný wrote:
> Hi Adam,
> 
> please, could you help me more? I've checked TLD and didn't find anything
> wrong... :-( Where is the problem?
> 
> Thanks
> 
> Adam Hardy wrote:
> 
>>On 10/21/2003 06:23 PM Honza Spurný wrote:
>>>------- Here is what i have in my MyApp/WEB-INF/web.xml -------
>>><web-app>
>>> <display-name>name</display-name>
>>> <security-constraint>
>>>  <display-name>name</display-name>
>>>  <web-resource-collection>
>>>   <web-resource-name>name</web-resource-name>
>>>   <url-pattern>/*</url-pattern>
>>>   <http-method>GET</http-method>
>>>   <http-method>POST</http-method>
>>>  </web-resource-collection>
>>>  <user-data-constraint>
>>>   <transport-guarantee>INTEGRAL</transport-guarantee>
>>>  </user-data-constraint>
>>> </security-constraint>
>>> <!-- Action Servlet Configuration -->
>>> <servlet>
>>>  <servlet-name>action</servlet-name>
>>> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>>><init-param> <param-name>config</param-name>
>>><param-value>/WEB-INF/struts-config.xml</param-value> </init-param>
>>><load-on-startup>2</load-on-startup> </servlet>
>>> <!-- Action Servlet Mapping -->
>>> <servlet-mapping>
>>>  <servlet-name>action</servlet-name>
>>>  <url-pattern>*.do</url-pattern>
>>> </servlet-mapping>
>>> <!-- The Welcome File List -->
>>> <welcome-file-list>
>>>  <welcome-file>index.jsp</welcome-file>
>>> </welcome-file-list>
>>>
>>
>>Hi Honza,
>>I'm pretty sure that you have got to have the xml entities in your
>>web.xml in a different from what you are using. I am surprised the
>>web-app is loading at all. Have a look at the order the entities
>>should
>>be in, in the DTD specified at the top of the file.

Sorry, looks like I accidentally missed out the main word I meant to 
say: the order that the elements appear in is important.

-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


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


Re: Problem with redirecting to SSL connection after requesting only application directory

Posted by Honza Spurný <sp...@master.cz>.
Hi Adam,

please, could you help me more? I've checked TLD and didn't find anything
wrong... :-( Where is the problem?

Thanks

Adam Hardy wrote:
> On 10/21/2003 06:23 PM Honza Spurný wrote:
>> Hi there,
>>
>> I'm novice in struts and TomCat and
>> I have following problem:
>>
>> 1.)
>> I have web application (let's call it MyApp) that I would like to
>> protect by SSL connection, it means, that everything that is in
>> $TOMCAT_HOME$/webapps/MyApp/ I'd like to request on SSL secure
>> connection.
>>
>> 2.)
>> I can established SSL connection on exactly files -- when I request
>> for example http://myServer/MyApp/index.jsp it is automatically
>> redirect to https://myServer:8888/MyApp/index.jsp (8888 is my SSL
>> port) -- that OK.
>>
>> 3.)
>> In my web.xml file I specified that I want index.jsp to be as
>> Welcome page (since I have thought that this means, that when
>> somebody send request only for MyApp directory the page index.jsp is
>> returned -- TomCat returns http://myServer/MyApp/index.jsp for
>> requested http://myServer/MyApp/ ...)
>>
>> This was the introduction, and now the question:
>>
>> - When I would like to access only http://myServer/MyApp/ the "Page
>> not found"-error is returned.
>> - When I would like to access https://myServer:8888/MyApp/ the
>> https://myServer:8888/MyApp/index.jsp page is returned (correctly,
>> as was described in paragraph 2.)
>> - When I would like to access http://myServer/MyApp/index.jsp the
>> https://myServer:8888/MyApp/index.jsp page is returned (correctly,
>> the connection was redirect to SSL as was described in paragraph 1.)
>>
>> PLEASE, can anybody help me with this, since I need the index.jsp to
>> be accessible on SSL connection only by requesting the directory --
>> after the request for http://myServer/MyApp/ is received, the TomCat
>> should return https://myServer:8888/MyApp/index.jsp page. This I'm
>> not still able to aim. PLEASE help me.
>>
>> If any idea or any detailing question, feel familiar to ask. THX,
>> very much.
>>
>> Honza Spurny
>>
>> ------- Here is what i have in my MyApp/WEB-INF/web.xml -------
>> <web-app>
>>  <display-name>name</display-name>
>>
>>  <security-constraint>
>>   <display-name>name</display-name>
>>   <web-resource-collection>
>>    <web-resource-name>name</web-resource-name>
>>    <url-pattern>/*</url-pattern>
>>    <http-method>GET</http-method>
>>    <http-method>POST</http-method>
>>   </web-resource-collection>
>>
>>   <user-data-constraint>
>>    <transport-guarantee>INTEGRAL</transport-guarantee>
>>   </user-data-constraint>
>>
>>  </security-constraint>
>>
>>  <!-- Action Servlet Configuration -->
>>  <servlet>
>>   <servlet-name>action</servlet-name>
>>
>>
>>
>>
>>
>>
>>  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>> <init-param> <param-name>config</param-name>
>> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param>
>> <load-on-startup>2</load-on-startup> </servlet>
>>
>>  <!-- Action Servlet Mapping -->
>>  <servlet-mapping>
>>   <servlet-name>action</servlet-name>
>>   <url-pattern>*.do</url-pattern>
>>  </servlet-mapping>
>>
>>  <!-- The Welcome File List -->
>>  <welcome-file-list>
>>   <welcome-file>index.jsp</welcome-file>
>>  </welcome-file-list>
>>
>>  <!-- Application Tag Library Descriptor -->
>>  <taglib>
>>   <taglib-uri>/WEB-INF/app.tld</taglib-uri>
>>   <taglib-location>/WEB-INF/app.tld</taglib-location>
>>  </taglib>
>>
>>  <!-- Struts Tag Library Descriptors -->
>>  <taglib>
>>   <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
>>   <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>>  </taglib>
>>
>>  <taglib>
>>   <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
>>   <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
>>  </taglib>
>>
>>  <taglib>
>>   <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
>>   <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
>>  </taglib>
>>
>> </web-app>
>>
>>
>> ------- Here is what i have in my MyApp/index.jsp -------
>> <P>Welcome to index.jsp ...</P>
>
> Hi Honza,
> I'm pretty sure that you have got to have the xml entities in your
> web.xml in a different from what you are using. I am surprised the
> web-app is loading at all. Have a look at the order the entities
> should
> be in, in the DTD specified at the top of the file.
>
>
> Adam


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


Re: Problem with redirecting to SSL connection after requesting only application directory

Posted by Adam Hardy <ah...@cyberspaceroad.com>.

On 10/21/2003 06:23 PM Honza Spurný wrote:
> Hi there,
> 
> I'm novice in struts and TomCat and
> I have following problem:
> 
> 1.)
> I have web application (let's call it MyApp) that I would like to protect by
> SSL connection, it means, that everything that is in
> $TOMCAT_HOME$/webapps/MyApp/ I'd like to request on SSL secure connection.
> 
> 2.)
> I can established SSL connection on exactly files -- when I request for
> example http://myServer/MyApp/index.jsp it is automatically redirect to
> https://myServer:8888/MyApp/index.jsp (8888 is my SSL port) -- that OK.
> 
> 3.)
> In my web.xml file I specified that I want index.jsp to be as Welcome page
> (since I have thought that this means, that when somebody send request only
> for MyApp directory the page index.jsp is returned -- TomCat returns
> http://myServer/MyApp/index.jsp for requested http://myServer/MyApp/ ...)
> 
> This was the introduction, and now the question:
> 
> - When I would like to access only http://myServer/MyApp/ the "Page not
> found"-error is returned.
> - When I would like to access https://myServer:8888/MyApp/ the
> https://myServer:8888/MyApp/index.jsp page is returned (correctly, as was
> described in paragraph 2.)
> - When I would like to access http://myServer/MyApp/index.jsp the
> https://myServer:8888/MyApp/index.jsp page is returned (correctly, the
> connection was redirect to SSL as was described in paragraph 1.)
> 
> PLEASE, can anybody help me with this, since I need the index.jsp to be
> accessible on SSL connection only by requesting the directory -- after the
> request for http://myServer/MyApp/ is received, the TomCat should return
> https://myServer:8888/MyApp/index.jsp page. This I'm not still able to aim.
> PLEASE help me.
> 
> If any idea or any detailing question, feel familiar to ask. THX, very much.
> 
> Honza Spurny
> 
> ------- Here is what i have in my MyApp/WEB-INF/web.xml -------
> <web-app>
>  <display-name>name</display-name>
> 
>  <security-constraint>
>   <display-name>name</display-name>
>   <web-resource-collection>
>    <web-resource-name>name</web-resource-name>
>    <url-pattern>/*</url-pattern>
>    <http-method>GET</http-method>
>    <http-method>POST</http-method>
>   </web-resource-collection>
> 
>   <user-data-constraint>
>    <transport-guarantee>INTEGRAL</transport-guarantee>
>   </user-data-constraint>
> 
>  </security-constraint>
> 
>  <!-- Action Servlet Configuration -->
>  <servlet>
>   <servlet-name>action</servlet-name>
>   <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>   <init-param>
>    <param-name>config</param-name>
>    <param-value>/WEB-INF/struts-config.xml</param-value>
>   </init-param>
>   <load-on-startup>2</load-on-startup>
>  </servlet>
> 
>  <!-- Action Servlet Mapping -->
>  <servlet-mapping>
>   <servlet-name>action</servlet-name>
>   <url-pattern>*.do</url-pattern>
>  </servlet-mapping>
> 
>  <!-- The Welcome File List -->
>  <welcome-file-list>
>   <welcome-file>index.jsp</welcome-file>
>  </welcome-file-list>
> 
>  <!-- Application Tag Library Descriptor -->
>  <taglib>
>   <taglib-uri>/WEB-INF/app.tld</taglib-uri>
>   <taglib-location>/WEB-INF/app.tld</taglib-location>
>  </taglib>
> 
>  <!-- Struts Tag Library Descriptors -->
>  <taglib>
>   <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
>   <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>   <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
>   <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
>  </taglib>
> 
>  <taglib>
>   <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
>   <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
>  </taglib>
> 
> </web-app>
> 
> 
> ------- Here is what i have in my MyApp/index.jsp -------
> <P>Welcome to index.jsp ...</P>

Hi Honza,
I'm pretty sure that you have got to have the xml entities in your 
web.xml in a different from what you are using. I am surprised the 
web-app is loading at all. Have a look at the order the entities should 
be in, in the DTD specified at the top of the file.


Adam


-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


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