Newbie questions

2005-06-21 Thread C.F. Scheidecker Antunes
Hello all, I am very familiar with Servlets, JSPs and custom Tags however Struts is a new beast to me. Hence I am studying to learn it. What I would like to know is if anyone could point me to websites that would have recipes on how to code Struts such as phpbuilder.com for php. What I woul

Displaying a image from a MySQL Blob field

2005-08-04 Thread C.F. Scheidecker Antunes
Hello all, I am writing a Struts application which needs to read a database, fetch an image inside a blob field and display it in a JSP page in two different ways: - Within a thumbnail size inside a column of a normal html . Which means the image needs to be resized for displaying purposes. Al

Login with authentication from database

2005-08-07 Thread C.F. Scheidecker Antunes
Hello all, I am learning my ways through Struts having done Servlets and JSPs before. In order to have authentication functionalities with my Servlets I used to have a user table and a roles table. Once the user logs in he/she would be authenticated with the user name, password through Tomcat

Re: Login with authentication from database

2005-08-07 Thread C.F. Scheidecker Antunes
ithin one Struts apps use a separate database,tables for that specific struts apps? If so what is the XML config file that I should have that? My struts-config.xml? Laurie Harper wrote: C.F. Scheidecker Antunes wrote: I am learning my ways through Struts having done Servlets and JSPs befor

Displaying an image from a BLOB field on a jsp

2005-08-08 Thread C.F. Scheidecker Antunes
Hello, Could anyone tell me how to fetch using a bean an image from a MySQL database blob field and displaying it on a jsp page? Thanks, C.F. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: [OT]Terrific intro to JSF

2005-08-09 Thread C.F. Scheidecker Antunes
Well. It seems that all articles were written already. http://www-128.ibm.com/developerworks/views/java/libraryview.jsp?search_by=nonbelievers: [EMAIL PROTECTED] wrote: Hi all: i know it isn't Friday yet.. ;) but .. in case you have been looking for a nice and clear introduction to JSF, look

Category and Subcategory logic within Struts

2005-08-09 Thread C.F. Scheidecker Antunes
Hello all, I need to have a set of categories and subcategories selection on a JSP page similar to what eBay has when you are selling an item. When you select a main category the secondary category box is populated with options and so forth. My first question is: How to organize that? Shall

Application context bean

2005-08-09 Thread C.F. Scheidecker Antunes
Hello all, I would like to have a bean with a data structure that gets populated when the application starts and then this bean is available to the entire application. The data structure will get populated via a data base. I need to call the database just once to populate the data structure.

Setting and accessing Context and Session data

2005-08-09 Thread C.F. Scheidecker Antunes
Hello all, More newbie questions. I just want to make sure I understand the idea on how to write a Struts application properly. How do you save something to the Session scope and then access it within Struts? I pretty much understand how to do it within a Servlet. How do you do the same for

Avis.com J2EE website

2005-08-09 Thread C.F. Scheidecker Antunes
Hello all, This is an interface question. www.avis.com is a J2EE/Struts website for what I can tell. They have a nice feature to make a reservation which is the popup calendar they have for the pick-up Date and Return Data. Would anyone know how could I have this kind of interface for a user t

The idea behind modules

2005-08-10 Thread C.F. Scheidecker Antunes
Hello all, I was reading about modules and I wonder if anyone had ever used them. As far as I can see by the examples, if you have different modules you still run only one ActionServlet. Hence modules seem to be useful only for group programming and bigger projects. Am I right on this? Thanks

JAAS vs JDBRealm

2005-08-11 Thread C.F. Scheidecker Antunes
Hello all, A little question. I've wrote a little web app for school with Servlets. In my Eclipse Project I've added a context.xml file in order to configure JDBCRealm and it worked perfectly as Tomcat 5.x supports this kind of thing, adding a context.xml file inside the META-INF/ subdir. In

Re: Certification

2005-08-11 Thread C.F. Scheidecker Antunes
javaranch.com Rafael Taboada wrote: Hi folks. I live in Peru and I'm so interested to get java certification. But here in Peru is a little difficult to have some courses in order to get certification and because it's so expensive. My question is u know some site or have some material in orde

Re: [OT] Tomcat, JAAS and Kerberos

2005-08-12 Thread C.F. Scheidecker Antunes
Wendy, Check out this article on JAAS with LDAP. I am sure that it might not be as hard to use Kerberos. I've seen an example of the userClassNames and roleClassNames somewhere this week. Let me see if I find it and I will forward it to you. The article on JAAS is at: http://www.theserversid

Using Security Filter with JDBCRealm questions

2005-08-12 Thread C.F. Scheidecker Antunes
Hello all, This is my attempt on using SecurityFilter + JDBCRealm for Authenticating a Struts Application. If it works, I will post a simple howto to help other folks with the same difficulties on my school webpage. So I appreciate all the input, opinions and help that anyone can give me on th

All session variables and their values

