RE: Multiple Datasources

2002-03-12 Thread BinhMinh Nguyen


I have a strange problem, can someone tell me what is
wrong?

I use form based authentication with Websphere using
custom registry,
setup in web.xml is as below.

when I tried to access a protected resource URL,
http://bhn.gers.com:9080/furnnet/main/dispatcher.do,
since everything
under dir "/main" is defined to be protected in the
web.xml, I was
brought to the login page as expected, after submit
the form with the
j_username and j_password, I got a 404 file not found,
as below,
but in fact the user had been authenticated because if
I resubmit the
same URL link, I was able to access that URL link.
Can someon tell me what is wrong with it or my setup?
thanks

Binh


 
fn
access
/main/*

POST
GET
 
 
fn access:+:
fnUser
 
 
   
NONE
 
  
  
 FORM
 dbRealm
 
   
/logon.html
   
/error.jsp
 
  
  
 fnUser
  

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Form Based authentication with STRUTS and WEBSPHERE

2002-03-07 Thread BinhMinh Nguyen

Hi,

My webapp is implemented based on struts and deployed
to WebSphere.

I am using custom-user-registry  to protect web
resource. I have setup
everything. when start the Admin Console, it asked me
for the user
name and password, I entered those parameters and it
let passed that
point, so I assumed that the custome user registry I
implemented 
works.


But when tried to access the protected resource, it
seems like the
application entered some sort of infinite loop, the
browser keeps
browsing and browsing...
and it seems like it would never stop !:(


I am not sure that I can use .do in websphere??? but
it works fine in weblogic. 


/login.do
   
/loginerror.do
 





The application.xml defines the role, "role-fn-user", 

This role is mapped to a group in the database at the
time of
deployment (I selected option "select users/groups" in
the "user role
mapping" panel at deployment time. I believe that the
Admin Cosole
does look up for the group in the DB using the custom
Registry because
I did test change the value of the group in the group
table and it
does return the right value if I made the change.

I am sure that I missed something or have done
something wrong. Please
help me sole this problem, I spent the last three days
trying to solve
it, but I cannot

Thanks in advance

Xenoux



   
  Furnnet
  
 Furnnet_EJB.jar
  
  
 
furnnet.war
/furnnet
 
  
  
 role-fn-user
  
   
Post a follow-up to this message





__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Problem with tag - still not working

2001-11-29 Thread BinhMinh Nguyen

Ted,
thanks for reply, I did what you suggested, but it
still does not work, I also double check the tld
import statement. Do you have any idea why?
thanks

Binh


--- Ted Husted <[EMAIL PROTECTED]> wrote:
> Double check that the taglib is imported at the top
> of the JSP. 
> 
> You can also set 
> 
> 
>null
>false
> 
> 
> in the web.xml so that it will report any missing
> message keys.
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel +1 716 737-3463
> -- http://www.husted.com/struts/
> 
> 
> BinhMinh Nguyen wrote:
> > 
> > For some reasons, this  is no longer
> > working for me :( can some one help me out?
> > 
> > In the web.xml, I  added this
> > 
> > 
> > 
> >application
> >   
> ApplicationResources
> > 
> > 
> > In the struts-config.xml, I  added this:
> > 
> > 
> > 
> >  > 
> > type="com.fnet.struts.login.ForgetPasswordAction"
> > name="forgetPasswordForm"
> > input="/login.jsp"
> > scope="request"
> > validate="true">
> > 
> > 
> > 
> >   
> > 
> > in the ACtionForm bean my validate method work
> fine:
> > 
> >  public ActionErrors validate(ActionMapping
> mapping,
> > HttpServletRequest request)
> >{
> > 
> >
> FNPrinter.toScreen("-validate():
> > validating User-info ...");
> >   ActionErrors errors = new ActionErrors();
> > 
> > 
> >   if ((userId == null) || (userId.length() <
> 1))
> >   {
> > 
> > FNPrinter.toScreen("-invalid
> > UserId: " + userId);
> >  errors.add("errInvalidUserId", new
> >
> ActionError("error.login.forgetpw.userid.invalid"));
> >   }
> > 
> >   if ((userEmail == null) ||
> (userEmail.length() <
> > 1))
> >   {
> > 
> > FNPrinter.toScreen("-invalid
> > UserEmail: " + userEmail);
> >  errors.add("errInvalidUserEmail", new
> >
>
ActionError("error.login.forgetpw.useremail.invalid"));
> >   }
> > 
> >   FNPrinter.toScreen("Error-Log: " +
> > errors.size());
> > 
> >   return errors;
> >}
> > 
> > and the jsp page , I tried to display the error
> like
> > this:
> > 
> >  
> > User_Name:  
> > 
> > 
> >   
> >  />
> > 
> > 
> > 
> > my Application resources also has the property for
> > this key...
> > 
> > it still does not work for me,
> > 
> > CAn someone help me on this.
> > thanks
> > 
> > Binh
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! GeoCities - quick and easy web site
> hosting, just $8.95/month.
> > http://geocities.yahoo.com/ps/info1
> > 
> > --
> > To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> u can also set 
> 
> 
>null
>false
> 
> 
> in the web.xml, so it will report any missing
> messages. 
> 
> BinhMinh Nguyen wrote:
> > 
> > For some reasons, this  is no longer
> > working for me :( can some one help me out?
> > 
> > In the web.xml, I  added this
> > 
> > 
> > 
> >application
> >   
> ApplicationResources
> > 
> > 
> > In the struts-config.xml, I  added this:
> > 
> > 
> > 
> >  > 
> > type="com.fnet.struts.login.ForgetPasswordAction"
> > name="forgetPasswordForm"
> > input="/login.jsp"
> > scope="request"
> > validate="true">
> > 
> > 
> > 
> >   
> > 
> > in the ACtionForm bean my validate method work
> fine:
> > 
> >  public ActionErrors validate(ActionMapping
> mapping,
> > HttpServletRequest request)
> >{
> > 
> >
> FNPrinter.toScreen("-validate():
> > validating User-info ...");
> >   ActionErrors errors = new ActionErrors();
> > 
> > 
> >   if ((userId == null) || (userId.length() <
> 1))
> >   {
> > 
> > FNPrinter.toScreen("-invalid
> > UserId: " + userId);
> >  errors.add("errInvalidUserId", new
> >
> ActionError("error.login.forgetpw.userid.invalid"));
> >   }
> > 
> >   if ((userEmail == null) ||
> (userEmail.length() <
> > 1))
> >   {
> > 
> > FNPrinter.toScreen("-invalid
> > UserEmail: " + userEmail);
> >  errors.add("errInvalidUserEmail", new
> >
>
ActionError("error.login.forgetpw.useremail.invalid"));
> 
=== message truncated ===


__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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




Problem with tag

2001-11-29 Thread BinhMinh Nguyen

For some reasons, this  is no longer
working for me :( can some one help me out?

In the web.xml, I  added this



   application
   ApplicationResources



In the struts-config.xml, I  added this:







 

in the ACtionForm bean my validate method work fine:

 public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request)
   {
 
FNPrinter.toScreen("-validate():
validating User-info ...");
  ActionErrors errors = new ActionErrors();
  
  
  if ((userId == null) || (userId.length() < 1))
  {

FNPrinter.toScreen("-invalid
UserId: " + userId);
 errors.add("errInvalidUserId", new
ActionError("error.login.forgetpw.userid.invalid"));
  }

  if ((userEmail == null) || (userEmail.length() <
1))
  {

FNPrinter.toScreen("-invalid
UserEmail: " + userEmail);
 errors.add("errInvalidUserEmail", new
ActionError("error.login.forgetpw.useremail.invalid"));
  }
  
  FNPrinter.toScreen("Error-Log: " +
errors.size());
  
  return errors;
   }


and the jsp page , I tried to display the error like
this:

 
User_Name:  


  





my Application resources also has the property for
this key...

it still does not work for me, 

CAn someone help me on this.
thanks

Binh


__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: MAPPING PROBLEM

2001-11-21 Thread BinhMinh Nguyen

Hi,
thanks for replying, but I dont really understand your
point much since I am new to struts, can you one more
time,  reexplain it to me?
I really appeciate your help.
Binh

--- Yee Keat <[EMAIL PROTECTED]> wrote:
> There might be several problems in your code, one
> being that the action 
> should be /jsp/login.do (not the extra slash in
> front) coz if you login.jsp 
> is in /jsp, and /jsp/jsp does not exist, it won't
> see the login.do. Try if 
> that works.
> 
> Anyway, you don't have to put your login.do link
> inside /jsp, I think you can 
> just point it to anywhere, since they are forwarded
> and are not real files, 
> for my projects, we use "." instead of "/" for
> actions.
> 
> Help this helps..
> 
> cheers.
> On Wednesday 21 November 2001 07:43 am, you wrote:
> > Hi,
> > Please help me with this problem, I spent hours on
> it,
> > but still canotsolve it.
> >
> > I have a jsp page named "login.jsp" in my
> application
> > named "furnnet", also this is the application
> path, so
> > if I use Tomcat, the application path looks like
> this:
> >
> > TAMCAT_HOME/webapps/furnnet/
> >
> > in order to oeganize my jsp, my application will
> look
> > like
> >
> > furnnet/
> >jsp/login.jsp
> >...
> >...
> >WEB-INF/
> >lib/
> >
> >
> > and here below is a snippet from struts-config:
> > 
> > 
> >  >
> > type="com.fnet.struts.login.LoginAction"
> >name="loginForm"
> >scope="request"
> >validate="true"
> >input="/jsp/login.jsp">
> >> path="/dispatch.ctl"/>
> > 
> >
> > and from the page login.jsp
> >  > action="jsp/login.do">
> >
> >
> > it seems that nothing will happen if I have the
> > login.jsp under the directory jsp.
> >
> > if I move the jsp to the root directory and change
> the
> > config file accordingly, then it works. But then
> > application structure will look so ugly because I
> will
> > have to put all the jsp pages in the root...can
> > someone help me solve the problem.
> > Thank you very much
> > Binh
> >
> >
> >
> >
> >
> > __
> > Do You Yahoo!?
> > Yahoo! GeoCities - quick and easy web site
> hosting, just $8.95/month.
> > http://geocities.yahoo.com/ps/info1
> 
> -- 
> Cheers,
> 
> Yee Keat
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




MAPPING PROBLEM

2001-11-20 Thread BinhMinh Nguyen


Hi,
Please help me with this problem, I spent hours on it,
but still canotsolve it.

I have a jsp page named "login.jsp" in my application
named "furnnet", also this is the application path, so
if I use Tomcat, the application path looks like this:

TAMCAT_HOME/webapps/furnnet/

in order to oeganize my jsp, my application will look
like

furnnet/
   jsp/login.jsp
   ...
   ...
   WEB-INF/
   lib/
   

and here below is a snippet from struts-config:



  


and from the page login.jsp



it seems that nothing will happen if I have the
login.jsp under the directory jsp.

if I move the jsp to the root directory and change the
config file accordingly, then it works. But then
application structure will look so ugly because I will
have to put all the jsp pages in the root...can
someone help me solve the problem.
Thank you very much
Binh

   



__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts 1.1 Beta and release version questions

2001-10-04 Thread BinhMinh Nguyen

Hi,

I am currently using Struts 1.0 and very happy with
it.

But when I tried overnight version of struts1.1, I
have alot of problems. I dont want to switch into
version 1.1 yet since it is not stable for now, but in
the other hand, I want to up front too.

my decision is now based on how soon the next beta
version of struts 1.1 is out and how long after beta,
a release version is out.
this will help us make the decision very much
thank you 
Binh

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



Problem integrating STRUTS and WEBLOGIC 6.0

2001-10-04 Thread BinhMinh Nguyen

Hi, 
I posted this one once, but I have response, please
help me.


I download the Struts overnight release version, I
then copy the struts-upload.war into the app directory
of weblogic. I then got the below error message.
Please help me spot out my problem, it took my hours
and I still could not fix it. It also happened when I
copy this same struts-upload.war into Tomcat 3.2.3
I really need this to be fix, help me please.
Thank you very much
BHN

Error Message:

  
<[WebAppServletContext(3162544,struts-upload)] Error
loading
et: 'action'
java.lang.NoSuchMethodError
at
org.apache.commons.digester.Digester.parse(Digester.java:859)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1273)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:460)
at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:638)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:581)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:526)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1078)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:1022)
at
weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:499)
at
weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)


__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



STRUT 1.1 beta and release versions

2001-10-03 Thread BinhMinh Nguyen

Do you have any idea when struts 1.1 beta is out and
normally how long after beta version, the release
version is out.

by the way, I have big time problem problem upgrading
strut1.0 to overnight release version.
please give some advises
Thank you very much
Binh

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



weblogic 6.0 and STRUTS problem

2001-10-03 Thread BinhMinh Nguyen

Hi
I have the below error when I copy the
struts-upload.war to webLogic6.0sp1. It just cannot
load the app.

Can you tell me why? 

Thanks
Binh

t: 'action'
java.lang.NoSuchMethodError
at
org.apache.commons.digester.Digester.parse(Digester.java:859)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1273)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:460)
at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:638)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:581)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:526)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1078)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:1022)
at
weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:499)
at
weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)
at
weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at
weblogic.j2ee.Application.addComponent(Application.java:126)
at
weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:283)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:109)
at
weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
at java.lang.reflect.Method.invoke(Native
Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:562)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:548)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:285)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at
weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



DataSource problem with NIGHTLY-BUILD version- 20010911 of STRUTS

2001-09-26 Thread BinhMinh Nguyen


I have no problem using Datasource in STRUT version
1.0, but when I upgrade STRUTS to nightly version, I
have a problem using datasource. Here how it happens

I first replace the XML parser and JAXP so that it can
support Namespace. Then I follow the instruction in
the "Nighlt Release" and I restart the Tomcat server.

TOMCAT complain that It cannot locate the
GenericDataSource. Something like this:
"
New org.apache.struts.util.GenericDataSource
EM> java.lang.NoClassDefFoundError:
org.apache.struts.util.GenericDataSource
" 

I then followed some threads in the user-groups, they
said that I need to add jdbc2_0-stdext.jar to the
CLASSPATH or to the
WEB_INF/lib directory inside of your application. I
tried both ways. I still cannot sovled the problem . I
did open the the 'struts.jar' in the WEB-INF/lib to
make sure the GenericDataSource class is there.
Everything seems to be in the right place. but I
cannot get rid of the error. Please help me.

Thanks
Binh


__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com



Please Help !!!! STRUTS and TOMCAT 3.3 Beta 1 Problem.

2001-08-23 Thread BinhMinh Nguyen

Please help!!!
My application works fine in Tomcat version 3.2.3.
But if this same application is deployed in Tomcat
version 3.3 beta1.0. I got the below error message
when startup the Tomcat Server. I think there is
something worng with the XML Parser API. Do I need a
new XML Parser Version? or How can I fix this problem

thank you very much 
Binh



2001-08-21 14:33:40 - LoadOnStartupInterceptor: cannot
load servlet name: action -
java.lang.NoClassDefFoundError:
org/xml/sax/SAXExceptio
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at
org.apache.tomcat.facade.ServletHandler.getServlet(ServletHandler.java:348)
at
org.apache.tomcat.facade.ServletHandler.preInit(ServletHandler.java:402)
at
org.apache.tomcat.facade.ServletHandler.init(ServletHandler.java:227)
at
org.apache.tomcat.facade.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:136)
at
org.apache.tomcat.core.Context.init(Context.java:501)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:588)
at
org.apache.tomcat.startup.EmbededTomcat.initContextManager(EmbededTomcat.java:310)
at
org.apache.tomcat.startup.Tomcat.startTomcat(Tomcat.java:176)
at
org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:120)
at java.lang.reflect.Method.invoke(Native
Method)
at
org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:87)
at
org.apache.tomcat.startup.Main.execute(Main.java:305)


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



struts and Tomcat 3.3 Beta 1.0 problem

2001-08-21 Thread BinhMinh Nguyen

My application works fine in Tomcat version 3.2.3.
But if this same application is deployed in Tomcat
version 3.3 beta1.0. I got the below error message
when startup the Tomcat Server. I think there is
something worng with the XML Parser API. Do I need a
new XML Parser Version? or How can I fix this problem

thank you
Binh



2001-08-21 14:33:40 - LoadOnStartupInterceptor: cannot
load servlet name: action -
java.lang.NoClassDefFoundError:
org/xml/sax/SAXExceptio
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at
org.apache.tomcat.facade.ServletHandler.getServlet(ServletHandler.java:348)
at
org.apache.tomcat.facade.ServletHandler.preInit(ServletHandler.java:402)
at
org.apache.tomcat.facade.ServletHandler.init(ServletHandler.java:227)
at
org.apache.tomcat.facade.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:136)
at
org.apache.tomcat.core.Context.init(Context.java:501)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:588)
at
org.apache.tomcat.startup.EmbededTomcat.initContextManager(EmbededTomcat.java:310)
at
org.apache.tomcat.startup.Tomcat.startTomcat(Tomcat.java:176)
at
org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:120)
at java.lang.reflect.Method.invoke(Native
Method)
at
org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:87)
at
org.apache.tomcat.startup.Main.execute(Main.java:305)
at org.apache.tomcat.startup.Main.main(Main.java:191)

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: how to define a datasource in struts?

2001-08-21 Thread BinhMinh Nguyen

Here it is. Hope it helps.
in struts-config:


  
  
 
 
 
 
 
 
 
 
 
   
  
  


in java code:

fnDataSource =
(DataSource)(getServlet().getServletContext().getAttribute(Action.DATA_SOURCE_KEY));



Binh Minh Nguyen

--- Satyan Nair <[EMAIL PROTECTED]> wrote:



> Hi everyone,
> i m new to struts.. if anyone can tell me where to
> find the archive of the
> mailing lists then the problems already discussed
> won't come again and
> again...
> anyway i would like to know how to define datasource
> in struts... i tried
> using the example given with struts... but i must be
> missing something to be
> configured.. i configured the struts-config.xml
> file... for defining the
> datasource... but it gives me ActionMapping
> errors...
> 
> take care everyone
> 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Is this a bug in STRUTS? or TOMCAT? Or Did I mis something? Please help.

2001-08-20 Thread BinhMinh Nguyen

hi all,
I have a very interesting problem, and here how it
occurs:

my formJSP have two button: SUBMIT and EXIT.
if the user is authenticated, when the Submit button
is clicked, the form is submitted succesfully and the
user is brought to another JSP page, let say Thank-you
page.

But let say, if the session is timed out. Then the 
user is brought back to the loggin page and is forced
to log-in again, after entering usrname and password
and press enter, the browser show a blank screen while
the user is supposed to be redirected to the Thank-you
Page. It seems that the servlet is not retained the
destination: Thank-you page at all.

Is that a problem with STRUTS, TOMCAT or Did I miss
anything in in setting up the servlet?

Thank you very much.
Binh Nguyen



__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



-tag problem

2001-08-16 Thread BinhMinh Nguyen

hi,
Here is my problem:
I have to use pre-populate method to pre-fill the
toForm based on some data from the previous JSP,
called 'fromForm', but the only HTML components
available for me is to use , since I can
set the property such as


But, as you all know, the text-tag does not provide a
good looking, because the user dont need to enter
anything into the text-field. Then I set the attribute
'disabled="true", but it can only make little
improvement.

  
How do I make my text-field, using  tag,
look like there is no text-field there at all? Or any
other HTML-comp I can use instead

Thank you very much
 
Binh Nguyen

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



How do I set the default Forward in action form

2001-08-14 Thread BinhMinh Nguyen

Hi,
I run across a little problem I dont know how to
solve, please help.

I have three buttons: OK, RESET, and EDIT and one
text-field. Under normal case, after entering the text
in the text-field, user will click on one of the three
buttons,And  I handle the button-events as followed in
my Action.java class:
 
String btnOK= request.getParameter("OK");
String btnRESET = request.getParameter("RESET");
String btnEDIT  = request.getParameter("EDIT");


if(btnOK != null)
{   
   return return mapping.findForward("submit");
}

if(btnRESET != null)
{   
   return return mapping.findForward("reset");
}
if(btnEDIT != null)
{   
   return return mapping.findForward("edit");
}



Here come my question:

If the user enter the text in the text-field and press
the  key (ascii=13) on the key board when the
text-filed still has the focus, ie. none of the button
is clicked, How do I force the form to submit? ie.
behave as the button OK is clicked.

For now, I have the blank screen browsed up.

Thank you very much.

Binh




__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: How can I get the DataSource from a JSP page

2001-08-14 Thread BinhMinh Nguyen

Hi Kent, Luis,
I do agree that a datasource should be in the logic
layer, not in the JSP/prsentation layer, but I have a
problem to populate the JSP combo box with data that
is retrieved from the database when they first logn
the page. And I think getting a datasource here is
good enouhg :) . Do you have any idea  to avoid this.
thank you very much for your help. I think of
prepopulate but I donnot know how to implement it.

Binh

--- Luis Olivares <[EMAIL PROTECTED]> wrote:
> Why don't you put it inside a Custom Tag? That way
> you don't put it in the
> presentation layer.
> 
> I think with the code sample that Craig shows us is
> possible.
> 
> <%
>   DataSource ds = (DataSource)
>   
>
application.getAttribute("org.apache.struts.action.DATA_SOURCE");
>   ...
> %>
> 
> Am I right?
> 
> Regards
> 
> Luis Olivares.
>  Infosphere S.A. de C.V.
>  "Delivering the Power of Information"
>
>
-
>   (52)8-365-42-88 Ext. 107.
> [EMAIL PROTECTED]
> 
> - Original Message -
> From: "Kent Roylance" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, August 13, 2001 9:27 PM
> Subject: RE: How can I get the DataSource from a JSP
> page
> 
> 
> > Binh,
> >
> > Why would you want to get a DataSource from a JSP
> page?  I would not
> > recommend using a DataSource at the presentation
> level.  Normally, you
> would
> > get the data from the action class and store it in
> the session so that
> your
> > presentation layer can use it.  It is much easier
> that way, and a cleaner
> > separation of the data, business logic, and
> presentation layers.  Just a
> > suggestion.
> >
> > Kent
> >
> > -Original Message-
> > From: BinhMinh Nguyen
> [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, August 13, 2001 5:51 PM
> > To: [EMAIL PROTECTED]
> > Subject: How can I get the DataSource from a JSP
> page
> >
> >
> > Hi,
> >
> > I know how to get a DataSource from a Action java
> > class
> >  but I do not know how to obtain a DataSource from
> a
> > JSP page.
> > Please show me how.
> > thank you very much
> > Binh Nguyen
> >
> > __
> > Do You Yahoo!?
> > Send instant messages & get email alerts with
> Yahoo! Messenger.
> > http://im.yahoo.com/
> 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Context error when load images

2001-08-08 Thread BinhMinh Nguyen

Hi,
I have a a JSP page, on which I have loaded a couples
of images, eventhough the images loaded all the images
correctly, I till get the following error messages,  
Can you tell me why? thank you very much
Binh


2001-08-08 11:18:48 - Ctx( /templates ): IOException
in: R( /templates + /images/news-over.gif + null)
Connection aborte
d by peer: socket write error
2001-08-08 11:18:48 - Ctx( /templates ): IOException
in: R( /templates + /images/bgtop.gif + null)
Connection aborted by
 peer: socket write error
2001-08-08 11:18:48 - Ctx( /templates ): IOException
in: R( /templates + /images/bgbottom.gif + null)
Connection aborted
 by peer: socket write error

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Problem using "TILES" template with STRUTS

2001-08-03 Thread BinhMinh Nguyen

Hi,
I am a big fan of your "Components", it woks very
pretty. But since you rename "Component" to "Tiles"
things are not pretty any more:)
I have hard time switching one "Components" to "Tiles"
, I did every things following your instrcutions, and
it is  still not working. 

Even when I just copy directly the"tiles-doc-war" that
is provided in the tiles.zip file into my "webapps"
directory of Tomcat and tried to run it, Tomcat-
3.2.3,  just cannot load it.  
NeClassDefFoundException: SAV's defaultHAndler cannot
be found or something.   

I am now waiting for the "Tiles" tutorials :) right
now it is not avaialbe yet.

Can anyone provide more details tutorials or step by
step config about  using "Tiles" ,  what is the
minimal requirements to use Tiles:  what API, what it
to be in web.xml, strut-config.xml, and
componentDefintions.xml



thank you very much



__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



problem loading ActionServlet with DataSource

2001-07-30 Thread BinhMinh Nguyen

For some reason, my application cannot load
ActionServlet if we use Connection Pooling using
DataSource in the struts-config.xml, Please help me
spot my error. Thank you.
B Nguyen

--
strut-config.xml:




http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>






  
  







  


  
   



  


  

  
 
 
 
 
 
 
 
 
 
 
 
 
   
   
   
 
  
  
  
  
  
  
 
 
 
 
 
 
 
 


  
  
  

  





--

error-message:

Parse Error at line 71 column -1: Element
"struts-config" allows no further input;
"data-sources" is not allowed.
org.xml.sax.SAXParseException: Element "struts-config"
allows no further input; "data-sources" is not
allowed.
at
com.sun.xml.parser.Parser.error(Parser.java:2795)
at
com.sun.xml.parser.ValidatingParser$ChildrenValidator.consume(ValidatingParser.java:306)
at
com.sun.xml.parser.Parser.maybeElement(Parser.java:1281)
at
com.sun.xml.parser.Parser.content(Parser.java:1499)
at
com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at
com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at
com.sun.xml.parser.Parser.parse(Parser.java:284)
at
javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at
javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at
org.apache.struts.digester.Digester.parse(Digester.java:755)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1271)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:459)
at
s1.struts.component.ActionComponentServlet.init(ActionComponentServlet.java:45)
at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
at
org.apache.tomcat.core.Handler.init(Handler.java:215)
at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
at
org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
at
org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
New org.apache.struts.util.GenericDataSource
Set org.apache.struts.util.GenericDataSource
properties
Call
s1.struts.component.ActionComponentServlet.addDataSource(org.apache.struts.action.DATA_SOURCE,
GenericDataSource[activeCount=0
, autoCommit=true, closed=false, driverClass=null,
loginTimeout=0, maxCount=2, minCount=1, password=null,
readOnly=false, url=null,
 useCount=0, user=null])
Set org.apache.struts.util.GenericDataSource property
key to FN_local
Set org.apache.struts.util.GenericDataSource property
autoCommit to true
Set org.apache.struts.util.GenericDataSource property
description to FN Data Source Configuration
Set org.apache.struts.util.GenericDataSource property
driverClass to oracle.jdbc.driver.OracleDriver
Set org.apache.struts.util.GenericDataSource property
maxCount to 4
Set org.apache.struts.util.GenericDataSource property
minCount to 2
Set org.apache.struts.util.GenericDataSource property
password to furnnet
Set org.apache.struts.util.GenericDataSource property
user to furnnet
Set org.apache.struts.util.GenericDataSource property
url to jdbc:oracle:thin://localhost:1521/furnnet
Pop org.apache.struts.util.GenericDataSource
cannot load servlet name: action: Exception
initializing application data source org.apache.struts.action.DATA_SOURCE

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



problem calliung validate() method in ActionForm

2001-07-27 Thread BinhMinh Nguyen

Hi,
I have a problem calling the validate(...) method from
the ActionForm: this is what I have done:

1- implement the validate() method in ActionForm,
2- in struts-config.xml, set the validate attribute to
true for the action-mapping.

But the method is not called when I clicked one of the
buttons in the form.
What I would like to do is to validate the fields in
the form, Please give me any examples if possible.
Thank you very much
Binh Minh Nguyen

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Handle Errors with JSP file

2001-07-26 Thread BinhMinh Nguyen

Hi,

I have jsp files that handle unchecked runtime errors
with a "errorPage='error.jsp'" atrribute. Everything
works fine with regular JSP. When I implement those
jsp using Struts, the application works still fine but
the error handling part, ther eis no way I can send
the error exception to the "error.jsp" anymore. Please
help me solve this problem, I really appreciate your
help. Please give examples if possible. Thanks
Note: I read the thing about ErrorTag, but to be
honest, I dont understand much. Please give me some
ideas.
Trully thanks
BM Nguyen


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Begginer: how do i know what button is clicked from a strut form

2001-07-18 Thread BinhMinh Nguyen

I am new to struts and got stuck.

Please anyone tell me how do i know what button is
clicked to detect the event from a strut:form.
For example, my form have three buttons: OK, RESET,
CANCEL, I would like to perform tasks that are
associated with these button, but I dont know how to
detect what button is clicked.

Please give me example if possible thank you

BM Nguyen

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/