Tuna Töre

Ranch Hand
+ Follow
since Aug 17, 2008
Tuna likes ...
Eclipse IDE Spring Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tuna Töre

Hi Coderanchers

I created an online course for learning the details and usages of Spring Framework in commercial environments.

If you would like to learn the latest version of Spring Framework with step by step examples/codes and pass Core Spring Framework Certification 4.x then you can attend this udemy course through the following link;

https://www.udemy.com/spring-framework-4-course-and-core-spring-certification/?couponCode=spring39coupon

Spring Framework 4.x Course and Core Spring Certification

Spring Framework and Core Spring Certification Udemy course with discount
Spring Framework and Core Spring Certification Udemy course with a discount coupon

If you attend this course through this link, I will provide you a %20 discount coupon.

Here you can find the contents of udemy Spring Framework Course;

Spring Container, Dependency, and IOC (Inversion of Control)
Spring Aspect Oriented Programming
Spring JDBC, Transactions, and ORM (Hibernate)
Spring MVC
Spring Security
Spring Messaging (JMS)
REST
Unit Testing with JUnit for Spring Applications
Library Management with Maven using STS (Spring Tool Suite)
After attending the course, if you have any questions, I will be ready to support you.

Regards,
8 years ago
Actually, I would like to read the XML file by using SAX parsing method and the XML wont change too much may be once in a month?

My question also applies for reading values from properties file?
What do you think about that?

It seems a good solution for me to read constants from properties file rather than reading them from Database.
With this approach, I can also change the properties file and I dont need to restart the Server to change Java class files.

Tuna TÖRE
12 years ago
I would like to create a XML file storing a SQL stament which could be changed time to time manually and I would like to read it inside a Web Service application.
By doing that, I do not want to start the Application server and get customized SQL inside my Java Classes on Web Service Application. Only changing the XML file would be fine for me and the application will be more flexible to be change in the future.

However I have some reservations about reading a file inside a Web Application. The main issue is locking or similar Exceptions issue while reading the custom SQL from XML or performance issues.
Which approach do you think to best for me to prevent getting exceptions such as file locking exceptions.. Reading the Custom Query from DB or from a XML file?

Which one do you think the best?
I dont want to get file reading Exceptions such as locking on a file or similar?


Tuna TÖRE
12 years ago
Hi,

Try to read Servlet spec

getSession
public HttpSession getSession(boolean create)Returns the current HttpSession associated with this request or, if there is no current session and create is true, returns a new session.
If create is false and the request has no valid HttpSession, this method returns null.



getSession
public HttpSession getSession() Returns the current session associated with this request, or if the request does not have a session, creates one.



Tuna TÖRE





12 years ago
JSP

Tim Holloway wrote:For ant to be able to read and execute an encrypted build.xml you'd either need to store build.xml in an encypted filesystem or modify Ant so that it could decrypt build.xml.

Realistically, it's better just to hide the password someplace where it can't be seen by casual viewers and pass it in as an externally-supplied property. You could also make the Ant script prompt for a password, but as a rule, Ant scripts should avoid being interactive.



Thanks I think you are right. it would be better to get it with an enternally-supplied property or I can use prompts.

Tuna TÖRE
12 years ago
I would like to encrypt build.properties file and use the password stored inside for my build.xml file.?

I would like to enter the database password inside build.properties file and use it by decrypting it using ANT ?

Thanks


Tuna TÖRE
12 years ago
First change your classes by the above classes (because I have changed classes a little) then try again calling from xhtml page.
It will work as you expect, there are some typos inside your code...

Tuna TÖRE
12 years ago
JSF
Try the code below, it will work as you expected
May be you can modify it, but first you should understand that two repeat tags are only required if you want to iterate like in two for statement




otherwise only one repeat tag is enough.

DynamicDataLoadGraph class


DynamicDataLoadGraphObject class



index.html class



Tuna TÖRE
12 years ago
JSF
If you are using Facelet view Tech for the JSF development, try




look at these web sites for further reference
http://www.jsftoolbox.com/documentation/facelets/10-TagReference/facelets-ui-repeat.html
http://facelets.java.net/nonav/docs/dev/docbook.html#template-repeat

Tuna TÖRE
12 years ago
JSF
Yes, both of them do the same thing.
Initializing the JavaServer Faces framework's FacesContext

Tuna TÖRE
12 years ago
JSF
Because the JSF techology build on the J2EE technology and the JSF framework must be started by using URL such as Index.faces.



Users can call Index.html like the code you mentioned and then the FacesServlet will be initialized by mapping Index.faces url to FacesServlet in your web.xml file.
But if you dont want to use refresh the function of HTML code, you can change your FacesServletMapping.

example



By doing that you can for example create a .jsp page under the file structure (/appName/jsf/pages/index.jsp). However by doing that users must know the index page URL
12 years ago
JSF

Ulf Dittmer wrote:You're right that there is no "need" to build a web app to access a DB; a desktop app would work just as well (assuming it can be installed wherever it's needed). Prior to 1994 or so, no web apps existed at all, and the world was able to access its DBs just fine :-)



what a good period of time

Tuna TÖRE