2005-08-14 Thread C.F. Scheidecker Antunes
Hello all, How can I list/print on a JSP all the variables and their values of the current user session? Better yet, how can I log it to a file. Thanks in advance, C.F. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Multiple file upload

2005-08-15 Thread C.F. Scheidecker Antunes
Hello all, Is there any way to perform multiple file uploads using Jakarta Commons Upload on a Struts application? Is there any howto on this issu? Thanks, C.F. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

getting a Form from the Session Scope from another Action

2005-08-15 Thread C.F. Scheidecker Antunes
Hello all, Say that I have the following situation: Ok, the first action calls a jsp that, when submited, calls ProcessStep1 action and populates the Step1Form. However on step2 I am doing a file upload so I am declaring the form, which is not Step1Form, to be of request scope not

Re: Multiple file upload

2005-08-16 Thread C.F. Scheidecker Antunes
reate a FormBean to accept n file inputs and then get the content to each one separately and assign them to a stream class. Checking for each input whether it is null or not. Laurie Harper wrote: C.F. Scheidecker Antunes wrote: Is there any way to perform multiple file uploads using Ja

Question on log on with SecurityFilter and JDBCRealm

2005-08-17 Thread C.F. Scheidecker Antunes
Hello all, I've managed to have successful authentication with securityFilter and JDBCRealm. I have a few questions that I was hoping you could clarify for me. After the login is successful, is there any way to forward that to a success page/action so that I can add extra stuff to the sessio

Datasources for Struts 1.2.x

2005-08-17 Thread C.F. Scheidecker Antunes
Hello all, On the Struts: How to Access a Database document the way to set up a Datasource is shown in the MySQL example. However the DataSource class type that is used is the org.apache.commons.dbcp.BasicDataSource. I've downloaded commons dbcp version 1.2.1 and there is no BasicDataSourc

Re: Datasources for Struts 1.2.x

2005-08-17 Thread C.F. Scheidecker Antunes
Hi all, Forget this last posting. I've found the class! :) There was a problem on my archive. C.F. Scheidecker Antunes wrote: Hello all, On the Struts: How to Access a Database document the way to set up a Datasource is shown in the MySQL example. However the DataSource class type

Database Best Practices

2005-08-17 Thread C.F. Scheidecker Antunes
Hello all, In order to access a Database on my Model layer, which one is best? 1) A DataSource declared on the struts-config.xml. Then get the DataSource on your code inside either your actions or business classes. 2) Create a class that will load the database Driver ,establish the connectio

Problems declaring DataSources

2005-08-18 Thread C.F. Scheidecker Antunes
Hello All, I have the following datasource declared. The password, URL and user name as well as Database name (on the URL) are corrected and I have them tested. Here it is: However, when I put it in my

Re: Problems declaring DataSources

2005-08-18 Thread C.F. Scheidecker Antunes
ource"> value="jdbc:mysql://localhost:3306/Test" /> Thanks. C.F. Scheidecker Antunes wrote: Hello All, I have the following datasource declared. The password, URL and user name as well as Database name (on the URL) are corrected and

Re: Struts and Laszlo

2005-08-18 Thread C.F. Scheidecker Antunes
Luc, I have designed Laszlo applications having both PHP and Servlets as controllers. It worked great and your idea is right on. In fact I am starting a Struts/Laszlo app pretty soon. Have in mind that Laszlo is the View of the MVC model. I understand that you can also use Laszlo as the control

Re: Question on log on with SecurityFilter and JDBCRealm

2005-08-18 Thread C.F. Scheidecker Antunes
ThreadContext.setUser( user ); } //end else } //end if filterChain.doFilter( servletRequest, servletResponse ); ThreadContext.setUser( null ); //Clear the thread before returning it to the server's thread pool } Steve Mitchell UMB Bank -Or

Resizing output image from a Struts Action

2005-08-18 Thread C.F. Scheidecker Antunes
Hello all, I have an action to retrieve an image from a database BLOB field and display it. It works great. However I wanted to resize the image proportionaly. Hence I think on writing a second action, that would call the first in order to retrieve the image. Then, would work on this image t

Re: Login Problem

2005-08-19 Thread C.F. Scheidecker Antunes
Take a look at O'Reilly's Struts Cookbook about this issue. d d wrote: I am working on a struts web application with oracle as back end.I use tomcat. I am using filter so that if user has not logged in he cannot access any of the pages.I have a problem for logging.. I login into my applicati

Re: List selection manager 'widget'

2005-08-21 Thread C.F. Scheidecker Antunes
Hi Laurie, I am trying to do the same and I've done some research. One of the things I've found is the one bellow. I would appreciate, if you find something diferent, to email it back to the list as well so that it would same time for me and other developers as well. Thanks, C.F. Maybe so

How to Debug easier

2005-08-21 Thread C.F. Scheidecker Antunes
Hello all, If I have a System.out.Println() statement on my Struts code where would that be written to? I would like to write stuff to either the console or the Tomcat log text file. How can I achieve that? System.out.println() does not seem to be doing anything. I want to know what it is

