Help coderanch get a
new server
by contributing to the fundraiser

Christopher Au

Greenhorn
+ Follow
since Jul 26, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Christopher Au

Hi,

would it not be faster if we were to take this approach, otherwise we will need to wait for the file to come through completely (this will be byte served to us) and then we will then need to byte serve the pdf to the browser.
13 years ago
Hi,

I have the following situation. There is a pdf streaming servlet provided by a vendor which not accessible to the outside world as the data is sensitive. What we would like to is write a proxy servlet which can pass the pdf streams back to the browser, the reason for this proxy servlet is to do some authorization to ensure that the person who is logged does indeed have access to the PDFs. If anyone could offer some example code that would be greatly appreciated.

Thanks

Lasher
13 years ago
Hi,

I am studying for the scjp I noticed that you can have code like this



When you instantiate the class Test the value for x is 1 is this another form of constructor or is it something else.

Thanks
Hi,

I have a problem where I am trying to do the following



Usually when you do a href the text between the <a href>text</a> are underlined with the blue text. However when I place the escapeXml variable set to false the href text is no longer underlined and blue colour. I was wondering why this is the case.

The reason why the escapeXml is required is because in my c:out the variable holds some data which has html tags like <p> is generated by another system if I did not use escapeXml the tags would be printed to screen instead of rendered.

thanks
16 years ago
JSP
Hi,

I am writing some custom tags at the moment and I was wondering instead of passing strings and integers as attributes to this custom tag. Is it possible to pass an Object to the custom tag. From what I have read it seems to be possible but when I tried it Eclipse was not too happy about it. I am using jstl 1.1

Thanks
16 years ago
JSP
Hi,

I was reading the following post

https://coderanch.com/t/405877/java/java/Dynamic-Casting

and in it a comment was about why dynamic casting was needed.

lets say you are using castor and you have generated some files which need to be loaded and instantiated so that you can use these classes immediately. Would dynamic casting be of use in this situation.

Hope this does not sound like a complete idiotic question.

Thanks

Chris
16 years ago
I would like to know whether it is possible to take a xml file and then get an java object equivalent. I have been able to use castor to generate classes from a schema generated from an xml file, however from what I can gather we cannot use those generated classes until they are compiled and placed into the classpath. If what I am asking is not possible I would like to know is how what alternatives do I have.

Thanks

Chris
Hi,

I want to see whether this is the right way of attempting this.

I have the following












Currently I have 2 services one responsible for persisting the login object which also persists the employee object at the same time.

the other service is responsible for save timesheets.



When I call my timesheet service my timesheet gets persisted but not my tasks

is there a reason why

thanks
Hi,

I would like to know why my my HomeAddress field is not getting created. Everything else is getting created.



Thanks
Sorry one more thing I forgot to mention. What I want to know is whether setting data with the spring approach where everything is wired together is that a correct approach? Or should i be populating each object separately and then have a method inside my user class to add the address object
Hi,

I would like to know the best way to place data into the properties field for composed classes.

Lets say I have a class User who has a reference to class Address.

If I was using the spring the recommendation is to use the domain object inside the view layer and data will go directly into the model. So in this case I can map the view layer directly into both the user and address in 1 go.

How should I do it if I was not using spring. Should I have to write methods in my user class to say I am registering an Address and then pass the address object over for data collection.

Thanks
Hi,

I have a situation where I need to work out the price of a product based on such things as productcode, length etc. I need to feed this into a CRM system and then the CRM system will return the price which I will then set into the price property of my product object.

I understand under spring the service layer is responsible for doing such things, my question is whether the model object should call the service layer and get the price or should some other layer call the service layer and then the service layer is responsible for setting the price into my product object.

Thanks
Hi,

lets say I have a model which has classes for user details, addresses, some marketing etc.

Let's say I have a formbean which collects information from the 3 different classes.

What is the best approach to instantiate the model beans and populate them from the form bean whilst allowing for loose coupling. What I mean by loose coupling is ensuring that if I extend address and add a couple more fields I can still use the subclass with minimal problems.

Sorry if this sounds a bit messy

Thanks
Hi,

I would like some advice on how to model the the following if anyone could help it would be appreciated.

I would like to use composition but decoupling it as much as possible.

With Spring this is possible because the instantiation is done via Data Injection. So I as long as I use an interface as a reference and inject different classes which implement that interface this can be achieved.

What I would like to know is how this can be achieved without DI.

Regards,

Chris
Hi,

I have a user table which collects such data as residential address and postal address, both addresses are mandatory and I wish to store them on the same table.

I want to use EJB3 + JPA to deal with this situation.

I believe under EJB3 specification that you are required to have the field name as address_id on my user table. This is ok for 1 of the fields what about the other address field.

I can use a joining table for the other address but I want to avoid this.

Thanks

Chris