Re: Graphics-Object
Hi, that sounds good; but how is the action-mapping in the struts-config.xml (I have no ActionForm) action path=/createImage type=webTemplate.ImageAction /action doesn't work Michael |+--- || Craig R.| || McClanahan | || craigmcc@apa| || che.org | || | || 13.06.01 | || 20:01| || Please | || respond to | || struts-user | || | |+--- ---| | | | To: [EMAIL PROTECTED] | | cc: (bcc: Michael Schommer/PDD/DEV/LU/FERNBACH) | | Subject: Re: Graphics-Object| ---| Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable On Wed, 13 Jun 2001, Michael Schommer wrote: Hi, I want to hang the Graphics-Object for example on the HttpSession and= read it from the JSP by the html:img- or other tag. Will it work and how? The fundamental concept is that an Action can, in fact, create the response itself, if it wants to, and then return null from the perform() method to indicate to Struts that no forwarding needs to be done. Within the action, you would call response.getOutputStream() and= write the bytes of your image (after doing any necessary conversion and= setting the correct content type). In a JSP page that references the dynamically created image, you would = say something like: html:img page=3D/createImage.do/ and this will create a hyperlink to the URL that will dynamically creat= e the image when the page is displayed. Like all img tags in HTML, the= image is loaded from a separate request (most browsers will initiate multiple requests in parallel if you've got multiple images, so be sure= your session data is thread safe) as the calling page is being displaye= d. Alternatively, you might consider creating a separate servlet whose purpose is to create the dynamic image. Code very similar to what you'= d put in the action would be used to create the image. Gru=DF Michael Craig McClanahan =
Graphics-Object
Hi, I have an Action-Class, which generates a Graphics-Object and want to display it as image by a JSP, without saving it as file. Is there any idea? Gruß Michael -- Java - write once, run anywhere
Re: Graphics-Object
Hi, I want to hang the Graphics-Object for example on the HttpSession and read it from the JSP by the html:img- or other tag. Will it work and how? Gruß Michael -- Java - write once, run anywhere |+- || suhas| || [EMAIL PROTECTED]| || ltech.com | || | || 13.06.00 17:52 | || Please respond to | || struts-user; Please| || respond to suhas | || | |+- ---| | | | To: [EMAIL PROTECTED] | | cc: (bcc: Michael Schommer/PDD/DEV/LU/FERNBACH) | | Subject: Re: Graphics-Object| ---| how about using advanced imaging apis ? suhas - Original Message - From: Kommineni, Sateesh (IndSys) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 13, 2001 12:25 PM Subject: RE: Graphics-Object Hi.. With thehelp of JPEGEncoder and BufferedImage Classes you can do that...I never used struts frmaework,so i don't know much abt the Action_class and all the other classes... Regards Sateesh -- From: Michael Schommer[SMTP:[EMAIL PROTECTED]] Reply To: [EMAIL PROTECTED] Sent: Wednesday, June 13, 2001 4:53 PM To: [EMAIL PROTECTED] Subject: Graphics-Object Hi, I have an Action-Class, which generates a Graphics-Object and want to display it as image by a JSP, without saving it as file. Is there any idea? Gruß Michael -- Java - write once, run anywhere
user-specific default-values of html-formulars
Hi, I want to save user-specific default-values of html-formulars. I think the best way is to put the ActionForms in a synchronized HashMap (user as key) and save this in a file when a user specifies new default-values for the formular. In the ActionForm-constructor I will check the HashMap if default values for the formular are present and set them. Is there any other meaning? Does anybody make it so? Gruß Michael -- Java - write once, run anywhere
generate ActionForms
Hi, I want to generate the ActionForm-classes. Do somebody know something about tools to generate Java-classes? Gruß Michael -- Java - write once, run anywhere
libioser12.so
Hi, I'm trying to get an InitialContext in an ActionClass (Tomcat 3.3 - Unix) to call EJBs from an EJB-Container (J2EE-reference 1.2.1) Hashtable env = new Hashtable(); env.put (Context.INITIAL_CONTEXT_FACTORY, com.sun.enterprise.naming.SerialInitContextFactory); env.put (Context.URL_PKG_PREFIXES, com.sun.enterprise.naming); ctx = new InitialContext(env); By doing this the following error displays: ERROR! Shared library ioser12 could not be found. 2001-05-15 14:20:53 - Ctx(/MM) : Exception in R( /MM + /MM.do + null) - java.lang.UnsatisfiedLinkError: specia lLoadClass at com.sun.corba.ee.internal.util.JDKClassLoader.specialLoadClass(Native Method) at com.sun.corba.ee.internal.util.JDKClassLoader.loadClass(JDKClassLoader.java :58) at com.sun.corba.ee.internal.util.JDKBridge.loadClassM(JDKBridge.java:180) at com.sun.corba.ee.internal.util.JDKBridge.loadClass(JDKBridge.java:83) at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.loadClass(Util.java:378) at javax.rmi.CORBA.Util.loadClass(Util.java:213) at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObje ct.java:182) at javax.rmi.PortableRemoteObject.clinit(PortableRemoteObject.java:61) at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:57) at com.sun.enterprise.naming.SerialContext.init(SerialContext.java:79) at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(Serial InitContextFactory.java: 54) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246) at javax.naming.InitialContext.init(InitialContext.java:222) at javax.naming.InitialContext.init(InitialContext.java:198) at MM.MMAction.getInitialContext(MMAction.java:49) at MM.MMAction.perform(MMAction.java:71) at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.j ava:1726) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1536) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java) I think I have to include the libioser12.so under the lib $J2EE_HOME/nativelib in the Tomcat, but I dont know how to do this. Can anybody help me? Gruß Michael -- Java - write once, run anywhere
action-Mapping?
Hi, I have a problem with action-Mapping in the J2EE-reference implementation (j2sdk221.3). In my index.jsp is the html:form definition: html:form name=TimeFormBean action=/time.do type=Time.TimeFormBean but the PageSource of the resulting HTML-Page is form name=TimeFormBean method=POST action=/TimeRoot it should be form name=TimeFormBean method=POST action=/TimeRoot/time.do Had anybody else this problem and solved it??? Gruß Michael -- Java - write once, run anywhere
NoInitialContextException
Hi, I'm using a Tomcat 3.3 and try to access a session-EJB from an Action-Class. When I try to get an InitialContext in my Action-Class: Hashtable env = new Hashtable(); Context ic = new InitialContext(env); EJBMMHome home = (EJBMMHome) ic.lookup(EJBMM); I get the error: class javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial. I think, the Context.INITIAL_CONTEXT_FACTORY and Context.PROVIDER_URL, have to put to the env-Hashtable. env.put(Context.INITIAL_CONTEXT_FACTORY, initCtxFactory); env.put(Context.PROVIDER_URL, providerURL); ??? but what are the values for initCtxFactory and providerURL ??? Can anybody help me? Gruß Michael -- Java - write once, run anywhere
Apache + Tomcat: building mod_jk ???
Hi, I have problems building the Web Server Adapter mod_jk for Apache (1.3.19) and Tomcat (3.3). The apxs Perl-Skript failed: troubadix[DB000]:[dl17]:/nt/U/mcs/tomcat-src/jakarta-tomcat/src/native/mod_ jk/apache1.3 (213) build-unix.sh Compiling mod_jk cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c mod_jk.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_ajp12_worker.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_ajp13.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_ajp13_worker.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_connect.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_jni_worker.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_lb_worker.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_map.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_msg_buff.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_nwmain.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_pool.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_sockbuf.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_uri_worker_map.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_util.c cc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/nfs/home/mcs/apaches/include -I../common -I/usr/j2se/include -I/usr/j2se/include/solaris -c ../common/jk_worker.c -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o jk_pool.o jk_nwmain.o jk_msg_buff.o jk_m ap.o jk_lb_worker.o jk_jni_worker.o jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o mod_jk.o apxs:Break: Command failed with rc=255 There seems to be something wrong with the apxs-Script? Maybe its an error on compiling the Apache-Server and generating the apxs-Script ??? Thanks for help Michael -- Java - write once, run anywhere
Oracle Servlet Engine
Hi, we work with Oracle (8.1.7) in our company. Now, I want to know if Struts works with the Oracle ApplicationServer. If anyone has any know-how with the Oracle Servlet Engine and Struts or the Oracle 8i ApplicationServer I will be very happy for every information send directly to my eMail-address. Bye Michael
Resources.properties - trick?
Hi, is there a trick using a "Resource.properties"-file. I'm creating a "Resource.properties"-file in WEB-INF/classes folder of my application. The web.xml looks like: ... init-param param-nameapplication/param-name param-valueResources/param-value /init-param ... In the JSP-file the bean:message-Tag is: bean:message key="index.benutzername"/ By running the application an error displays The Error is: A Servlet Exception Has Occurred Exception Report: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm pl.java:481) at _0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex_jsp _161.java:513) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j ava:184) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:215) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava:251) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava:196) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java: 242) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:16 1) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:225 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a:159) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java :818) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897 ) at java.lang.Thread.run(Thread.java:484) Root Cause: javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.struts.util.RequestUtils.message(RequestUtils.java:285) at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239) at _0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex_jsp _161.java:168) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j ava:184) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:215) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava:251) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava:196) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java: 242) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:16 1) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:225 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a:159) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java :818) at
Re: Resources.properties - trick?
Sorry, my ResourceBundle is called Resources.properties of course - the error was in the mail. Is there any other idea??? ...what could be wrong? |+--- || Darryl | || [EMAIL PROTECTED]| || o.za| || | || 09.04.01 | || 14:10| || Please | || respond to | || struts-user | || | |+--- ---| | | | To: [EMAIL PROTECTED] | | cc: (bcc: Michael Schommer/PDD/DEV/LU/FERNBACH) | | Subject: Re: Resources.properties - trick? | ---| Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable Michael, Sorry, it looks like I've responded too quickly to your note. I must ha= ve been asleep when I read your note to have missed that you were using init-params. I apologize for the misstep. I think Mark has probably identified your problem correctly. Mark, any = idea how to use a MessageResource file WITHOUT having to use ActionServlet. thanks, Darryl "Geddes, Mark (ANTS)" wrote: Is your ResourceBundle called "Resources.properties" or "Resource.properties"? Your mail implies a mis-match. Also, I assume your init-param is for the Struts Action Servlet. Mark -Original Message- From: Michael Schommer [mailto:[EMAIL PROTECTED]] Sent: 09 April 2001 12:57 To: [EMAIL PROTECTED] Subject: Resources.properties - trick? Hi, is there a trick using a "Resource.properties"-file. I'm creating a "Resource.properties"-file in WEB-INF/classes folder o= f my application. The web.xml looks like: ... init-param param-nameapplication/param-name param-valueResources/param-value /init-param ... In the JSP-file the bean:message-Tag is: bean:message key=3D"index.benutzername"/ By running the application an error displays The Error is: A Servlet Exception Has Occurred Exception Report: javax.servlet.ServletException: Cannot find message resources under k= ey org.apache.struts.action.MESSAGE at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte= xtIm pl.java:481) at _0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex= _jsp _161.java:513) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:85= 3) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServl= et.j ava:184) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3= 28) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407) at javax.servlet.http.HttpServlet.service(HttpServlet.java:85= 3) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil= terC hain.java:215) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal= ve.j ava:251) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)= at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal= ve.j ava:196) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j= ava: 242) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)= at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:20= 41) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav= a:16 1) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java= :225 ) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)= at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve= .jav a:159) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)= at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.= java :818) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java= :897 ) at java.lang.Thread.run(Thread.java:484) Root Cause: javax.servlet.jsp.JspException: Cannot find message resources under k= ey org.apache.struts.action.MESSAGE at org.apache.struts.util.RequestUtils.message(RequestUtils.java:285)
ResultSet as HTML-table
Hi, I want to output a ResultSet as HTML-table in a JSP. This should be a very general request. Has anyone an elegant solution who wants to share? Gru Michael -- Java - write once, run anywhere
struts-example.war
Hi, I have problems to run the struts-example.war. I'm using the sun J2EE-reference implementation (Tomcat 4.0 - b1). When I click "Register with the MailReader Demonstration Application" (index.jsp) the error HTTP Status 404 - /editRegistration.do The requested resource (/editRegistration.do) is not available. displays. Clicking on the Submit-Button of logon.jsp shows the message (Netscape Browser): The document contained no data. Try again later, or contact the server's administratior. Had anybody else these problems and solved them??? Thanks Michael