Results 1 to 9 of 9
  1. #1
    laxmankande is offline Member
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Unhappy hibernate struts problem

    Hello Friends,

    I am new to hibernate and struts. I am in middle of modifying the well coded hibernate / struts project.

    i have installed the tomcat 5.5 and all the resources, infact i can brows some files, but for some files i get blank pages, can anyone please guide me how to find error when you see blank pages? where is the actual error resides?

    Thanks a ton in advance.
    Laxman

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    infact i can brows some files
    like JSP???

    It's not very clear you have to provide more info about problem.

    Are u 100% sure that you developed *.war file on Tomcat with no problems
    and are there at least some pages that work like index.jsp...

    Can u trace tomcat log files?

    If u are not sure in your Tomcat configuration, first try to start those webapps\examples application that comes with Tomcat.

    While tomcat is starting do look at console to check possible errors on init.

  3. #3
    laxmankande is offline Member
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Default

    Hello FON,

    Thanks for the reply.

    Yes. like jsp. there are some jsp files too.

    Well, let me tell you in details. I have download entire file structure , jsp , class file , mysql database etc. and placed in tombact webapps folder. when i start tomcat and then i execute the folder, it works. like on index page it's ask for login, and when you put userid and password it login you in system and show you welcome page, but when you click on any other page it show you blank page. That page url is http://localhost:8080/module1/creatProfile.do


    in struts-admin-config.xml path it defines like this..

    <action path="/actions/CreateProfile"
    type="com.project.admin.webapp.action.CreateProfil e"
    name="profileNameForm"
    scope="request"
    validate="false">
    <forward name="success" path="/admin/actions/ProfileDetails.do" contextRelative="true"/>
    <forward name="failure" path="/admin/actions/ProfileName.do" contextRelative="true"/>
    </action>



    CreateProfile.java i have compiled and placed on the location properly. but it still gives error.

    Where do i see if it is throwing any error?

    I am trying to check tomcat log too but not able to see error.

    Please help.

    Thanks
    LAxman

  4. #4
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    162
    Rep Power
    5

    Default what error is printing as output

    hi,
    what error is printing as output

  5. #5
    laxmankande is offline Member
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Default No error

    Hello,

    Nope, I dont get any error, just a blank page.

    Thanks
    Laxman

  6. #6
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    162
    Rep Power
    5

    Default

    please check web.xml is
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>actions/*.do</url-pattern>
    </servlet-mapping>
    then open the
    com.project.admin.webapp.action.CreateProfile .java file is that return mapping.findforward("success") is that spelling and condition are ok or not

    is this "profileNameForm" form is defined in form-bean name="" parameter in struts

    <forward name="success" path="/admin/actions/ProfileDetails.do" contextRelative="true"/>
    if sucess the action is calling
    so any sucess is occured the redircting has to done to any page
    check this
    Struts 1 - Configuring Applications

  7. #7
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    Quote Originally Posted by laxmankande View Post
    ...I have download entire file structure , jsp , class file , mysql database etc. and placed in tombact webapps folder....
    So you want to run some example application?

    I guess MAYBE you can just copy someones app to your Tomcat and make it work,
    but to be absolutely sure of what you are doing
    it's much better if you can IMPORT that application in your IDE (Netbeans, Eclipse...) build it there and deploy to your Tomcat.
    While doing that you can probably test DB connection, you can see if all file paths are OK and if configuration file is properly set.

    And if IMPORT is making a problems you can always CREATE NEW blanc Dynamic Web project and copy files form original resource and test them
    piece by piece.

    This way you will have full control of configuration.

    can this help ?

  8. #8
    laxmankande is offline Member
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Default

    Hello FON,

    Yes, thats a good suggestion, i think i should have done that earlier.

    But after some r & d i am able to get the jsp pages. I have a new query now.

    when i do data entry using jsp files, it goes to database. Even i keep field blank it does not give me error. But when i edit the same record and try to fill the fields which i kept blank it does not update in database.

    any clue why this happens?

    Thanks for helping me :)

    Best Regards
    Laxman

  9. #9
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    You are very welcome mate.

    Quote Originally Posted by laxmankande View Post
    Even i keep field blank it does not give me error.
    Are there any client side validation like JavaScript there
    or maybe server-side validation that is responsible for this?

    U cannot examine problems without debugger or at least good logger.
    That is main reason why you have to IMPORT project and set it up manually.

    If this project is something you gonna work on longer
    do IMPORT it and try debugging, obtain SRC code and DOCUMENTATION if you can also. Then you can dissect it and learn all about it.

    good luck !

Similar Threads

  1. how to get value from unrelated class struts-hibernate
    By arsmith in forum Web Frameworks
    Replies: 0
    Last Post: 12-02-2009, 06:29 PM
  2. problem with configuring hibernate in struts
    By Trendy in forum Java Servlet
    Replies: 1
    Last Post: 11-23-2009, 10:05 AM
  3. Replies: 0
    Last Post: 08-20-2009, 08:39 AM
  4. Struts with hibernate
    By harish21 in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 06-01-2009, 02:01 AM
  5. Database connectivity in Jave struts with Hibernate
    By sanjay_sharma77 in forum Advanced Java
    Replies: 1
    Last Post: 02-02-2008, 09:41 PM

Posting Permissions

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