File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes developing my first struts application. So need some help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "developing my first struts application. So need some help" Watch "developing my first struts application. So need some help" New topic
Author

developing my first struts application. So need some help

onki rumen
Greenhorn

Joined: Mar 26, 2008
Posts: 3
I am developing my first STRUTS application starting today 26th march 2008 . I am making it with netbeans 6.0 , tomcat 6 and with Access database ( mysql download will be completed with 13 mins ).
I made the successful connection with the database . and I made a insert-into sql statement so from datasource to the database value is populating .

I made a Add page . 2 fields I am adding to the database . That I made and that is fine .

Now the edit page . Here I need some help .

here in the JSP page first I need to get all the values that were there in DB and then which I select next avlue will come . So what will be the sql query ?
the problem is say 2 fields are name , surname .In the drop down when I am selecting 'onki' then all values for 'onki' ( its not an unique key )will come in the next field . so how can I do this.??how can I get the database values into teh JSP page....again how those values will go into the dropdown?

please help me as this is my first struts application.
Danilo Dadonas
Ranch Hand

Joined: Aug 24, 2007
Posts: 59

It helped me a lot:

Planet Struts


Dadonas<br /> <br />Don't gain the world and lose your soul.
onki rumen
Greenhorn

Joined: Mar 26, 2008
Posts: 3
thanks for the HELP . I made that application where I can make add,edit,delete,list .

Now I want to make it better say I have 4-5 type of users say admins,users,maintainers and so who have diffreent accesibility say users can only list whereas Admins can add delete users . How to do that?
Danilo Dadonas
Ranch Hand

Joined: Aug 24, 2007
Posts: 59

What container are you using? Tomcat, JBoss, ...?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
First off, I'd suggest you read the security chapter (chapter 32) of the Sun J2EE Tutorial.

In Struts, each action can be secured to be accessed only be users assigned to the roles described in the above tutorial. Just specify roles="someRole" in the action mapping in your struts-config.xml file.
[ April 06, 2008: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: developing my first struts application. So need some help
 
Similar Threads
Design question (struts/mvc)
Problem while Navigation in Struts.
java.text.ParseException
Need immediate help, my job is stuck
In struts, How to solve this with Database and jsp?