Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Location
    Chicago, Ill. USA
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Constructing web views from java struts & beans

    Hey there,

    I am a front end designer who is interested in understanding more about Java struts and javabeans. I am discovering actions, tiles and custom tag Libraries.
    I have some very general questions.

    We are using the CVS eclipse tool to get the jsp pages from an Apache server, but from my perspective they are very fragmented, bits and pieces of the whole page view. I know its put together before it is rendered within a browser. But I am having trouble grapsing the the big picture of how it is constructed. Understanding this will help me to go get the page parts, edit it, and view it, within a test envirnoment I am just now creating.

    I hope that this is the most appropriate category to be asking these questions and if I can get so help as far as being pointed in the right direction that would be most apprecitive.

  • #2
    Regular Coder
    Join Date
    Feb 2008
    Location
    Edinburgh - Scotland
    Posts
    107
    Thanks
    0
    Thanked 12 Times in 12 Posts
    Most likely there will be a center page for each of the main pages of the site.

    This will look fairly bare and simply make calls to other jsp and java files which create their certain sections of the page.

    Therefore you can see it as follows:

    mainpage.jsp makes calls to :

    Code:
    titlejsp ->creates title
    navigationjsp -> creates menus
    maincontentjsp -> creates main content of page
    footerjsp -> creates footer
    miscutilsjsp -> probably can ignore *for background work*
    This is simply an example and without the project's code I cannot advise you any further, but its bound to be similar!

    Your use of java struts implies you are using the MVC approach - Model, View , Controller.

    As the UI guy you are probably handling View and Controller of the model.

    Therefore you will want to get an understanding in your project of what pieces supply the data *these consist of the model* and how those are to be viewed.

    The Model holds the data
    The View is the view onto the data
    The Controller handles modification of the model

    Hope this helps!

  • Users who have thanked renegadeandy for this post:

    agaimari (12-28-2010)

  • #3
    New to the CF scene
    Join Date
    Dec 2010
    Location
    Chicago, Ill. USA
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    The View is the view onto the data

    The Model holds the data, that would be a Mysql database.

    The View is the view onto the data, please give an example.

    The Controller handles modification of the model, in this case we are using Eclipse to work with an apache server.But my tool of choice is Dreamweaver by Adobe. And the CVS interface with RAD Websphere/Eclipse is very buggy.

    I was getting it to work properly hooking up directly to the Apache server but the IT manager was worried the Dreamweaver was placing code into its XML pages of the site.

    <?xml version="1.0" encoding="utf-8" ?>
    <dwsync>
    <file name="basic_modal_style.css" server="H:/BullsEye_Web/" local="129237646680000000" remote="129237646680000000" />
    <file name="mailing-creation-modal.css" server="H:/BullsEye_Web/" local="129291366020000000" remote="129291366020000000" />
    <file name="mailing-creation-modal.css" server="C:/Projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/BullsEye_Web/" local="129291366020000000" remote="129291366020000000" />
    </dwsync>

    Need some help to calm down It mgr so I can get access to data. Any Ideas?

    I was finnally given the RAD websphere tool the rest of the JAVA developers were using. This is doing what??

    Do I really need all three to work within the Eclipse/Dreamweaver/RAD Webshere??

    Now by being able to mull over the I find out that the JAVA developers are using "Fckeditor" how is this interacting with the development of the site. Please take a look at part of the web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4">
    <distributable/>
    <servlet>
    <servlet-name>DisplayChart</servlet-name>
    <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>

    <init-param>
    <param-name>debug</param-name>
    <param-value>3</param-value>
    </init-param>

    <init-param>
    <param-name>detail</param-name>
    <param-value>3</param-value>
    </init-param>

    <load-on-startup>0</load-on-startup>
    </servlet>

    <servlet>
    <servlet-name>Connector</servlet-name>
    <servlet-class>
    com.halldata.bullseye.util.ConnectorServlet
    </servlet-class>
    </servlet>

    <servlet-mapping>
    <servlet-name>Connector</servlet-name>
    <url-pattern>
    /fckeditor/editor/filemanager/connectors/*
    </url-pattern>
    </servlet-mapping>

    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    All I want is to make it simple and be more creative. Understanding more is helping me to create a better work flow. Any Ideas??

    Your focus and site is most appreciated!!

  • #4
    Regular Coder
    Join Date
    Feb 2008
    Location
    Edinburgh - Scotland
    Posts
    107
    Thanks
    0
    Thanked 12 Times in 12 Posts
    You kinda misunderstood the MVC analogy...

    Its like a calculator would be as follows:

    Model = addition, subtraction, numbers with associated methods for doing calculations

    Controller = input handlers to decide what to do with the input, if its a number add it to the view, if its a operator then call the model's addition method

    View = Screen with sum output + all the buttons onit.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •