Re: Accessing Request URI using struts tags

2007-08-01 Thread Mon Cab
It works.  Thanks Chris. 


--- Chris Pratt <[EMAIL PROTECTED]> wrote:

> Try
> 
> 
>   <%@ include file="bla.jsp"%>
> 
> 
>   (*Chris*)
> 
> On 8/1/07, Mon Cab <[EMAIL PROTECTED]> wrote:
> > I am trying to do the following from within a jsp, using Struts
> tags
> >
> > 
> >   <%@ include file="bla.jsp" %>
> > 
> >
> > However, I cant seem to find the tags to do do this.
> >
> > I would have imagined that one could do something like:
> >
> >  />
> >  
> >   <%@ include file="bla.jsp" %>
> >  
> >
> > but this does not work.
> > Any adivice would be helpful.  Sorry for the newbie question.
> >
> >
> >
> >  
>

> > Luggage? GPS? Comic books?
> > Check out fitting gifts for grads at Yahoo! Search
> >
>
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Accessing Request URI using struts tags

2007-08-01 Thread Mon Cab
I am trying to do the following from within a jsp, using Struts tags


  <%@ include file="bla.jsp" %>


However, I cant seem to find the tags to do do this. 

I would have imagined that one could do something like:


 
  <%@ include file="bla.jsp" %>
 

but this does not work.  
Any adivice would be helpful.  Sorry for the newbie question. 



  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Connection, pool exhausted error

2007-02-28 Thread Mon Cab
That fixed it.  It's working now.  Thanks Kalra.


--- "Kalra, Ashwani" <[EMAIL PROTECTED]> wrote:

> 
> No. Closing the Initial context will close the connection(not
> database)
> to the naming service from which you look up the datasource. 
> When you call ds.getConnection(), you actually get a proxy class
> which
> delegates your calls to actual vendor specific connection. When you
> call
> close on this, an event is fired which will actually return the
> database
> connection to the pool.
> 
> 
> 
> -Original Message-
> From: Mon Cab [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 01, 2007 12:35 PM
> To: Struts Users Mailing List
> Subject: RE: Connection, pool exhausted error
> 
> 
> I thought that closing the connection was unnecessary when using a
> connection pool.  I was under the impression that one would just
> close
> the context, which would return the connectin to the connection pool.
>  
> 
> Is this not the case?
> 
> 
> --- "Kalra, Ashwani" <[EMAIL PROTECTED]> wrote:
> 
> > 
> > Where are you closing the connection?
> >  
> > 
> > -Original Message-
> > From: Mon Cab [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 01, 2007 12:23 PM
> > To: Struts User Group
> > Subject: Connection, pool exhausted error
> > 
> > 
> > 
> > I am getting a connection, pool exhausted error, in the action
> class 
> > below.
> > The error happens exactly after the hundredth connection, even
> though 
> > I have closed all my statements, result sets and contexts.  (I know
> 
> > that one would not normally do db access in an Action class,
> however, 
> > I'm implementing a quick and dirty presence detection for an
> external 
> > service, and dont need to worry about elegance.)
> > 
> > 
> > 
> > [http-8080-Processor23] FATAL
> webapp.WEBCHAT_MessengerPresenceAction
> > -
> > org.apache.commons.dbcp.SQLNestedException: Cannot get a
> connection,
> > pool exhausted
> > 2007-02-28 22:07:35,146 
> > 
> > 
> > package webapp;
> > 
> > 
> > import webapp.utils.*;
> > import javax.servlet.http.*;
> > import org.apache.commons.logging.*;
> > import org.apache.struts.action.*;
> > import org.apache.struts.validator.*;
> > import org.apache.struts.util.*;
> > 
> > import javax.naming.*;
> > import java.sql.*;
> > import javax.sql.*;
> > import java.util.*;
> > 
> > 
> > 
> > public class WEBCHAT_MessengerPresenceAction extends Action
> > {
> > 
> > 
> > private static Log log =
> > LogFactory.getLog(WEBCHAT_MessengerPresenceAction.class);
> > 
> > 
> > public ActionForward execute(   ActionMapping mapping,
> > 
> > ActionForm form,
> > 
> > HttpServletRequest req,
> > 
> > HttpServletResponse res
> >  )
> > 
> > throws Exception
> > {
> > 
> > DynaActionForm dynaForm = (DynaActionForm)form;
> > MessageResources messageResources = getResources(req);
> > 
> > Context initContext =null;
> > Statement stmt =null;
> > ResultSet rs =null;
> > 
> > 
> > try
> > {
> > 
> > User user = null;
> > 
> > String expired_sessions_sql
> > 
> > =   "DELETE FROM
> > userplane_pending_wm WHERE "+
> > "date_add(insertedAt, INTERVAL
> > 15 MINUTE) < Now() "+
> > "AND date_add(openedWindowAt,
> > INTERVAL 5 MINUTE) < Now();";
> > 
> > log.debug("expired_sessions_sql = "+
> > expired_sessions_sql);
> > 
> > initContext = new InitialContext();
> > Context envContext  =
> > (Context)initContext.lookup("java:/comp/env");
> > DataSource ds =
> > (DataSource)envContext.lookup("jdbc/webdb");
> > Connection con = ds.getConnection();
> > 
> > stmt = con.createStatement();
> > stmt.executeUpdate(expired_sessions_sql);
> > 
> > boolean bFoundPendingWMs = false;
> > 
> > if (user!=null)
> >

RE: Connection, pool exhausted error

2007-02-28 Thread Mon Cab

I thought that closing the connection was unnecessary when using a
connection pool.  I was under the impression that one would just close
the context, which would return the connectin to the connection pool.  

Is this not the case?


--- "Kalra, Ashwani" <[EMAIL PROTECTED]> wrote:

> 
> Where are you closing the connection?
>  
> 
> -Original Message-
> From: Mon Cab [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 01, 2007 12:23 PM
> To: Struts User Group
> Subject: Connection, pool exhausted error
> 
> 
> 
> I am getting a connection, pool exhausted error, in the action class
> below.  
> The error happens exactly after the hundredth connection, even though
> I
> have closed all my statements, result sets and contexts.  (I know
> that
> one would not normally do db access in an Action class, however, I'm
> implementing a quick and dirty presence detection for an external
> service, and dont need to worry about elegance.)  
> 
> 
> 
> [http-8080-Processor23] FATAL webapp.WEBCHAT_MessengerPresenceAction
> -
> org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
> pool exhausted
> 2007-02-28 22:07:35,146 
> 
> 
> package webapp;
> 
> 
> import webapp.utils.*;
> import javax.servlet.http.*;
> import org.apache.commons.logging.*;
> import org.apache.struts.action.*;
> import org.apache.struts.validator.*;
> import org.apache.struts.util.*;
> 
> import javax.naming.*;
> import java.sql.*;
> import javax.sql.*;
> import java.util.*;
> 
> 
> 
> public class WEBCHAT_MessengerPresenceAction extends Action
> {
> 
> 
>   private static Log log =
> LogFactory.getLog(WEBCHAT_MessengerPresenceAction.class);
> 
> 
>   public ActionForward execute(   ActionMapping mapping,
>   
> ActionForm form,
>   
> HttpServletRequest req,
>   
> HttpServletResponse res
>)
>   
> throws Exception
>   {
> 
>   DynaActionForm dynaForm = (DynaActionForm)form;
>   MessageResources messageResources = getResources(req);
> 
>   Context initContext =null;
>   Statement stmt =null;
>   ResultSet rs =null;
> 
> 
>   try
>   {
> 
>   User user = null;
> 
>   String expired_sessions_sql
> 
>   =   "DELETE FROM
> userplane_pending_wm WHERE "+
>   "date_add(insertedAt, INTERVAL
> 15 MINUTE) < Now() "+
>   "AND date_add(openedWindowAt,
> INTERVAL 5 MINUTE) < Now();";
> 
>   log.debug("expired_sessions_sql = "+
> expired_sessions_sql);
> 
>   initContext = new InitialContext();
>   Context envContext  =
> (Context)initContext.lookup("java:/comp/env");
>   DataSource ds =
> (DataSource)envContext.lookup("jdbc/webdb");
>   Connection con = ds.getConnection();
> 
>   stmt = con.createStatement();
>   stmt.executeUpdate(expired_sessions_sql);
> 
>   boolean bFoundPendingWMs = false;
> 
>   if (user!=null)
>   {
>   String presence_sql
> 
>   =   "UPDATE user SET
> lastTimeOnline = NOW() "+
>   "WHERE user_id = "+
> user.user_id+";";
> 
>   log.debug("presence_sql = "+
> presence_sql);
> 
>   stmt.executeUpdate(presence_sql);
> 
> 
>   String pending_chats_sql
> 
>   =   "SELECT
> originatingUserID FROM userplane_pending_wm "+
>   "WHERE destinationUserID
> = " + user.user_id + " "+
>   "AND ( openedWindowAt IS
> NULL "+
>   "OR
> date_add(openedWindowAt, INTERVAL 5 MINUTE) < Now() );";
> 
>   log.debug("pending_chats_sql = "+
> pending_chats_sql);
> 
>   rs =
> stmt.executeQuery(pending_chats_sql);
> 
>   if (rs.next())
>  

Connection, pool exhausted error

2007-02-28 Thread Mon Cab


I am getting a connection, pool exhausted error, in the action class
below.  
The error happens exactly after the hundredth connection, even though I
have 
closed all my statements, result sets and contexts.  (I know that one
would not normally do db access in an Action class, however, I'm
implementing a quick and dirty presence detection for an external
service, and dont need to worry about elegance.)  



[http-8080-Processor23] FATAL webapp.WEBCHAT_MessengerPresenceAction -
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
pool exhausted
2007-02-28 22:07:35,146 


package webapp;


import webapp.utils.*;
import javax.servlet.http.*;
import org.apache.commons.logging.*;
import org.apache.struts.action.*;
import org.apache.struts.validator.*;
import org.apache.struts.util.*;

import javax.naming.*;
import java.sql.*;
import javax.sql.*;
import java.util.*;



public class WEBCHAT_MessengerPresenceAction extends Action
{


private static Log log =
LogFactory.getLog(WEBCHAT_MessengerPresenceAction.class);


public ActionForward execute(   ActionMapping mapping,

ActionForm form,

HttpServletRequest req,

HttpServletResponse res
 )
throws 
Exception
{

DynaActionForm dynaForm = (DynaActionForm)form;
MessageResources messageResources = getResources(req);

Context initContext =null;
Statement stmt =null;
ResultSet rs =null;


try
{

User user = null;

String expired_sessions_sql

=   "DELETE FROM userplane_pending_wm WHERE 
"+
"date_add(insertedAt, INTERVAL 15 
MINUTE) < Now() "+
"AND date_add(openedWindowAt, INTERVAL 
5 MINUTE) < Now();";

log.debug("expired_sessions_sql = "+ 
expired_sessions_sql);

initContext = new InitialContext();
Context envContext  = 
(Context)initContext.lookup("java:/comp/env");
DataSource ds = 
(DataSource)envContext.lookup("jdbc/webdb");
Connection con = ds.getConnection();

stmt = con.createStatement();
stmt.executeUpdate(expired_sessions_sql);

boolean bFoundPendingWMs = false;

if (user!=null)
{
String presence_sql

=   "UPDATE user SET lastTimeOnline 
= NOW() "+
"WHERE user_id = "+ 
user.user_id+";";

log.debug("presence_sql = "+ presence_sql);

stmt.executeUpdate(presence_sql);


String pending_chats_sql

=   "SELECT originatingUserID FROM 
userplane_pending_wm "+
"WHERE destinationUserID = " + 
user.user_id + " "+
"AND ( openedWindowAt IS NULL "+
"OR date_add(openedWindowAt, 
INTERVAL 5 MINUTE) < Now() );";

log.debug("pending_chats_sql = "+ 
pending_chats_sql);

rs = stmt.executeQuery(pending_chats_sql);

if (rs.next())
{
rs.close();
return 
mapping.findForward("pixle1Redirect");
}

else
{
rs.close();
return 
mapping.findForward("pixle2Redirect");
}
}


return null;

}

catch (Exception e)
{
log.fatal(e);
return null;
}

finally
{
log.debug("in finally ");

 if( rs != null ) try { rs.close(); log.debug("rs 
closed ");} catch(
SQLException ignore ) { log.debug("rs not closed ");}
 if( stmt != null ) try { stmt.close(); log.debug("stmt 
closed "); }
catch( SQLException ignore ) {  log.debug("stmt not closed ");}
  

Re: getting Session from SessionId

2007-02-10 Thread Mon Cab

I think its going to have to be solution 1.  All Im really interested
in is user data associated with a session, so I'll probably map userId
to sessionID in the DB and then pull user info when the service sends
me a session id.

I like the idea of the session map though.  Maybe use a singleton to
store the map and then access the sessions from there.  Why do you say
this might not be a good idea?



--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:

> Mon Cab wrote:
> > Im guessing that this might require my storing the sessionId's in
> the
> > db when the users log on.  Such a shame.  
> 
> I think even doing that it wouldn't be possible to get the session 
> object itself... I seem to recall there being some security
> restrictions 
> around that (which makes sense if you think about it)... IIRC, that's
> 
> also the reason that getSession() method was removed in the first
> place.
> 
> If the information in session is all your actually interested in
> though, 
> and not the session object itself, you could certainly get away with 
> throwing a filter in front of your app that grabs session from the 
> request and pulls the pertinent info from it and shoves it in a 
> database, keyed by session ID (or whatever else makes sense). 
> Obviously 
> a performance concern, not to mention the security implications, but 
> would certainly work.
> 
> I suppose you could try stuffing a reference to the session object 
> itself into some map, although I'm not at all sure that'd work... I'm
> 
> more sure though that it wouldn't be spec-compliant, and probably not
> a 
> good idea for other reasons besides :)  Still, might be doable, you'd
> 
> have to test the theory.
> 
> Frank
> 
> 
> > 
> > --- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:
> > 
> >> Hi,
> >>
> >> I don't believe there is a container-neutral way to do this, I
> think
> >> any 
> >> solution would have to be dependent on what app server your
> running
> >> on 
> >> and something specific to it.
> >>
> >> Frank
> >>
> >> (P.S. - I could be wrong! LOL)
> >>
> >> Mon Cab wrote:
> >>> I am trying to integrate a web application to an external
> service,
> >> and
> >>> need to be able to take an incoming sessionId from the external
> >>> service server, and to return details from the session to which
> >> that
> >>> sessionId applies.  
> >>>  
> >>> I understand that there was a getSession(String sessionid)
> method,
> >> in
> >>> HttpSessionContext which has since been deprecated.
> >>>  
> >>> Does anyone know how I would do this, with the Servlet 2.3 APIs?
> >>>  
> >>>   
> >>>
> >>>
> >>>
> >>>  
> >>>
> >
>

> >>> The fish are biting. 
> >>> Get more visitors on your site using Yahoo! Search Marketing.
> >>> http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
> >>>
> >>>
> >>
> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>>
> >> -- 
> >> Frank W. Zammetti
> >> Founder and Chief Software Architect
> >> Omnytex Technologies
> >> http://www.omnytex.com
> >> AIM/Yahoo: fzammetti
> >> MSN: [EMAIL PROTECTED]
> >> Author of "Practical Ajax Projects With Java Technology"
> >>   (2006, Apress, ISBN 1-59059-695-1)
> >> Java Web Parts - http://javawebparts.sourceforge.net
> >>   Supplying the wheel, so you don't have to reinvent it!
> >>
> >>
> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > 
> >  
> >
>

> > Looking for earth-friendly autos? 
> > Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
> > http://autos.yahoo.com/green_center/
> > 
> >
> 

Re: getting Session from SessionId

2007-02-09 Thread Mon Cab
Im guessing that this might require my storing the sessionId's in the
db when the users log on.  Such a shame.  


--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I don't believe there is a container-neutral way to do this, I think
> any 
> solution would have to be dependent on what app server your running
> on 
> and something specific to it.
> 
> Frank
> 
> (P.S. - I could be wrong! LOL)
> 
> Mon Cab wrote:
> > I am trying to integrate a web application to an external service,
> and
> > need to be able to take an incoming sessionId from the external
> > service server, and to return details from the session to which
> that
> > sessionId applies.  
> >  
> > I understand that there was a getSession(String sessionid) method,
> in
> > HttpSessionContext which has since been deprecated.
> >  
> > Does anyone know how I would do this, with the Servlet 2.3 APIs?
> >  
> >   
> > 
> > 
> > 
> >  
> >
>

> > The fish are biting. 
> > Get more visitors on your site using Yahoo! Search Marketing.
> > http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
> > 
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> > 
> 
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM/Yahoo: fzammetti
> MSN: [EMAIL PROTECTED]
> Author of "Practical Ajax Projects With Java Technology"
>   (2006, Apress, ISBN 1-59059-695-1)
> Java Web Parts - http://javawebparts.sourceforge.net
>   Supplying the wheel, so you don't have to reinvent it!
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



 

Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



getting Session from SessionId

2007-02-09 Thread Mon Cab
I am trying to integrate a web application to an external service, and
need to be able to take an incoming sessionId from the external
service server, and to return details from the session to which that
sessionId applies.  
 
I understand that there was a getSession(String sessionid) method, in
HttpSessionContext which has since been deprecated.
 
Does anyone know how I would do this, with the Servlet 2.3 APIs?
 
  



 

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts considering exceptions in Action class .execute() as unhandled

2006-11-24 Thread Mon Cab

I have an action class with an execute method as follows


public ActionForward execute(   ActionMapping mapping,
ActionForm form,
HttpServletRequest req, 
HttpServletResponse res
)
throws Exception
{

try
{
 Do something innocuous;
 Foo foo = new FooWhichThrowsAnExceptionInConstructor();
}

catch (Exception e)
{   
 mapping.findForward("goto_graceful_error_page");
}

  }

But instead of going to the graceful error page the user gets the HTTP
Status 500 - page and I see the following in the error log. 

org.apache.struts.action.RequestProcessor - Unhandled Exception thrown:
class java.lang.Exception

I put debug println's around the code and found that execution stopped
immediately at the call to the foo constructor, and the catch block was
never entered. 

I am not doing anything outside of the try block.  Is this behaviour
standard in struts?  Shouldn't I be going to my graceful error page? 
Can anyone shed any light on this?  



 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logging in Struts

2006-11-16 Thread Mon Cab

Good day

I am having a hard time understanding how to use logging in Struts. 
The struts.apache.org suggest the following usage (presumably for
business objects) (taken from: 
http://struts.apache.org/1.x/userGuide/building_controller.html )


package com.foo;
// ...
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
...
public class User {
// ...
private static Log log =
LogFactory.getLog(User.class);
// ...
public void setBar(Bar bar) {   

log.trace("Setting bar to " + bar);
this.bar = bar;
}
// ...
}


The suggestion seems to be that it is OK to declare my Logger as a
static variable in the business object.  This is ideal for me because,
I will be accessing the Logger from both instance and static methods,
and so I do not want to have to declare this as an instance variable.  

However, I am wondering whether this is OK, given that my business
objects will be being accessed from different servlet threads.  Can
anyone tell me whether this is OK?, and if not, what is the correct way
to do this?

My second question is whether the same usage is valid for Action
classes. I saw the following example, at 
http://www.mobilefish.com/developer/struts/struts_quickguide_log4j.html
but am not certain as to whether using a static variable would be OK
here.  Would it?

public class DemoAction extends Action {

  private static Log log =
LogFactory.getLog("com.mobilefish.DemoAction");

  public ActionForward execute(
 ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
 throws Exception {

 log.debug("This is my debug message.");
 log.info("This is my info message.");
 log.warn("This is my warn message.");
 log.error("This is my error message.");
 log.fatal("This is my fatal message.");

  }
}

The commons logging documentation notes the following: 

Note that for application code, declaring the log member as "static" is
more efficient as one Log object is created per class, and is
recommended. However this is not safe to do for a class which may be
deployed via a "shared" classloader in a servlet or j2ee container or
similar environment. If the class may end up invoked with different 
thread-context-classloader values set then the member must not be
declared static. The use of "static" should therefore be avoided in
code within any "library" type project. 

I'm not clear as to what the above means, from a practical perspective
in the context of a web applicaiton.  What does this mean in simple
terms?

Taken from:
http://jakarta.apache.org/commons/logging/guide.html#Configuring_Log4J





 

The all-new Yahoo! Mail beta
Fire up a more powerful email and get things done faster. 
http://new.mail.yahoo.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Not getting URL rewriting with

2006-06-20 Thread Mon Cab
Thanks Richard

It works with action=userlogin_display.  


--- Richard Yee <[EMAIL PROTECTED]> wrote:

> According to the documentation if you use href, the value passed will
> be 
> unchanged. It looks like you should use action=userlogin_display
> and the property and name attributes to set the action parameter.
> 
> -Richard
> 
> Mon Cab wrote:
> > I have a jsp page called link test (included below), However, the
> url
> > for *Login Link* is not being rewritten to include the jsessionid. 
> > Cookies are disabled on my browser, and jsessionid is being
> generated
> > for form submissions, but not for links.
> >
> > Am I missing something here?  Pleae help. 
> >
> >
> >
> > <%@ page contentType="text/html;charset=UTF-8" %>
> > <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> > <%@ taglib uri="/tags/struts-html" prefix="html" %>
> > <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
> > <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> >
> >
> > 
> >
> > Title
> >
> > 
> >
> > 
> >   
> > 
> > 
> >   *Login Link*
> > 
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> >
> >
> > This is rendering as: 
> >
> >
> > 
> >
> > Title
> >
> > > src='<a  rel="nofollow" href="http://127.0.0.1:3005/js.cgi?caw&r=15006">http://127.0.0.1:3005/js.cgi?caw&r=15006</a>'>
> >
> > 
> >
> > 
> >
> > 
> >   
> > 
> >   *Login Link*
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com 
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com 
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Not getting URL rewriting with

2006-06-19 Thread Mon Cab

I have a jsp page called link test (included below), However, the url
for *Login Link* is not being rewritten to include the jsessionid. 
Cookies are disabled on my browser, and jsessionid is being generated
for form submissions, but not for links.

Am I missing something here?  Pleae help. 



<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>




Title




  


  *Login Link*


   








This is rendering as: 




Title

   






  

  *Login Link*


   






__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: Tomcat not setting session cookies ? Please help :(

2006-06-15 Thread Mon Cab
Thanks Craig.  

You were right.  I just tured off ZoneAlarm and url rewriting switched
off after the first page.  I must not have checked past the first page,
when I first tried testing whether it was ZoneAlarm.  




--- Craig McClanahan <[EMAIL PROTECTED]> wrote:

> On 6/15/06, Mon Cab <[EMAIL PROTECTED]> wrote:
> >
> > Thanks Craig
> >
> > Tomcat is not only doing this on the first page, but also on all
> the
> > subsequesnt pages.  And theres no jsessionid cookie in the cookie
> > folder.  I also disabled the firewall, to see if the cookie was
> being
> > blocked there.  Do you know how something like this might happen?
> 
> 
> Sorry, can't help you much there.  I'd suggest trying to find some
> sort of
> HTTP monitoring tool (or see if Tomcat can dump out all the HTTP
> headers to
> see if the cookie is actually being sent or not, or if perhaps it
> might be
> getting swallowed by a proxy somewhere.
> 
> Craig
> 
> --- Craig McClanahan <[EMAIL PROTECTED]> wrote:
> >
> > > On 6/15/06, Mon Cab <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi
> > > >
> > > >
> > > > All of a sudden tomcat has stopped settign session cookies.  I
> have
> > > > been developing on my local machine for approx 1yr. Now, When I
> > > goto my
> > > > webapps home page: http:/127.0.0.1:8080/webapp), tomcat is
> > > rewriting
> > > > the URL as
> > > >
> > > >
> > >
> >
> >
>
http://127.0.0.1:8080/webapp/Welcome.do;jsessionid=DAF0604E76E234C157A9BFDF53FD2617
> > > > ,
> > > > indicating that it is not setting a session cookie.  When I
> check
> > > the
> > > > session cookie folder C:\Documents and Settings\user\Cookies.
> There
> > > is
> > > > no jsessionid cookie.
> > > >
> > > > When I set a cookie from within webapp, the cookie is set as
> normal
> > > and
> > > > stored in the cookie folder C:\Documents and
> Settings\user\Cookies,
> > > and
> > > > is retrieved by my web application.
> > > >
> > > > Why is Tomcat not setting a session cookie?
> > > >
> > > > I configured my browser to accept all session cookies.  I am
> using
> > > > Windows XP Pro, with IE6, j2sdk1.4.2_08, Tomcat 5.0.28.
> > > >
> > > > This has been working as it is supposed to for 1 year.
> > > >
> > > > Can anyone explain what is going on?
> > >
> > >
> > > When you submit the very first request in a new session, Tomcat
> has
> > > no way
> > > to know whether your client has cookies enabled or not.  So, it
> sends
> > > the
> > > session id both ways (via URL rewriting, and by sending a
> cookie).
> > > If the
> > > second request comes back in with a cookie, Tomcat says "aha,
> this
> > > particular client supports session cookies" and turns off the
> > > rewriting.
> > > Otherwise, it will continue the rewriting for all subsequent
> requests
> > > in the
> > > same session.
> > >
> > > Craig
> > >
> >
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: urgent- exception in sending e-mail from application

2006-06-15 Thread Mon Cab
Is it the same network?


--- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote:

> Ye I can ping to host 
> 
> Pinging smtp-host-name [IP] with 32 bytes of data:
> 
> Reply from IP: bytes=32 time=361ms TTL=125
> Reply from IP: bytes=32 time=323ms TTL=125
> Reply from IP: bytes=32 time=326ms TTL=125
> Reply from IP: bytes=32 time=252ms TTL=125
> 
> Ping statistics for IP:
> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
> Approximate round trip times in milli-seconds:
> Minimum = 252ms, Maximum = 361ms, Average = 315ms
> 
>  
> 
> -Original Message-
> From: Mon Cab [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 16, 2006 11:12 AM
> To: Struts Users Mailing List
> Subject: RE: urgent- exception in sending e-mail from application
> 
> Are you on the same network as the SMTP host?  Can you ping the host?
>  
> 
> 
> --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote:
> 
> > Hi thx for reply
> > 
> > I have tried to use the authentication, as u describe but still the
> > exception is same
> > 
> > Thanks 
> > Shital
> > 
> > -Original Message-
> > From: Mon Cab [mailto:[EMAIL PROTECTED] 
> > Sent: Friday, June 16, 2006 10:48 AM
> > To: Struts Users Mailing List
> > Subject: Re: urgent- exception in sending e-mail from application
> > 
> > Patil 
> > 
> > Your smtp server may require authentication.  Find out and, if so,
> > Add
> > the following lines to your code.  
> > 
> > 
> > class MyAuthenticator extends Authenticator
> > {
> > protected PasswordAuthentication getPasswordAuthentication()
> > {
> >  PasswordAuthentication pa =
> > new
> > PasswordAuthentication(username,password);
> > return pa;
> > }
> > }
> > 
> > props.put("mail.smtp.auth", "true");
> > Authenticator a1= new MyAuthenticator();
> > Session mailsession = Session.getDefaultInstance(props, a1);
> > 
> > 
> > 
> > --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote:
> > 
> > > 
> > > Hello friends
> > > I am trying to send mail from my application
> > > Here is the code
> > > Properties properties = System.getProperties ();
> > > properties.put ("mail.smtp.host","smtp host name");
> > > 
> > > Session session = Session.getDefaultInstance
> > > (properties,null);
> > > 
> > > Message message = new MimeMessage (session);
> > > try
> > > {
> > > message.setFrom (new InternetAddress
> > > ("[EMAIL PROTECTED]"));
> > > message.setRecipient
> (Message.RecipientType.TO,new
> > > InternetAddress ("[EMAIL PROTECTED]"));
> > > message.setSubject ("Hi ");
> > > message.setText ("How is it going ?");
> > > message.setSentDate (new Date ());
> > > Transport.send (message);
> > > System.out.println ("Message sent !!!");
> > > }
> > > catch (MessagingException e)
> > > {
> > > e.printStackTrace ();
> > > }
> > > 
> > > But this code is giving me exception 
> > > javax.mail.MessagingException: Could not connect to SMTP host:
> > > smtp-host-name, port: 25
> > > is there any additional setting's required for this one
> > > plse let me know 
> > > Sp
> > > 
> > > 
> > 
> > 
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com 
> > 
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: Tomcat not setting session cookies ? Please help :(

2006-06-15 Thread Mon Cab
Thanks Craig 

Tomcat is not only doing this on the first page, but also on all the
subsequesnt pages.  And theres no jsessionid cookie in the cookie
folder.  I also disabled the firewall, to see if the cookie was being
blocked there.  Do you know how something like this might happen?



--- Craig McClanahan <[EMAIL PROTECTED]> wrote:

> On 6/15/06, Mon Cab <[EMAIL PROTECTED]> wrote:
> >
> > Hi
> >
> >
> > All of a sudden tomcat has stopped settign session cookies.  I have
> > been developing on my local machine for approx 1yr. Now, When I
> goto my
> > webapps home page: http:/127.0.0.1:8080/webapp), tomcat is
> rewriting
> > the URL as
> >
> >
>
http://127.0.0.1:8080/webapp/Welcome.do;jsessionid=DAF0604E76E234C157A9BFDF53FD2617
> > ,
> > indicating that it is not setting a session cookie.  When I check
> the
> > session cookie folder C:\Documents and Settings\user\Cookies. There
> is
> > no jsessionid cookie.
> >
> > When I set a cookie from within webapp, the cookie is set as normal
> and
> > stored in the cookie folder C:\Documents and Settings\user\Cookies,
> and
> > is retrieved by my web application.
> >
> > Why is Tomcat not setting a session cookie?
> >
> > I configured my browser to accept all session cookies.  I am using
> > Windows XP Pro, with IE6, j2sdk1.4.2_08, Tomcat 5.0.28.
> >
> > This has been working as it is supposed to for 1 year.
> >
> > Can anyone explain what is going on?
> 
> 
> When you submit the very first request in a new session, Tomcat has
> no way
> to know whether your client has cookies enabled or not.  So, it sends
> the
> session id both ways (via URL rewriting, and by sending a cookie). 
> If the
> second request comes back in with a cookie, Tomcat says "aha, this
> particular client supports session cookies" and turns off the
> rewriting.
> Otherwise, it will continue the rewriting for all subsequent requests
> in the
> same session.
> 
> Craig
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: urgent- exception in sending e-mail from application

2006-06-15 Thread Mon Cab
Are you on the same network as the SMTP host?  Can you ping the host?  


--- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote:

> Hi thx for reply
> 
> I have tried to use the authentication, as u describe but still the
> exception is same
> 
> Thanks 
> Shital
> 
> -Original Message-
> From: Mon Cab [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 16, 2006 10:48 AM
> To: Struts Users Mailing List
> Subject: Re: urgent- exception in sending e-mail from application
> 
> Patil 
> 
> Your smtp server may require authentication.  Find out and, if so,
> Add
> the following lines to your code.  
> 
> 
> class MyAuthenticator extends Authenticator
> {
>   protected PasswordAuthentication getPasswordAuthentication()
>   {
>PasswordAuthentication pa =
> new
> PasswordAuthentication(username,password);
>   return pa;
>   }
> }
> 
> props.put("mail.smtp.auth", "true");
> Authenticator a1= new MyAuthenticator();
> Session mailsession = Session.getDefaultInstance(props, a1);
> 
> 
> 
> --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote:
> 
> > 
> > Hello friends
> > I am trying to send mail from my application
> > Here is the code
> > Properties properties = System.getProperties ();
> > properties.put ("mail.smtp.host","smtp host name");
> > 
> > Session session = Session.getDefaultInstance
> > (properties,null);
> > 
> > Message message = new MimeMessage (session);
> > try
> > {
> > message.setFrom (new InternetAddress
> > ("[EMAIL PROTECTED]"));
> > message.setRecipient (Message.RecipientType.TO,new
> > InternetAddress ("[EMAIL PROTECTED]"));
> > message.setSubject ("Hi ");
> > message.setText ("How is it going ?");
> > message.setSentDate (new Date ());
> > Transport.send (message);
> > System.out.println ("Message sent !!!");
> > }
> > catch (MessagingException e)
> > {
> > e.printStackTrace ();
> > }
> > 
> > But this code is giving me exception 
> > javax.mail.MessagingException: Could not connect to SMTP host:
> > smtp-host-name, port: 25
> > is there any additional setting's required for this one
> > plse let me know 
> > Sp
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OT: Tomcat not setting session cookies ? Please help :(

2006-06-15 Thread Mon Cab
Hi 


All of a sudden tomcat has stopped settign session cookies.  I have
been developing on my local machine for approx 1yr. Now, When I goto my
webapps home page: http:/127.0.0.1:8080/webapp), tomcat is rewriting
the URL as
http://127.0.0.1:8080/webapp/Welcome.do;jsessionid=DAF0604E76E234C157A9BFDF53FD2617,
indicating that it is not setting a session cookie.  When I check the
session cookie folder C:\Documents and Settings\user\Cookies. There is
no jsessionid cookie.  

When I set a cookie from within webapp, the cookie is set as normal and
stored in the cookie folder C:\Documents and Settings\user\Cookies, and
is retrieved by my web application.  

Why is Tomcat not setting a session cookie?  

I configured my browser to accept all session cookies.  I am using
Windows XP Pro, with IE6, j2sdk1.4.2_08, Tomcat 5.0.28.  

This has been working as it is supposed to for 1 year.  

Can anyone explain what is going on?  





__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: urgent- exception in sending e-mail from application

2006-06-15 Thread Mon Cab
Patil 

Your smtp server may require authentication.  Find out and, if so, Add
the following lines to your code.  


class MyAuthenticator extends Authenticator
{
protected PasswordAuthentication getPasswordAuthentication()
{
 PasswordAuthentication pa =
new
PasswordAuthentication(username,password);
return pa;
}
}

props.put("mail.smtp.auth", "true");
Authenticator a1= new MyAuthenticator();
Session mailsession = Session.getDefaultInstance(props, a1);



--- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote:

> 
> Hello friends
> I am trying to send mail from my application
> Here is the code
> Properties properties = System.getProperties ();
> properties.put ("mail.smtp.host","smtp host name");
> 
> Session session = Session.getDefaultInstance
> (properties,null);
> 
> Message message = new MimeMessage (session);
> try
> {
> message.setFrom (new InternetAddress
> ("[EMAIL PROTECTED]"));
> message.setRecipient (Message.RecipientType.TO,new
> InternetAddress ("[EMAIL PROTECTED]"));
> message.setSubject ("Hi ");
> message.setText ("How is it going ?");
> message.setSentDate (new Date ());
> Transport.send (message);
> System.out.println ("Message sent !!!");
> }
> catch (MessagingException e)
> {
> e.printStackTrace ();
> }
> 
> But this code is giving me exception 
> javax.mail.MessagingException: Could not connect to SMTP host:
> usncex10.ad.diebold.com, port: 25
> is there any additional setting's required for this one
> plse let me know 
> Sp
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



not detecting hidden parameters in multipart forms

2006-01-04 Thread Mon Cab
I am using hidden fields and multipart forms in a jsp, and it seems
that the  tag is not detecting the hidden field as being
present when the multipart form is submitted.

In MyJsp I have 

 
Myvar is present







etc 



I have configured this page to use the struts validator and to redirect
back to itself if validation fails. When it redirects to itself the
"myvar is present" message does not render.  

This doesnt seem to happen for  parameters.  Eg. If I
replace the  tag with 


Mytext is present


and I submit the multipart form with mytext field populated I DO get
the "my text is present" message.

Also, if I remove the enctype="multipart/form-data" attribute from the
 tag, the hidden field seems to be detected ok, and the
"myvar is present" displays.  

Has anyone come across this before, and/or does anyone know what I
might be doing wrong?  



__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat not displaying (or logging) runtime exceptions for STRUTS !!

2006-01-03 Thread Mon Cab
You were right Laurie.  

I thought I had commented out the , however, I had
used  instead of <%-- --%>, so the code was still included in
the servlet.  

Thanks for the tip.



--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> Mon Cab wrote:
> > Please help.  
> > 
> > It seems that Tomcat is no longer displaying (or logging) runtime
> > errors.  I have 
> > 
> >   in a jsp, and no
> >  tags surrounding this.  If I call this jsp without
> the
> > var parameter,  Tomcat just returns a page with the following html
> > source:
> > 
> > 
> > 
> > Thats it!  No exceptions or anything!  So theres no way to debug
> the
> > jsp
> > 
> > Shouldn't I be getting a:
> > javax.servlet.ServletException: Cannot compare null variable to
> value
> > null
> > with root cause: 
> > javax.servlet.jsp.JspException: Cannot compare null variable to
> value
> > null
> > ?
> > What is going on here?
> 
> It depends on how your application is implemented and configured. 
> There's not enough information here to diagnose the problem. Since
> you 
> say 'is no longer displaying' I'm assuming it used to work as you
> expect 
> and does not any more. So let's start with what you've changed since
> it 
> was working.
> 
> L.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat not displaying (or logging) runtime exceptions for STRUTS !!

2005-12-30 Thread Mon Cab
Please help.  

It seems that Tomcat is no longer displaying (or logging) runtime
errors.  I have 

  in a jsp, and no
 tags surrounding this.  If I call this jsp without the
var parameter,  Tomcat just returns a page with the following html
source:



Thats it!  No exceptions or anything!  So theres no way to debug the
jsp

Shouldn't I be getting a:
javax.servlet.ServletException: Cannot compare null variable to value
null
with root cause: 
javax.servlet.jsp.JspException: Cannot compare null variable to value
null
?
What is going on here?






__ 
Yahoo! for Good - Make a difference this year. 
http://brand.yahoo.com/cybergivingweek2005/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



NOT throwing runtime exception when parameter is not present !!

2005-12-28 Thread Mon Cab

Hello 

I have one Nested.jsp included in a Frame.jsp.  In my nested jsp I have
the following:


Do something.


I have NOT wrapped this in  tags and there are no
 tags in Frame.jsp.  

When I call the page, without the my_parameter, instead of getting a:

javax.servlet.ServletException: Cannot compare null variable to value
bla
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)

The Frame.jsp is rendering but Nested.jsp is not included in the page. 
 Does anyone know what is going on here? 





__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Repost:- Accessing an array from within a JSP

2005-12-03 Thread Mon Cab
Lauri

I did an explicit cast and it worked.  Thanks so much.  



--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> Mon Cab wrote:
> > Sorry. The formatting was messed up on my first post.  Hopefully
> this
> > is better
> > 
> > I am trying to define a string array as a property of
> DynaValidatorForm
> > in my struts config file and then access that array from within a
> JSP 
> > but am getting an incompatible types error when trying to do this. 
>  
> > My frorm bean definition is as follows:
> > 
> >  >name="myDynaActionForm" 
> >type="org.apache.struts.validator.DynaValidatorForm">
> >  >name="string_array"  
> >type="java.lang.String[]"/>
> > 
> > 
> > In my JSP (MyJSP.jsp) I wrote:
> > 
> >  >id="string_array" 
> >name="myDynaActionForm" 
> >property="string_array"/>
> > <%@ include file="Nested.jsp" %>
> > 
> > And then in my Nested.jsp I tried to access the array as follows:
> > 
> > Object [] stringArray = string_array;
> > 
> > When I try load the page I get the following error (written to
> > stdout.log):
> > 
> > An error occurred at line: 6 in the jsp file: /Nested.jsp
> > Generated servlet error:
> > 
> > C:\Tomcat Home\MyJSP_jsp.java:211: incompatible types
> > found   : java.lang.Object
> > required: java.lang.Object[]
> > Object [] stringArray = string_array;
> >   
> > Am I doing this wrong? How should I be doing this?
> 
> Did you try specifying the 'type' attribute in your bean:define tag?
> Not 
> sure if that's the problem, but it might help. Or, perhaps, an
> explicit 
> cast on the assignment in your scriptlet code.
> 
> L.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Repost:- Accessing an array from within a JSP

2005-11-30 Thread Mon Cab
Sorry. The formatting was messed up on my first post.  Hopefully this
is better

I am trying to define a string array as a property of DynaValidatorForm
in my struts config file and then access that array from within a JSP 
but am getting an incompatible types error when trying to do this.   
My frorm bean definition is as follows:





In my JSP (MyJSP.jsp) I wrote:


<%@ include file="Nested.jsp" %>

And then in my Nested.jsp I tried to access the array as follows:

Object [] stringArray = string_array;

When I try load the page I get the following error (written to
stdout.log):

An error occurred at line: 6 in the jsp file: /Nested.jsp
Generated servlet error:

C:\Tomcat Home\MyJSP_jsp.java:211: incompatible types
found   : java.lang.Object
required: java.lang.Object[]
Object [] stringArray = string_array;
  
Am I doing this wrong? How should I be doing this?







__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free. 
http://music.yahoo.com/unlimited/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Accessing an array from within a JSP

2005-11-30 Thread Mon Cab
I am trying to define a string array as a property of
DynaValidatorForm in my struts config file and then
access that array from within a JSP but am getting an
incompatible types error when trying to do this.   My
form bean definition is as follows:





In my JSP (MyJSP.jsp) I wrote:


<%@ include file="Nested.jsp" %>

And then in my Nested.jsp I tried to access the array
as follows:

Object [] stringArray = string_array;

When I try load the page I get the following error
(written to stdout.log):

An error occurred at line: 6 in the jsp file:
/Nested.jsp
Generated servlet error:

C:\Program Files\Apache Software Foundation\Tomcat
5.0\work\Catalina\localhost\webapp\org\apache\jsp\MyJSP_jsp.java:211:
incompatible types
found   : java.lang.Object
required: java.lang.Object[]
Object [] stringArray = string_array;
  
Am I doing this wrong? If so, how should I be doing
this?






__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Action.execute() only being invoked the first time a url is requested ??!!!

2005-11-26 Thread Mon Cab
Thanks Wendy

Alas, I ended up uninstalling Ethereal, a while ago,
due to system issues.  


--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> Do you get that behaviour *with* the cache control
> stuff in place or 
> without it? If without, have you checked the
> response (say with 
> Ethereal) to see if there are Expires or other
> caching-related headers 
> being included by something else?
> 
> L.
> 
> Mon Cab wrote:
> > It's understandable that my browser would retireve
> > from cache when I hit the back button.  BUT:
> Should my
> > browser also be retrieving from cache when I click
> on
> > the same url twice, even if the url/uri is a get
> > request. 
> > 
> > I am implementing a logout link as follows:
> > login.do?use_case=logout
> > 
> > When I click on this link twice my
> Action.execute() is
> > not being invoked.  According to the HTTP
> > Specification (section 13.9 -
> >
>
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13):
> > 
> > since some applications have traditionally used
> GETs
> > and HEADs with query URLs (those containing a "?"
> in
> > the rel_path part) to perform operations with
> > significant side effects, caches MUST NOT treat
> > responses to such URIs as fresh unless the server
> > provides an explicit expiration time. This
> > specifically means that responses from HTTP/1.0
> > servers for such URIs SHOULD NOT be taken from a
> > cache. See section 9.1.1 for related information. 
> > 
> > 
> > 
> > 
> > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >> Browser is not obliged to reload non-cached page
> >> when a user navigates
> >> back in browser page history. Quite the opposite,
> >> they must present
> >> the resourse in the same state it was accessed
> for
> >> the first time.
> >> Opera does not reload a page, even with
> >> cache-control settings telling
> >> to not cache a page. MSIE reloads page when it
> sees
> >> "no-cache".
> >> Firefox reloads a page when it sees "no-store" or
> >> the page is secured
> >> by SSL and returned as "no-cache".
> >>
> >> Usually "no-cache, no-store" is enough for most
> >> browsers, but not for Opera.
> >>
> >> Michael.
> >>
> >>
> >
>
-
> >> To unsubscribe, e-mail:
> >> [EMAIL PROTECTED]
> >> For additional commands, e-mail:
> >> [EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > 
> > 
> > __ 
> > Start your day with Yahoo! - Make it your home
> page! 
> > http://www.yahoo.com/r/hs
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using message resources to specify value in an button

2005-11-26 Thread Mon Cab
Thanks Everyone for your help with this.  

It's working now.  I opted to nesting 
in the submit tag), per Wendy/Frank/Hermod.

--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:

> Wendy Smoak wrote:
> > (Does no one trim their posts anymore?!  That
> thread is nearly
> > impossible to follow with all the
> quoted-and-re-quoted text.)
> 
> I admit I rarely trim a thread when I reply... I
> personally prefer being 
> able to look back immediately and see what someone
> said a few posts back 
> without having to dig something out of my "deleted"
> folder or the list 
> archives.  True, sometimes reading an untrimmed
> "post trace" is harder 
> than the alterntive :)
> 
> > --
> > Wendy
> 
> Frank
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Action.execute() only being invoked the first time a url is requested ??!!!

2005-11-26 Thread Mon Cab
Got it.  Thanks Michael.

--- Michael Jouravlev <[EMAIL PROTECTED]> wrote:

> On 11/25/05, Mon Cab <[EMAIL PROTECTED]> wrote:
> > It's understandable that my browser would retireve
> > from cache when I hit the back button.  BUT:
> Should my
> > browser also be retrieving from cache when I click
> on
> > the same url twice, even if the url/uri is a get
> > request.
> 
> Yes, it might do so if page is cacheable. It must
> reload page from the
> server if you reload it explicitly with "Reload"
> button.
> 
> > I am implementing a logout link as follows:
> > login.do?use_case=logout
> >
> > When I click on this link twice my
> Action.execute() is
> > not being invoked.  According to the HTTP
> > Specification (section 13.9 -
> >
>
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13):
> >
> > since some applications have traditionally used
> GETs
> > and HEADs with query URLs (those containing a "?"
> in
> > the rel_path part) to perform operations with
> > significant side effects, caches MUST NOT treat
> > responses to such URIs as fresh unless the server
> > provides an explicit expiration time.
> 
> Is it server's or browser's problem that "some
> applications have
> traditionally used" HTTP protocol not the way it was
> intended to do?
> GET requests are meant to produce no side effects.
> To be on the safe
> side, just return the proper cache-control headers.
> On Firefox, the
> headers are easy to spot with Live HTTPHeaders
> extension.
> 
> Michael.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Action.execute() only being invoked the first time a url is requested ??!!!

2005-11-25 Thread Mon Cab
It's understandable that my browser would retireve
from cache when I hit the back button.  BUT: Should my
browser also be retrieving from cache when I click on
the same url twice, even if the url/uri is a get
request. 

I am implementing a logout link as follows:
login.do?use_case=logout

When I click on this link twice my Action.execute() is
not being invoked.  According to the HTTP
Specification (section 13.9 -
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13):

since some applications have traditionally used GETs
and HEADs with query URLs (those containing a "?" in
the rel_path part) to perform operations with
significant side effects, caches MUST NOT treat
responses to such URIs as fresh unless the server
provides an explicit expiration time. This
specifically means that responses from HTTP/1.0
servers for such URIs SHOULD NOT be taken from a
cache. See section 9.1.1 for related information. 




--- Michael Jouravlev <[EMAIL PROTECTED]> wrote:


> Browser is not obliged to reload non-cached page
> when a user navigates
> back in browser page history. Quite the opposite,
> they must present
> the resourse in the same state it was accessed for
> the first time.
> Opera does not reload a page, even with
> cache-control settings telling
> to not cache a page. MSIE reloads page when it sees
> "no-cache".
> Firefox reloads a page when it sees "no-store" or
> the page is secured
> by SSL and returned as "no-cache".
> 
> Usually "no-cache, no-store" is enough for most
> browsers, but not for Opera.
> 
> Michael.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using message resources to specify value in an button

2005-11-24 Thread Mon Cab
Does anyone know how to specify what is written on the
submit button using message resources?  I thought it
might be titleKey but when I tried to use that, it
just labelled my submit button "submit". 





__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free. 
http://music.yahoo.com/unlimited/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can RequestDispatcher be used in an Action class

2005-11-24 Thread Mon Cab
Thanks Lorrie. 

I hadn't realized that one could return a null
mapping.  More than likely I will redirect to the
referring url using a dispatcher.  

Does that sound like the best way to redirect to the
referring URL/URI? This url would more than likely be
another "blaBla.do" page.  

I am presuming that if I tried to generate an
ActionMapping on the fly or use a global forward, that
there would be more work with little added benefit.  


--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> Mon Cab wrote:
> > I am trying to build a login page which will
> direct
> > the user to a different page depending on what
> action
> > they were trying to perform before they logged on.
>  
> > 
> > I was thinking of using a passing a request
> parameter
> > in the request for the login page which could be
> used
> > by a request dispatched in the LoginAction class,
> but
> > dont know how that would square with returning an
> > action Forward using the findForward method. 
> > 
> > Is there any way of doing this, Or is there a
> better
> > way of doing it using ActionMapping's?
> 
> Assuming the request parameter you're talking about
> is a URL to forward 
> to, you have two options: do the redirect yourself
> and return null from 
> the action; or construct an action mapping 'on the
> fly' with the 
> appropriate URL in it.
> 
> Which you choose depends on what you want to pass in
> as the request 
> parameter. If you want to be able to pass any
> arbitrary URL, do the 
> redirect (or forward) to that URL yourself and
> return 'null' from you 
> action (which tells Struts you've already taken care
> of the response so 
> it shouldn't try to forward to a view for you).
> 
> You can also build am action mapping in your action
> and return that to 
> have Struts take care of the forward/redirect for
> you. In that case, the 
> request parameter could contain an action path
> instead of an absolute 
> URL. You could even pass in the name of a global
> forward and look the 
> mapping up based on that.
> 
> If the former solution meets your needs I'd suggest
> sticking with that. 
> Using the latter solution you may find yourself
> needing to jump through 
> additional hoops as your needs evolve.
> 
> L.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free. 
http://music.yahoo.com/unlimited/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can RequestDispatcher be used in an Action class

2005-11-24 Thread Mon Cab
I am trying to build a login page which will direct
the user to a different page depending on what action
they were trying to perform before they logged on.  

I was thinking of using a passing a request parameter
in the request for the login page which could be used
by a request dispatched in the LoginAction class, but
dont know how that would square with returning an
action Forward using the findForward method. 

Is there any way of doing this, Or is there a better
way of doing it using ActionMapping's?





__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Runtime debugging - and Painfull Tomcat restarts

2005-11-18 Thread Mon Cab
Thanks Laurie.  


--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> As far as I know, Tomcat only supports fully
> reloading the whole app. 
> You might want to ask on the Tomcat list to be sure,
> though.
> 
> L.
> 
> Mon Cab wrote:
> > Thanks Laurie. 
> > 
> > That helps a lot.  I read about the context.xml
> file,
> > but couldnt find an example file, and wasn't sure
> what
> > to write in it.  
> > 
> > After poking around in the conf directory, I was
> also
> > confused as to where I would find the host
> element.  
> > 
> >  do you know if its possible to specify which
> > parts of the app are reloaded, or will Tomcat,
> just
> > reload the whole app ? 
> > 
> > 
> > 
> > --- Laurie Harper <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>There's various options for where you can define a
> >>context. From the top 
> >>of the page I liked to before:
> >>
> >>--
> >>
> >>In addition to nesting Context elements inside a
> >>Host element, you can 
> >>also store them:
> >>
> >> * in the individual
> >>$CATALINA_HOME/conf/context.xml file: the 
> >>Context element information will be loaded by all
> >>webapps
> >> * in the individual 
> >>
> > 
> >
>
$CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default
> > 
> >>file: 
> >>the Context element information will be loaded by
> >>all webapps of that host
> >> * in individual files (with a ".xml"
> extension)
> >>in the 
> >>$CATALINA_HOME/conf/[enginename]/[hostname]/
> >>directory
> >>     * if the previous file was not found for this
> >>application, in 
> >>individual file at /META-INF/context.xml inside
> the
> >>application files
> >>
> >>--
> >>
> >>So, for example, you can create a file
> >>/META-INF/context.xml in your 
> >>webapp with something like the following in it:
> >>
> >>--
> >>
> >> >>reloadable="true">
> >>
> >>
> >>
> >>--
> >>
> >>L.
> >>
> >>
> >>Mon Cab wrote:
> >>
> >>>Laurie & Paul
> >>>
> >>>Thanks for your help on this one.  Is there any
> >>
> >>way
> >>
> >>>that this could be configured to just reload the
> >>>specific classes that were changed, rather than
> >>>reloading the whole app?
> >>>
> >>>Also, I read the link you gave to "set context
> >>>reloadable to true", but couldn't quite see which
> >>
> >>file
> >>
> >>>I would set that in.  Would that be in web.xml?
> >>>
> >>>
> >>>
> >>>--- Mon Cab <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>
> >>>>Is there any way to avoid having to restart
> Tomcat
> >>>>every time a class is recompiled in a webapp.  
> I
> >>
> >>am
> >>
> >>>>debugging a webapp at the moment, and everytime
> I
> >>>>recompile my Action class I am having to wait 1
> >>>>minute
> >>>>for Tomcat to restart.  
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>  
> >>>>__ 
> >>>>Yahoo! FareChase: Search multiple travel sites
> in
> >>>>one click.
> >>>>http://farechase.yahoo.com
> >>>>
> >>>>
> >>>
> >>>
> >
>
-
> > 
> >>>>To unsubscribe, e-mail:
> >>>>[EMAIL PROTECTED]
> >>>>For additional commands, e-mail:
> >>>>[EMAIL PROTECTED]
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>>   
> >>>__ 
> >>>Start your day with Yahoo! - Make it your home
> >>
> >>page! 
> >>
> >>>http://www.yahoo.com/r/hs
> >>
> >>
> >>
> >
>
-
> > 
> >>To unsubscribe, e-mail:
> >>[EMAIL PROTECTED]
> >>For additional commands, e-mail:
> >>[EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > 
> > 
> > 
> > 
> > __ 
> > Yahoo! Mail - PC Magazine Editors' Choice 2005 
> > http://mail.yahoo.com
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Action.execute() only being invoked the first time a url is requested ??!!!

2005-11-18 Thread Mon Cab
Thanks Atta.  It is reloading the pages now.  

PS.  Is this default behaviour for STRUTS?  And if so,
do you know why?  It seems to me that the default
should should be not to cache pages with dynamic
content.  

Is there a way to configure this in Tomcat or in the
struts config?



--- atta-ur rehman <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> Most probably your page is gettnig cached by the
> browser. try
> 
> 
> 
> 
> 
> 
> 
> 
> or
> 
> <%
> response.setHeader("pragma", "no-cache");
> response.setHeader("Cache-Control", "no-cache");
> response.setHeader("Cache-Control", "no-store");
> response.setDateHeader("Expires", 0);
> %>
> 
> to keep your browser from caching the page and see
> if it works.
> 
> HTH.
> 
> ATTA
> 
> On 11/17/05, Mon Cab <[EMAIL PROTECTED]> wrote:
> >
> >
> > For Example if I type in my browser address bar:
> >
> >
>
http://127.0.0.1:8080/webapp/userSignup.do?action=whatever
> >
> > The first time, I type this in, this invokes the
> > execute method of my Action class (I'm using
> > System.out ("Action execute Invoked") in Action
> > execute to test this). If I then enter the exact
> same
> > url, this method is not getting called.
> >
> > I am not using validator at all!!
> >
> > Can anyone explain what is going on with this?
> >
> >
> >
> >
> > __
> > Yahoo! FareChase: Search multiple travel sites in
> one click.
> > http://farechase.yahoo.com
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Action.execute() only being invoked the first time a url is requested ??!!!

2005-11-17 Thread Mon Cab

For Example if I type in my browser address bar:

http://127.0.0.1:8080/webapp/userSignup.do?action=whatever

The first time, I type this in, this invokes the
execute method of my Action class (I'm using
System.out ("Action execute Invoked") in Action
execute to test this).  If I then enter the exact same
url, this method is not getting called.  

I am not using validator at all!!  

Can anyone explain what is going on with this?




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Runtime debugging - and Painfull Tomcat restarts

2005-11-13 Thread Mon Cab
Thanks Laurie. 

That helps a lot.  I read about the context.xml file,
but couldnt find an example file, and wasn't sure what
to write in it.  

After poking around in the conf directory, I was also
confused as to where I would find the host element.  

 do you know if its possible to specify which
parts of the app are reloaded, or will Tomcat, just
reload the whole app ? 



--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> There's various options for where you can define a
> context. From the top 
> of the page I liked to before:
> 
> --
> 
> In addition to nesting Context elements inside a
> Host element, you can 
> also store them:
> 
>  * in the individual
> $CATALINA_HOME/conf/context.xml file: the 
> Context element information will be loaded by all
> webapps
>  * in the individual 
>
$CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default
> file: 
> the Context element information will be loaded by
> all webapps of that host
>  * in individual files (with a ".xml" extension)
> in the 
> $CATALINA_HOME/conf/[enginename]/[hostname]/
> directory
>  * if the previous file was not found for this
> application, in 
> individual file at /META-INF/context.xml inside the
> application files
> 
> --
> 
> So, for example, you can create a file
> /META-INF/context.xml in your 
> webapp with something like the following in it:
> 
> --
> 
>  reloadable="true">
> 
> 
> 
> --
> 
> L.
> 
> 
> Mon Cab wrote:
> > Laurie & Paul
> > 
> > Thanks for your help on this one.  Is there any
> way
> > that this could be configured to just reload the
> > specific classes that were changed, rather than
> > reloading the whole app?
> > 
> > Also, I read the link you gave to "set context
> > reloadable to true", but couldn't quite see which
> file
> > I would set that in.  Would that be in web.xml?
> > 
> > 
> > 
> > --- Mon Cab <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>Is there any way to avoid having to restart Tomcat
> >>every time a class is recompiled in a webapp.   I
> am
> >>debugging a webapp at the moment, and everytime I
> >>recompile my Action class I am having to wait 1
> >>minute
> >>for Tomcat to restart.  
> >>
> >>
> >>
> >> 
> >>
> >>
> >>
> >>
> >>__ 
> >>Yahoo! FareChase: Search multiple travel sites in
> >>one click.
> >>http://farechase.yahoo.com
> >>
> >>
> > 
> >
>
-
> > 
> >>To unsubscribe, e-mail:
> >>[EMAIL PROTECTED]
> >>For additional commands, e-mail:
> >>[EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > 
> > 
> > 
> > __ 
> > Start your day with Yahoo! - Make it your home
> page! 
> > http://www.yahoo.com/r/hs
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Runtime debugging - and Painfull Tomcat restarts

2005-11-13 Thread Mon Cab
Laurie & Paul

Thanks for your help on this one.  Is there any way
that this could be configured to just reload the
specific classes that were changed, rather than
reloading the whole app?

Also, I read the link you gave to "set context
reloadable to true", but couldn't quite see which file
I would set that in.  Would that be in web.xml?



--- Mon Cab <[EMAIL PROTECTED]> wrote:

> Is there any way to avoid having to restart Tomcat
> every time a class is recompiled in a webapp.   I am
> debugging a webapp at the moment, and everytime I
> recompile my Action class I am having to wait 1
> minute
> for Tomcat to restart.  
> 
> 
> 
>  
> 
> 
> 
>   
> __ 
> Yahoo! FareChase: Search multiple travel sites in
> one click.
> http://farechase.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with "validwhen"

2005-11-13 Thread Mon Cab
Neat...  

Thanks Paul.  I didn't realize that it was possible to
nest multiple conditional statements (I read: "Only
two items may be joined with and or or" in the
documentation - which I am now assuming means only two
items in any set of parens).  



--- Paul Benedict <[EMAIL PROTECTED]> wrote:

> Mon,
> 
> There's two conditions here. The State and Zip are
> valid (not required) when... Always look at
> this as "valid" not "required"; you need to list out
> the conditions which will make the validation
> pass.
> 
> [1] the country is "United States" and *this* is not
> null
> [2] the country is not "United States" and *this* is
> null
> 
> (((*this* != null) && (country=="United States")) ||
> ((*this* == null) && (country!="United
> States")))
> 
> Remember, all your conditions must be wrapped into a
> parent parantheses.
> 
> --- Mon Cab <[EMAIL PROTECTED]> wrote:
> 
> > 
> > I am trying to use validwhen to make sure that
> > validator only requires a valid State and Zip if
> the
> > country selected is "United States".
> > 
> > But I am getting required error messages from both
> > state and zip when the form is submitted without
> these
> > values.
> >  
> > I am using the following config for validator:
> > 
> > 
> >  > depends="required,validwhen,mask">
> > 
> > 
> >   test
> >   (country=="United
> States")
> > 
> > 
> >   mask
> >   ^[A-Z]{2}$
> > 
> > 
> > 
> >  > property="zip"
> > depends="required,validwhen,mask">
> > 
> > 
> >   test
> >   (country=="United
> States")
> > 
> > 
> > 
> >   mask
> >   ^\d{5}$
> >
> >  
> > 
> > Is this wrong?  What should I be doing here?  
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > __ 
> > Yahoo! Mail - PC Magazine Editors' Choice 2005 
> > http://mail.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
>   
>   
> __ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with "validwhen"

2005-11-13 Thread Mon Cab
Nice one.  Thanks Lorie.  It works now.


--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> Mon Cab wrote:
> > I am trying to use validwhen to make sure that
> > validator only requires a valid State and Zip if
> the
> > country selected is "United States".
> > 
> > But I am getting required error messages from both
> > state and zip when the form is submitted without
> these
> > values.
> >  
> > I am using the following config for validator:
> > 
> > 
> >  > depends="required,validwhen,mask">
> > 
> > 
> >   test
> >   (country=="United
> States")
> > 
> > 
> >   mask
> >   ^[A-Z]{2}$
> > 
> > 
> > 
> >  > property="zip"
> > depends="required,validwhen,mask">
> > 
> > 
> >   test
> >   (country=="United
> States")
> > 
> > 
> > 
> >   mask
> >   ^\d{5}$
> >
> >  
> > 
> > Is this wrong?  What should I be doing here?  
> 
> You've specified a 'required' validation rule, so
> you're saying the 
> fields are always required. Remove the 'required'
> and change your test 
> to '(country != "United States") or (*this* !=
> null)'. See the 
> documentation on validwhen [1].
> 
> L.
> 
> [1] 
>
http://struts.apache.org/struts-doc-1.2.x/userGuide/dev_validator.html#validwhen
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Runtime debugging - and Painfull Tomcat restarts

2005-11-12 Thread Mon Cab
Is there any way to avoid having to restart Tomcat
every time a class is recompiled in a webapp.   I am
debugging a webapp at the moment, and everytime I
recompile my Action class I am having to wait 1 minute
for Tomcat to restart.  



 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problems with "validwhen"

2005-11-12 Thread Mon Cab

I am trying to use validwhen to make sure that
validator only requires a valid State and Zip if the
country selected is "United States".

But I am getting required error messages from both
state and zip when the form is submitted without these
values.
 
I am using the following config for validator:





  test
  (country=="United States")


  mask
  ^[A-Z]{2}$






  test
  (country=="United States")



  mask
  ^\d{5}$
   
 

Is this wrong?  What should I be doing here?  








__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What happens to exceptions not handled within Action class ?

2005-11-11 Thread Mon Cab
The browser is just redirecting to my "fail"
ActionMapping.  And there's nothing going in the logs
(neither the localhost, or the stdout logs) I'm using
Tomcat 5.0.28.



--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> Mon Cab wrote:
> > Specifically exceptions in execute().
> > 
> > Shouldnt these result in a stack trace printout in
> > Tomcat 5.  Or are they printed out to the logs.  
> 
> By default, you'll get a stack trace in the browser
> window and it'll 
> also be logged to stdout (console or catalina.out).
> 
> L.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



What happens to exceptions not handled within Action class ?

2005-11-10 Thread Mon Cab
Specifically exceptions in execute().

Shouldnt these result in a stack trace printout in
Tomcat 5.  Or are they printed out to the logs.  
  



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: barfs if it's parameter is null

2005-11-09 Thread Mon Cab
Nice one.  Thanks Rahul.  

I ended up wrapping in  tags...  


--- Rahul Akolkar <[EMAIL PROTECTED]> wrote:

> On 11/7/05, Mon Cab <[EMAIL PROTECTED]> wrote:
> > Hi all...
> >
> > I.e any way of using the  tag less
> > strictly, so that  > value="bla"> will not cause an exception if var is
> > null.  At the moment I am getting:
> 
> 
> Which is as advertised here [
>
http://struts.apache.org/struts-taglib/tagreference-struts-logic.html
> ]. Wrap in  or use JSTL  with
> JSTL fn:substring
> in the test.
> 
> -Rahul
> 
> 
> >
> >
> > javax.servlet.ServletException: Cannot compare
> null
> > variable to value signup
> >
> >
>
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



barfs if it's parameter is null

2005-11-07 Thread Mon Cab
Hi all...

I.e any way of using the  tag less
strictly, so that  will not cause an exception if var is
null.  At the moment I am getting:
 

javax.servlet.ServletException: Cannot compare null
variable to value signup

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)

org.apache.jsp.DatingSignupFrame_jsp._jspService(DatingSignupFrame_jsp.java:1365)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)

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:1063)

org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)

org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)

org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display an error image next to an invalid form field?

2005-10-24 Thread Mon Cab
IC. 

So the errorStyle tag on the offending field just says
if "this field has an error use this style"...



Is that right?



--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> How would you write what? The JSP? Just add 
> errorStyleClass="css-class-name" or whatever to each
> of your form 
> fields. Or do you mean how would you write the CSS?
> Something like 
> css-class-name { background: url('/path/to/img')
> left center no-repeat; 
> } in your style sheet should get you started.
> 
> L.
> 
> Mon Cab wrote:
> > Thanks Laurie
> > 
> > How would you write this.  The usage doesnt seem
> to be
> > clear from the tag API. 
> > 
> > 
> > 
> > --- Laurie Harper <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>Wendy Smoak wrote:
> >>
> >>>From: "Mon Cab" <[EMAIL PROTECTED]>
> >>>
> >>>>I know  will
> >>
> >>give me
> >>
> >>>>the error message for username, but I don't care
> >>
> >>about
> >>
> >>>>that.  I just want to display the error arrow.
> >>>
> >>>
> >>>Wrap the arrow in  using
> >>
> >>the same 'property' 
> >>
> >>>attribute.
> >>>
> >>>
> >>
> >
>
http://struts.apache.org/struts-taglib/tagreference-struts-logic.html#messagesPresent
> > 
> >>
> >>Or use the errorStyle... attributes and insert the
> >>image with CSS (note, 
> >>I haven't tried using the errorStyle{,Id,Class}
> >>attributes yet, but they 
> >>should be perfect for this).
> >>
> >>L.
> >>
> >>
> >>
> > 
> >
>
-
> > 
> >>To unsubscribe, e-mail:
> >>[EMAIL PROTECTED]
> >>For additional commands, e-mail:
> >>[EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > 
> > 
> > 
> > __ 
> > Yahoo! FareChase: Search multiple travel sites in
> one click.
> > http://farechase.yahoo.com
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display an error image next to an invalid form field?

2005-10-22 Thread Mon Cab
Thanks Laurie

How would you write this.  The usage doesnt seem to be
clear from the tag API. 



--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> Wendy Smoak wrote:
> > From: "Mon Cab" <[EMAIL PROTECTED]>
> > 
> >> I know  will
> give me
> >> the error message for username, but I don't care
> about
> >> that.  I just want to display the error arrow.
> > 
> > 
> > Wrap the arrow in  using
> the same 'property' 
> > attribute.
> > 
> >
>
http://struts.apache.org/struts-taglib/tagreference-struts-logic.html#messagesPresent
> 
> 
> Or use the errorStyle... attributes and insert the
> image with CSS (note, 
> I haven't tried using the errorStyle{,Id,Class}
> attributes yet, but they 
> should be perfect for this).
> 
> L.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display an error image next to an invalid form field?

2005-10-22 Thread Mon Cab
Thanks Wendy... 

Much appreciated. 


--- Wendy Smoak <[EMAIL PROTECTED]> wrote:

> From: "Mon Cab" <[EMAIL PROTECTED]>
> 
> > I know  will give
> me
> > the error message for username, but I don't care
> about
> > that.  I just want to display the error arrow.
> 
> Wrap the arrow in  using the
> same 'property' 
> attribute.
> 
>
http://struts.apache.org/struts-taglib/tagreference-struts-logic.html#messagesPresent
> 
> HTH,
> -- 
> Wendy
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display an error image next to an invalid form field?

2005-10-21 Thread Mon Cab
Lauri 

I want to do this: 


 

Forgive the "pseudo"-tags.  I don't know if there are
struts tags in to do this... 

I know  will give me
the error message for username, but I don't care about
that.  I just want to display the error arrow.  

Do you know how this would be done?



--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> Mon Cab wrote:
> >>I have read the struts documentation and am trying
> >>to
> >>work out how I would display an error image next
> to
> >>an
> >>invalid form field.
> >>
> >>Ramesh mentioned that   >>property="custName"/> would display the error
> >>message
> >>associated with a particular field.  Is there a
> (set
> >>of) struts tag(s) that would test whether a form
> >>field
> >>were invalid? (Maybe a combination of html and
> logic
> >>tags).
> >>
> >>I would like to do this without implementing any
> >>ActionForms.  Ideally I would like to specify
> >>DynaValidatorForms in the struts-config file, and
> >>specify field validations for those forms in the
> >>validation.xml file. 
> >>
> >>I am presuming that the struts framework would
> then
> >>generate a DynaValidatorForm object after the html
> >>form were submitted.   I am also presuming that
> this
> >>would automatically populate the  so
> >>that
> >>I could print the errors in my page, and I could
> >>print
> >>individual errors using  >>property="formfield">.  (Is this correct ??)
> 
> More or less, yes.
> 
> >>Is there a way of using struts tags to test for
> the
> >>validity of a specific form field.  How would this
> >>be
> >>written?  If not, what are the work arounds?
> 
> I'm not sure I understand what you want to do. You
> don't need to use any 
> tags to test whether form fields contain valid data;
> Struts will do that 
> for you based on your validator rules, as you
> describe above. The 
>  tag will then take care of figuring
> out whether there's 
> anything to display automatically.
> 
> L.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display an error image next to an invalid form field?

2005-10-20 Thread Mon Cab
> 
> I have read the struts documentation and am trying
> to
> work out how I would display an error image next to
> an
> invalid form field.
> 
> Ramesh mentioned that   property="custName"/> would display the error
> message
> associated with a particular field.  Is there a (set
> of) struts tag(s) that would test whether a form
> field
> were invalid? (Maybe a combination of html and logic
> tags).
> 
> I would like to do this without implementing any
> ActionForms.  Ideally I would like to specify
> DynaValidatorForms in the struts-config file, and
> specify field validations for those forms in the
> validation.xml file. 
> 
> I am presuming that the struts framework would then
> generate a DynaValidatorForm object after the html
> form were submitted.   I am also presuming that this
> would automatically populate the  so
> that
> I could print the errors in my page, and I could
> print
> individual errors using  property="formfield">.  (Is this correct ??)
> 
> Is there a way of using struts tags to test for the
> validity of a specific form field.  How would this
> be
> written?  If not, what are the work arounds?
> 
> 
> 
> 
> 
>   



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]