You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Cheng, Sophia" <SC...@camitro.com> on 2002/02/05 04:20:40 UTC

display property

Hi,


I can show data correctly in a table by using the following syntax, 
  
<td><html:text property="deptName" size="80"/></td>

But, if I just want to display the data(property), instead of putting data
in a text field, say 

<td>Department A</td>

Then, which tag should I use?

Thanks,
Sophia


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Database Servlet

Posted by Robert Scaduto <rs...@douwantit.com>.
You could keep a reference to the last modified date of the xml file when
you init the servlet and then check the timestamp every time your main page
runs.  If it changes the re-run the digester.

-or-

If you don't have access to the timestamp then, you could refresh at
periodic intervals on a different thread. And then replace the old java
beans in the ServletContext.

-or-

You can read the file every time if the page needs to be in sync at all
times. This is the most accurate solution but not the most efficient.

Hope this helps,

Rob

-----Original Message-----
From: Konstantina Stamopoulou [mailto:stak@intracom.gr]
Sent: Tuesday, February 05, 2002 7:43 AM
To: Struts Users Mailing List
Subject: Database Servlet


Hello,

I apologize if my question sounds naive but I really need your help on this.
 I have a servlet that during initialization parses an .xml file using
Digester. Then I access the data in  my jsps through JavaBeans. What I need
to do, is to have my main page which displays the data from the .xml to be
updated with the new data each time the .xml is modified.
In order to do this, do I have to put the code of the init() method of my
servlet in the Action class of the main page or is it a more elegant way to
do this?

Thank you  in advance,
Konstantina


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Database Servlet

Posted by Konstantina Stamopoulou <st...@intracom.gr>.
Hello,

I apologize if my question sounds naive but I really need your help on this.
 I have a servlet that during initialization parses an .xml file using
Digester. Then I access the data in  my jsps through JavaBeans. What I need
to do, is to have my main page which displays the data from the .xml to be
updated with the new data each time the .xml is modified.
In order to do this, do I have to put the code of the init() method of my
servlet in the Action class of the main page or is it a more elegant way to
do this?

Thank you  in advance,
Konstantina


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: changing regexp in default validation

Posted by Andy Noble <an...@data-workshop.com>.
Hi Ivan,

I had this problem too...

The source of the problem lies in the Jakarta RegExp implementation that
Struts Validator uses. I ended up downloading the source to RegExp and
stepping through the code. To bypass the problem, I replaced the RegExp
regular expression handler with Jakarta ORO. This now works fine for me.

Le me know if you want me to post the files I've changed to you. I'm using
Struts Validator20010702.

Regards
Andy

----- Original Message -----
From: "Ivan Siviero" <iv...@concept.it>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, February 05, 2002 9:20 AM
Subject: changing regexp in default validation


> Hi struts users.
>
> I'm posting a question on struts validator.
> Well, as you all know, the struts validator implements an email validation
> which is defined in the org.apache.......StrutsValidator validateEmail()
> method. (Sorry if the names are not 100% equals to the original ones).
> Anyway this method uses a jakarta regexp string to validate the email.
> So now let's suppose i want to change that validation string, as it
> considers not valid some email addresses which are valid for me.
> i.e: myname@myCompany-myDepartment.com
> I have the validation strings who considers the above email as valid but i
> cannot figure out where it must be inserted in the validator.xml file to,
> tell the validateEmail() method to use it insted of the default one.
> Can someone help me ?
> Thanx everyone.
> Ivan.
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


changing regexp in default validation

Posted by Ivan Siviero <iv...@concept.it>.
Hi struts users.

I'm posting a question on struts validator.
Well, as you all know, the struts validator implements an email validation
which is defined in the org.apache.......StrutsValidator validateEmail()
method. (Sorry if the names are not 100% equals to the original ones).
Anyway this method uses a jakarta regexp string to validate the email.
So now let's suppose i want to change that validation string, as it
considers not valid some email addresses which are valid for me.
i.e: myname@myCompany-myDepartment.com
I have the validation strings who considers the above email as valid but i
cannot figure out where it must be inserted in the validator.xml file to,
tell the validateEmail() method to use it insted of the default one.
Can someone help me ?
Thanx everyone.
Ivan.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat3.3 Struts1.0 = Segmentation violation ?

Posted by "emmanuel.boudrant" <b7...@yahoo.fr>.
Here another error message under Tomcat 3.3 / Struts 1.0.