Questions about RowSetDynaClass

2005-08-24 Thread C.F. Scheidecker Antunes
Hello all, I would like to ask a few questions about RowSetDynaClass. I can successfully set up one in a DAO class and include it in the request scope of an action class to forward to a JSP. The problem is with the JSP. Problem number one: - If the bean is null or empty I have an error, that

RowSetDynaClass weird problem

2005-08-29 Thread C.F. Scheidecker Antunes
Hello all, I've done it before, in one project it works perfectly in the other it doesn't so I was hoping I could get some help from you. This new project tries to create a Radiobutton table on the fly using RowSetDynaClass I have an action that calls a DAO which returns a RowSetDynaClass lik

Re: RowSetDynaClass weird problem

2005-08-29 Thread C.F. Scheidecker Antunes
Never mind. It was fixed by using low caps property names for the bean. Thanks. C.F. Scheidecker Antunes wrote: Hello all, I've done it before, in one project it works perfectly in the other it doesn't so I was hoping I could get some help from you. This new project tries t

check radiobutton option based on value posted to the session 2

2005-08-29 Thread C.F. Scheidecker Antunes
Hello all, I have a radiobutton group called categID. Once the form is submited it goes to the following form bean: ** ** ** That is the catForm has an attribute called categID with the value posted. This is a DynaActionForm that resides on the session scope. Once the form is sub

Struts and mod_jk weird behaviour

2005-09-21 Thread C.F. Scheidecker Antunes
Hello all, I have a struts apps that work great if I connect to http://localhost:8080/App My Tomcat also has two other apps http://localhost:8080/servlets-examples and http://localhost:8080/jsp-examples. However both the servlets-examples and jsp-examples work perfectly with mod_jk but my

Fast war deployment

2005-10-07 Thread C.F. Scheidecker Antunes
Hello all: Everytime I deploy my .war file on my server, restart Tomcat and access the JSPs and actions it will compile (make JSPs servlets) and load them. It takes a time the first time. This gets annoying as the application gets bigger. Is there any way to deploy the war and have a build f

Submit buttons getting their value

2005-10-09 Thread C.F. Scheidecker Antunes
Hello all, I have two submit buttons, one with a value of Continue and the other Back. How do I check their values? I've tried request.getAttribute("submit").toString() but I do not get anything. My buttons are like this: back continue They are within the same form structure. My action ha

Re: Submit buttons getting their value

2005-10-09 Thread C.F. Scheidecker Antunes
But where is PropertyName? The only thing passed to the action is request. Thanks Martin Gainty wrote: Antunes I thought it was PropertyName.getValue() ?? M- - Original Message - From: "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]> To: "Struts Users Mailin

Hide the JSP: Actions, rowBean and JSPs question

2005-10-09 Thread C.F. Scheidecker Antunes
Hello All, I have an action that reads from the database and return a rowSet bean to the request scope. Then I iterate the bean on my JSP and show the data. Everything works. I however have a problem. I can access the JSP straight if I type the URL. That is, I want the JSP only to be shown i

Re: Hide the JSP: Actions, rowBean and JSPs question

2005-10-10 Thread C.F. Scheidecker Antunes
. This will not allow any of your user to access your JSPs. ... no_access *.jsp ... Regards, Rajasekhar Cherukuri "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]> 10/10/2005 09:58 AM Please respond to "Struts Users Mailing List" To

Forcing JSP reloading, avoiding IE caching of it

2005-10-21 Thread C.F. Scheidecker Antunes
Hello all, I have a struts app that works great on Firefox, however when I use IE I have problems with it. I guess that IE caches the JSP page. So when the action sends the data to the JSP I always have the same thing. So I read about it and found that if you add on the struts-config.xml it

need to email from action

2005-10-23 Thread C.F. Scheidecker Antunes
Hello all, I need to email a simple text message from within an action. I've tried creating a class using javax.mail.* and javax.mail.internet.* classes but without success. I wonder if there is any simple recipe for that. Thanks, C.F.

How to escape a string on a description field

2005-10-24 Thread C.F. Scheidecker Antunes
Hello all, I am having problems with my struts app. I am trying to enter a long string on a description field of a MySQL database but it crashes if the string has caracters that need to be escaped. What about the reversed operation when you are to display that on the JSP? How can I fix that?

Problems emailing from struts

2005-10-27 Thread C.F. Scheidecker Antunes
Hello all, I've been trying to email from my struts application without success. I've first tried the standard approach wich is to use javax.mail.* javax.mail.internet.* classes. As on O'reilly's Servlet Cookbook. Then I've tried commons email, also without success. So at this point I wonder

Re: Problems emailing from struts

2005-10-27 Thread C.F. Scheidecker Antunes
Hello, Thanks for the info. I am still having problems sending email from a struts action. I've created a separate class emailClient to send the message. The class is on the end of the email. I have mailapi.jar under /WEB-INF/lib/ version 1.3.3.01 but nothing works. Here