Results 1 to 9 of 9
Thread: hibernate struts problem
- 02-20-2010, 01:57 PM #1
Member
- Join Date
- Feb 2010
- Posts
- 4
- Rep Power
- 0
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
- 02-20-2010, 02:23 PM #2
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
like JSP???infact i can brows some files
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.
- 02-22-2010, 06:07 AM #3
Member
- Join Date
- Feb 2010
- Posts
- 4
- Rep Power
- 0
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
- 02-22-2010, 06:51 AM #4
what error is printing as output
hi,
what error is printing as output
- 02-22-2010, 06:54 AM #5
Member
- Join Date
- Feb 2010
- Posts
- 4
- Rep Power
- 0
No error
Hello,
Nope, I dont get any error, just a blank page.
Thanks
Laxman
- 02-22-2010, 07:21 AM #6
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
- 02-22-2010, 02:21 PM #7
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
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 ?
- 02-22-2010, 02:48 PM #8
Member
- Join Date
- Feb 2010
- Posts
- 4
- Rep Power
- 0
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
- 02-22-2010, 06:08 PM #9
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
You are very welcome mate.
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
-
how to get value from unrelated class struts-hibernate
By arsmith in forum Web FrameworksReplies: 0Last Post: 12-02-2009, 05:29 PM -
problem with configuring hibernate in struts
By Trendy in forum Java ServletReplies: 1Last Post: 11-23-2009, 09:05 AM -
Java Application Architecture for Struts, Spring and Hibernate
By stujava in forum Advanced JavaReplies: 0Last Post: 08-20-2009, 07:39 AM -
Struts with hibernate
By harish21 in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 06-01-2009, 01:01 AM -
Database connectivity in Jave struts with Hibernate
By sanjay_sharma77 in forum Advanced JavaReplies: 1Last Post: 02-02-2008, 08:41 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks