Aaron Wilt

Ranch Hand
+ Follow
since Sep 26, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aaron Wilt

Hi all, hopefully this is a fairly basic question but I've got an HTML string that's saved in the database. I need it to render on my product page (ex, string has "<strong>Running Shoes</strong>" and it needs to render on the JSP as bold, etc)

Currently I'm trying to use <s roperty like this:

<s roperty value='product.longDescription'/>

to get the desired member from my Product object.

What's the best method to have the JSP actually render this HTML string and not just display all the tags?

Thanks!
Aaron
16 years ago
i tried setting disabled="true" on a field then submitting it, but it still showed up in the url.

i thought perhaps writing a js method to spin through all the form elements onsubmit and then manually creating the URL might be the only way... hoping for another way though.

question: does it matter that these elements are hidden?
[ January 09, 2008: Message edited by: Aaron Wilt ]
Hi, hopefully this is the correct forum.

My java web project uses jsp and struts, but this question i think is more html form related.

I have an web app that submits a form for searching products. there are tons of advanced search options besides just your normal criteria string. categories, price range, product name, model, etc etc.

As a result, our URL looks huge (much bigger than just this in the real app): http://site.com/search?model=&productName=my+product&range=&category=

Most of the time, just one of these are filled out. Is there a way to have the form not submit empty string for all of these unused form fields when submitting the form so my URLs look a bit cleaner?

Thanks!
Aaron
Hi all,

As the title suggests I'm trying to do a server side include of a .php file in my jsp such that apache will run the php and of course tomcat handles the .jsp.

Here's what I've got so far:

-------------------------------------
httpd.conf in the section for my virtual server:

SetEnvIf Request_URI "/blog*" no-jk

<IfModule mod_jk.c>
JkMount /* ajp13
</IfModule>
</VirtualHost>

--------------------------------------

It basically appears that the

SetEnvIf Request_URI "/blog*" no-jk

line simply does not work.

the /blog directory is outside of my war in my apache document root. It holds .php and .css files for my wordpress blog.

Whenever I try to access a php file in the blog directory it tries to send the request to tomcat instead.

If I take out the SetEnvIf and instead put lots of "JkMount /*.XXX ajp13" where XXX is EVERY file extension EXCEPT for .php extension, then the .php files will run in apache perfectly and the SSI in my .jsp works -- however that means when the .php files run if they reference any .css or .js or images, it's going to send the request to tomcat under the base /appname directory, meaning now the relative paths to those files are broken (they live under /blog but because of the JkMount /*.css they now start looking in tomcat /appname).

Any idea what I could try to do in order to fix this?

Basically what I need is this:

a) directory "php" in my war file where apache will execute everything in that directory and

and

b) the wordpress /blog directory, that lives outside of my war, to have everything inside it be executed by apache and allowing all other stuff (except for what's in a) to be executed by tomcat.

Ideas?

Thanks!!

Aaron
16 years ago
So we figured out the problem. apparently the tomcat wasn't clearing out old .class files in the work directory when we deployed a new war... so the annotations process was going through trying to autodetect and it ran into the old class file for the entity that got renamed, and apparently that's what was causing the problem. When we deleted everything out of tomcat's work directory everything was fine.

now that i blew 6 hours on that problem i guess i can do something productive!

Hi Mark,

Yeah I've used eclipse to do the search locally, and our prod servers are on linux and we've used the standard linux search to inspect all the files. the only place it found a reference to the old file was in subversion, our source control system.

Surely there's no way tomcat could be finding an old version of the file in subversion somehow right ?
Hi all, not sure if you can help but I hope you try! :-) This is a very weird problem.

I decided to rename one of my entity objects from ProductSearchCriteria to ProductFilterCriteria. In my local tomcat/eclipse environment everything works great, however when I put my code up on the prod server I get this weird exception:



I've searched many times in my code base, xml files, everywhere for my old class name "ProductSearchCriteria" but it appears NO WHERE. The error occurs when the entity manager is trying to be created. In my persistence.xml I have



so there are no <class> tags that are referencing my old entity name.

I've tried restarting tomcat, restarting the actual box... nothing. Do these entity names get cached somewhere? Any idea what could be going on? I'm at my wits end.

Thank you so much for reading.

Aaron
[ November 30, 2007: Message edited by: Aaron Wilt ]
I bet it's cpanel doing it... we have to start/stop tomcat through cpanel because we're using it to manage virtual hosts/domains.

Possible?
16 years ago
Subject basically says it all... when running tomcat on my local machine the catalina logs seems fairly clean... just exceptions, my log4j info/debug messages... etc.

When I upload the war to my server and run my app, I get all these "Loaded" message for each class that's loaded from each jar file or from my equivalent of the "webapps" directory. Here's an example:


Notice how the "[Loaded" doesn't have INFO or DEBUG etc in typical log4j style... so that makes me think it's some other tomcat logging setting that's only present on my linux server. Any ideas?

Thanks!
Aaron
16 years ago
Hi all,

I'm not a db expert, but my dba told me that for our app we need to set the isolation level to read uncommitted. We're currently using Oracle 10g Express Edition (XE)

So in my persistence.xml I added this:

<property name="hibernate.connection.isolation" value="1" />

the #1 corresponds to read uncommitted of java.sql.Connection.

When I tried to run the app, I got this exception:

java.sql.SQLException: READ_COMMITTED and SERIALIZABLE are the only valid transaction levels

Is this a limitation of Oracle XE ? What would cause this and how can I fix it?

Thanks,
Aaron
Hi Mark, could you give me an example of how this is done?

Thanks for the reply.
Hi, I'm trying to figure out the best way to change the schema values of my annotations as my app moves from dev to test to prod schemas.

My oracle DB schemas look like this:

DevSchema
-tables a, b, c

TestSchema
-tables a, b, c

ProdSchema
-tables a, b, c

My Product Entity class looks like this:

@Entity
@Table(name="DevSchema.a")
Public class Product
{

}

The problem is what happens when I move to test? The @Table name should be "TestSchema.a" yet when I try to make "DevSchema" a variable I get an error saying that the name attribute value must be a constant.

Is there a way I can use Ant to dynamically change all my entities when creating a war ? I didnt think ant could change java files.

Thanks,
Aaron
I'm trying to add a lot of javascript magic to my web app where I'm using prototype.js (http://www.prototypejs.org/), modal dialog controls js/css controls, and effects from http://script.aculo.us/ .

I'm quickly noticing that in a blink of an eye I'm going to have 160kb of .js files downloading.



It's also a java web app so there will be a good amount of dynamic content needing to load, plus probably another 150kb worth of images.

It's not a HUGE concern that 56k dial up users will be kind of slow but if I can slim some of this stuff up that'd be nice.

Is there a target # of kb that one should try to stay under to easily service 56k users? or high speed users?

Is there an easy method I could simulate being on a 56k modem, or a website out there that will test how long it takes a 56k user to download the site on average?

Thanks,
Aaron
Hi Eric, thanks for the reply.

Unfortunately it's the same result



Aaron