struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: .do as welcome-file
Date Wed, 24 Sep 2003 09:01:38 GMT
You can configure action mappings without form beans - just leave out 
the name attribute.

However you would probably be better off using a filter to check for 
login status.

Adam

On 09/24/2003 10:19 AM shishir.katdare@ubs.com wrote:
> Can some one tell me if the action main.do as defined as 
> <jsp:forward page="/main.do" />
> be achieved without using the action form or its actually a forward thats an action class
without use of form bean ?
> as i need to use the same for checking if the user is already logged in and if not then
forward to the login page ?
> -----Original Message-----
> From: Adam Hardy [mailto:ahardy.struts@cyberspaceroad.com]
> Sent: 23 September 2003 15:16
> To: Struts Users Mailing List
> Subject: Re: .do as welcome-file
> 
> 
> for security's sake I don't have any JSPs outside of WEB-INF, so this is 
> the only solution, unless I wanted to use a http-redirect, which I don't.
> 
> Adam
> 
> On 09/23/2003 03:58 PM Menke, John wrote:
> 
>>I guess it's all the same as long as it works.  You solution might be
>>simpler actually no web.xml configs for the servlet
>>
>>-----Original Message-----
>>From: Christian Bollmeyer [mailto:java@christianbollmeyer.de]
>>Sent: Tuesday, September 23, 2003 9:52 AM
>>To: Struts Users Mailing List
>>Subject: Re: .do as welcome-file
>>
>>
>>I usually just put s/th like this in my index.jsp
>>
>><jsp:forward page="/main.do" />
>>
>>and that's it. Whats the possible advantage
>>of using a redirect or other solutions that
>>also require a physical file in the root dir?
>>
>>-- Chris
>>
>>----- Original Message -----
>>From: "Menke, John" <John.Menke@acs-inc.com>
>>To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
>>Sent: Tuesday, September 23, 2003 3:28 PM
>>Subject: RE: .do as welcome-file
>>
>>
>>
>>
>>>Here's a trick to get an action to execute as home page in your webapp
>>>without having to
>>>do the jsp redirect.
>>>
>>>Put a file called webapp.launch in the root directory of your webapp
>>>
>>>Then configure these settings in your web.xml
>>>
>>>
>>><servlet>
>>>   <servlet-name>redirector</servlet-name>
>>>   <servlet-class>yourpackage.Redirector</servlet-class>
>>></servlet>
>>>
>>><servlet-mapping>
>>>   <servlet-name>redirector</servlet-name>
>>>   <url-pattern>*.launch</url-pattern>
>>></servlet-mapping>
>>>
>>>package yourpackage;
>>>
>>>import javax.servlet.*;
>>>import javax.servlet.http.*;
>>>
>>>import java.io.*;
>>>import java.util.*;
>>>
>>>
>>>/**
>>>*  Redirector to start application on browse to root url
>>>*
>>>
>>>*/
>>>public class Redirector extends HttpServlet {
>>>
>>>   /**
>>>    *  Stub method
>>>    */
>>>   public void destroy() {
>>>   }
>>>
>>>
>>>   /**
>>>    *  Forward the user to start page of webapp
>>>    *
>>>    *@param  request
>>>    *@param  response
>>>    *@exception  ServletException
>>>    *@exception  IOException
>>>    */
>>>   public void doGet(HttpServletRequest request, HttpServletResponse
>>>response)
>>>     throws ServletException, IOException {
>>>       response.sendRedirect("home.do");
>>>
>>>   }
>>>
>>>
>>>   /**
>>>    *  Description of the Method
>>>    */
>>>   public void init() throws ServletException {
>>>   }
>>>}
>>>
>>>-----Original Message-----
>>>From: Adam Hardy [mailto:ahardy.struts@cyberspaceroad.com]
>>>Sent: Tuesday, September 23, 2003 9:05 AM
>>>To: Struts Users Mailing List
>>>Subject: Re: .do as welcome-file
>>>
>>>
>>>I can confirm that this hack works for tomcat. Create the dummy file
>>>start/start.do and tomcat will be happy, and you will still get the
>>>actual struts mapping.
>>>
>>>On 09/23/2003 02:06 PM Mainguy, Mike wrote:
>>>
>>>
>>>>I haven't tried it, but I've been told that, in tomcat, if you create a
>>>
>>>file
>>>
>>>
>>>>with that exact name it will work properly.  Evidently you cannot
>>
>>specify
>>
>>
>>>a
>>>
>>>
>>>>servlet path as a welcome file.
>>>>
>>>>-----Original Message-----
>>>>From: Adolfo Miguelez [mailto:pelly69@hotmail.com]
>>>>Sent: Tuesday, September 23, 2003 7:00 AM
>>>>To: struts-user@jakarta.apache.org
>>>>Subject: .do as welcome-file
>>>>
>>>>
>>>>Does anyone has figured out how to do this?
>>>>
>>>><welcome-file-list>
>>>><welcome-file>/start/start.do</welcome-file>
>>>></welcome-file-list>
>>>>
>>>>I am not able to make it work.
>>>>
>>>>TIA,
>>>>
>>>>Adolfo.
>>>>
>>>>_________________________________________________________________
>>>>Protect your PC - get McAfee.com VirusScan Online
>>>>http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>>
>>>>
>>>>This message and its contents (to include attachments) are the property
>>
>>of
>>
>>
>>>Kmart Corporation (Kmart) and may contain confidential and proprietary
>>>information. You are hereby notified that any disclosure, copying, or
>>>distribution of this message, or the taking of any action based on
>>>information contained herein is strictly prohibited. Unauthorized use of
>>>information contained herein may subject you to civil and criminal
>>>prosecution and penalties. If you are not the intended recipient, you
>>
>>should
>>
>>
>>>delete this message immediately.
>>>
>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>>--
>>>struts 1.1 + tomcat 4.1.27 + 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
>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + 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


Mime
View raw message