Location: /basepat/saisiefiche2.jspErreur interne de servlet:java.lang.VerifyError: (class: saisiefiche2_1, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Illegal target of jump or branch	at java.lang.Class.newInstance0(Native Method)	at java.lang.Class.newInstance(Class.java:237)	at org.apache.tomcat.facade.ServletHandler.getServlet(Unknown Source)	at org.apache.tomcat.facade.ServletHandler.preInit(Unknown Source)	at org.apache.tomcat.facade.ServletHandler.init(Unknown Source)	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)	at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Unknown Source)	at org.apache.tomcat.facade.RequestDispatcherImpl.forward(Unknown Source)	at org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2149)	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)	at javax.servlet.http.HttpServlet.service(HttpServlet.java)	at javax.servlet.http.HttpServlet.service(HttpServlet.java)	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)	at org.apache.tomcat.core.Handler.invoke(Unknown Source)	at org.apache.tomcat.core.Handler.service(Unknown Source)	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)	at org.apache.tomcat.core.ContextManager.service(Unknown Source)	at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)	at java.lang.Thread.run(Thread.java:484)
 --- "emmanuel.boudrant"  a écrit : > > Hello,> > I've got a struts 1.0 application on a tomcat 3.3,> but I've got a FATAL ERROR when I trying to access> an action.> The form associed to this action is stocked in> session and contain about 20 fields.> > The application crash on Tomcat 3.3 / Solaris 8 &
> W2K.> > The application work fine on Tomcat 3.2 / Solaris 8> & W2K> >  > > Here the Solaris 8 error message:> > EmbededTomcat: Startup time 41> 2002-02-04 17:30:26 - SessionIdGenerator: Created> random class java.security.SecureRandom> 2002-02-04 17:30:41 - DecodeInterceptor: Charset> from session ISO-8859-1> 2002-02-04 17:30:44 - DecodeInterceptor: Charset> from session ISO-8859-1> SIGSEGV 11 segmentation violation>     si_signo [11]: SEGV>     si_errno [0]: >     si_code [1]: SEGV_MAPERR [addr: 0x19de000]> >         stackpointer=F910EF58> "SeedGenerator Thread" (TID:0xd03d58,> sys_thread_t:0xd03c90, state:CW, thread_t: t@31,> threadID:0xf8d81d78, stack_bottom:0xf8d82000,> stack_size:0x20000) prio=1> > [1] java.lang.Object.wait(Object.java:424)> > > Thanks> > Emmanuel> > > > ---------------------------------> Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en> français !>  


---------------------------------
Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

Tomcat3.3 Struts1.0 = Segmentation violation ?

Posted by "emmanuel.boudrant" <b7...@yahoo.fr>.
Hello,

I've got a struts 1.0 application on a tomcat 3.3, but I've got a FATAL ERROR when I trying to access an action.
The form associed to this action is stocked in session and contain about 20 fields.

The application crash on Tomcat 3.3 / Solaris 8 & W2K.

The application work fine on Tomcat 3.2 / Solaris 8 & W2K

 

Here the Solaris 8 error message:

EmbededTomcat: Startup time 41
2002-02-04 17:30:26 - SessionIdGenerator: Created random class java.security.SecureRandom
2002-02-04 17:30:41 - DecodeInterceptor: Charset from session ISO-8859-1
2002-02-04 17:30:44 - DecodeInterceptor: Charset from session ISO-8859-1
SIGSEGV 11 segmentation violation
    si_signo [11]: SEGV
    si_errno [0]: 
    si_code [1]: SEGV_MAPERR [addr: 0x19de000]

        stackpointer=F910EF58
"SeedGenerator Thread" (TID:0xd03d58, sys_thread_t:0xd03c90, state:CW, thread_t: t@31, threadID:0xf8d81d78, stack_bottom:0xf8d82000, stack_size:0x20000) prio=1

[1] java.lang.Object.wait(Object.java:424)


Thanks

Emmanuel



---------------------------------
Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

Re: display property

Posted by Arnab Sengupta <ar...@yahoo.com>.
Sophia,
I guess u can use <bean:message key="....."/>
in the <td> tag.Offcourse put the key value in the
ApplicationResources.property file of struts before.
like
key="prompt.tablevalue"...
and in the ApplicationResources file put
prompt.tablevalue=Department A.

Hope it works.
Regards,
Arnab.
----- Original Message -----
From: "Cheng, Sophia" <SC...@camitro.com>
To: "'Struts Users Mailing List' (E-mail)" <st...@jakarta.apache.org>
Sent: Tuesday, February 05, 2002 8:50 AM
Subject: display property


> Hi,
>
>
> I can show data correctly in a table by using the following syntax,
>
> <td><html:text property="deptName" size="80"/></td>
>
> But, if I just want to display the data(property), instead of putting data
> in a text field, say
>
> <td>Department A</td>
>
> Then, which tag should I use?
>
> Thanks,
> Sophia
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: display property

Posted by Matt Raible <ma...@yahoo.com>.
<bean:write name="formName" property="deptName" />

HTH,

Matt

--- "Cheng, Sophia" <SC...@camitro.com> wrote:
> Hi,
> 
> 
> I can show data correctly in a table by using the following syntax, 
>   
> <td><html:text property="deptName" size="80"/></td>
> 
> But, if I just want to display the data(property), instead of putting data
> in a text field, say 
> 
> <td>Department A</td>
> 
> Then, which tag should I use?
> 
> Thanks,
> Sophia
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>