Search Results

Search found 7914 results on 317 pages for 'valid xhtml'.

Page 53/317 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • Can I check the validity of a single DataMapper property?

    - by Nathan Long
    In a custom DataMapper setter, I'd like to check whether the value I'm setting is valid or not. For instance: class ToastMitten include DataMapper::Resource property :id, Serial property :wearer, Enum['Chuck Norris', 'Jon Skeet'] property :first_worn_at, DateTime def wearer=(name) super if wearer.valid? # How can I do this? first_worn_at = Time.now end end end t = ToastMitten.new t.wearer = 'Nathan Long' # invalid value; do NOT set first_worn_at t.wearer = 'Jon Skeet' # valid value; set first_worn_at Can I check the validity of a single property like this without calling valid? on the object itself and looking through all the errors?

    Read the article

  • Using IDataErrorInfo and setting Validation.HasError style

    - by Gaurav
    In WPF using IDataErrorInfo and Style I want to create form where I can provide end user three different status while validating data To make the scenario more clear 1) I have textbox next to it I have icon which provides end user what kind of input textbox expects - Initial status with information icon 2) As soon as user enter data it validates it and decides whether it is valid or not - most of the time it will show cross (X) icon saying invalid data 3) As it is validating on UpdateSourceTrigger="PropertyChanged" it will turn cross icon to green check mark as soon as it gets validated i.e [ ] i (tooltip- Any valid user name ) [Ga ] X (tooltip- Invalid user name. Must be 5 char long) [Gaurav ] * (it will show only correct icon, meaning valid value) How can I achieve this using IDataErrorInfo and Style, I tried doing that but as soon as my form gets loaded it invalidates all the data and shows cross icon at the first time. I want to show different tooltip and different icon for three states (Initial info, Invalid data, Valid data)

    Read the article

  • preg_replace, exact opposite of a preg_match

    - by SoLoGHoST
    I need to do a preg_replace for the exact opposite of this preg_match regular expression: preg_match('#^(\w+/){0,2}\w+\.\w+$#', $string); So I need to replace all strings that are not valid with an empty string - '' So it needs to remove the first / and last / if found, and all non-valid characters, that is the only valid characters are A-Z, a-z, 0-9, _, ., and / (if it's not the first or last characters of the string). How can I accomplish this with the preg_replace? Thanks :)

    Read the article

  • MySQL-problem when baking with CakePHP.

    - by timkl
    I am currently reading "Beginning CakePHP:From Novice to Professional" by David Golding. At one point I have to use the CLI-command "cake bake", I get the welcome-screen but when I try to bake e.g. a Controller I get the following error messages: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Applications/MAMP/htdocs/blog/cake/libs/model/datasources/dbo/dbo_mysql.php on line 117 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/blog/cake/libs/model/datasources/dbo/dbo_mysql.php on line 122 Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/blog/cake/libs/model/datasources/dbo/dbo_mysql.php on line 130 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/blog/cake/libs/model/datasources/dbo/dbo_mysql.php on line 154 Error: Your database does not have any tables. I suspect that the error-messages has to do with php trying to access the wrong mysql-socket, namely the default osx mysql-socket - instead of the one that MAMP uses. Hence I change my database configurations to connect to the UNIX mysql-socket (:/Applications/MAMP/tmp/mysql/mysql.sock): class DATABASE_CONFIG { var $default = array( 'driver' => 'mysql', 'connect' => 'mysql_connect', 'persistent' => false, 'host' =>':/Applications/MAMP/tmp/mysql/mysql.sock', // UNIX MySQL-socket 'login' => 'my_user', 'password' => 'my_pass', 'database' => 'blog', 'prefix' => '', ); } But I get the same error-messages with the new socket: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock:3306' (2) in /Applications/MAMP/htdocs/blog/cake/libs/model/datasources/dbo/dbo_mysql.php on line 117 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/blog/cake/libs/model/datasources/dbo/dbo_mysql.php on line 122 Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/blog/cake/libs/model/datasources/dbo/dbo_mysql.php on line 130 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/blog/cake/libs/model/datasources/dbo/dbo_mysql.php on line 154 Error: Your database does not have any tables. Also, even though I use the UNIX-socket that MAMP show on it's welcome-screen, CakePHP loses the database-connection, when using this socket instead of localhost. Any ideas on how I can get bake to work?

    Read the article

  • Can you restrict entering an invalid entries with jquery ui autocomplete

    - by oo
    when using the jquery ui autocomplete, i would thought there would be an option to force only valid key entry based on the list. Is there anyway to not allow invalid keys so you can only enter valid items in the list? if my list has (csharp, java, python) i can start typing "abcds . ." and it lets me type it in. I want only valid entries to be allowed.

    Read the article

  • Edit Distance in Python

    - by Alice
    I'm programming a spellcheck program in Python. I have a list of valid words (the dictionary) and I need to output a list of words from this dictionary that have an edit distance of 2 from a given invalid word. I know I need to start by generating a list with an edit distance of one from the invalid word(and then run that again on all the generated words). I have three methods, inserts(...), deletions(...) and changes(...) that should output a list of words with an edit distance of 1, where inserts outputs all valid words with one more letter than the given word, deletions outputs all valid words with one less letter, and changes outputs all valid words with one different letter. I've checked a bunch of places but I can't seem to find an algorithm that describes this process. All the ideas I've come up with involve looping through the dictionary list multiple times, which would be extremely time consuming. If anyone could offer some insight, I'd be extremely grateful. Thanks!

    Read the article

  • How do I make the following interaction with mySQL more efficient?

    - by Travis
    I've got an array that contains combinations of unique MySql IDs: For example: [ [1,10,11], [2,10], [3,10,12], [3,12,13,20], [4,12] ] In total there are a couple hundred different combinations of IDs. Some of these combinations are "valid" and some are not. For example, [1,10,11] may be a valid combination, whereas [3,10,12] may be invalid. Combinations are valid or invalid depending on how the data is arranged in the database. Currently I am using a SELECT statement to determine whether or not a specific combination of IDs is valid. It looks something like this: SELECT id1 FROM table WHERE id2 IN ($combination) GROUP BY id1 HAVING COUNT(distinct id2) = $number ...where $combination is one possible combination of IDs (eg 1,10,11) and $number is the number of IDs in that combination (in this case, 3). An invalid combination will return 0 rows. A valid combination will return 1 or more rows. However, to solve the entire set of possible combinations means looping a couple hundred SELECT statements, which I would rather not be doing. I am wondering: Are there any tricks for making this more efficient? Is it possible to submit the entire dataset to mySQL in one go, and have mySQL iterate through it? Any suggestions would be much appreciated. Thanks in advance!

    Read the article

  • Two different tables or just one with bool column?

    - by Aidas
    We have two tables: OriginalDocument and ProcessedDocument. In the first one we put an original, not processed document. After it's validated and processed (converted to our xml format and parsed), it's put into Document table. Processed document can be valid or invalid. Which makes more sense: have two different tables for valid and invalid documents or just have one with 'Valid' column? Some of the columns (~5-7) are irrelevant for invalid document. Storing both invalid and valid documents would also make Document table filled with 'NULL' columns (if document is invalid, information like document number, receiver can be unknown). What else should we consider and weigh, when making this decision?

    Read the article

  • Referencing CDI producer method result in h:selectOneMenu

    - by user953217
    I have a named session scoped bean CustomerRegistration which has a named producer method getNewCustomer which returns a Customer object. There is also CustomerListProducer class which produces all customers as list from the database. On the selectCustomer.xhtml page the user is then able to select one of the customers and submit the selection to the application which then simply prints out the last name of the selected customer. Now this only works when I reference the selected customer on the facelets page via #{customerRegistration.newCustomer}. When I simply use #{newCustomer} then the output for the last name is null whenever I submit the form. What's going on here? Is this the expected behavior as according to chapter 7.1 Restriction upon bean instantion of JSR-299 spec? It says: ... However, if the application directly instantiates a bean class, instead of letting the container perform instantiation, the resulting instance is not managed by the container and is not a contextual instance as defined by Section 6.5.2, “Contextual instance of a bean”. Furthermore, the capabilities listed in Section 2.1, “Functionality provided by the container to the bean” will not be available to that particular instance. In a deployed application, it is the container that is responsible for instantiating beans and initializing their dependencies. ... Here's the code: Customer.java: @javax.persistence.Entity @Veto public class Customer implements Serializable, Entity { private static final long serialVersionUID = 122193054725297662L; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Id @GeneratedValue() private Long id; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } @Override public String toString() { return firstName + ", " + lastName; } @Override public Long getId() { return this.id; } } CustomerListProducer.java: @SessionScoped public class CustomerListProducer implements Serializable { @Inject private EntityManager em; private List<Customer> customers; @Inject @Category("helloworld_as7") Logger log; // @Named provides access the return value via the EL variable name // "members" in the UI (e.g., // Facelets or JSP view) @Produces @Named public List<Customer> getCustomers() { return customers; } public void onCustomerListChanged( @Observes(notifyObserver = Reception.IF_EXISTS) final Customer customer) { // retrieveAllCustomersOrderedByName(); log.info(customer.toString()); } @PostConstruct public void retrieveAllCustomersOrderedByName() { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Customer> criteria = cb.createQuery(Customer.class); Root<Customer> customer = criteria.from(Customer.class); // Swap criteria statements if you would like to try out type-safe // criteria queries, a new // feature in JPA 2.0 // criteria.select(member).orderBy(cb.asc(member.get(Member_.name))); criteria.select(customer).orderBy(cb.asc(customer.get("lastName"))); customers = em.createQuery(criteria).getResultList(); } } CustomerRegistration.java: @Named @SessionScoped public class CustomerRegistration implements Serializable { @Inject @Category("helloworld_as7") private Logger log; private Customer newCustomer; @Produces @Named public Customer getNewCustomer() { return newCustomer; } public void selected() { log.info("Customer " + newCustomer.getLastName() + " ausgewählt."); } @PostConstruct public void initNewCustomer() { newCustomer = new Customer(); } public void setNewCustomer(Customer newCustomer) { this.newCustomer = newCustomer; } } not working selectCustomer.xhtml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title>Auswahl</title> </h:head> <h:body> <h:form> <h:selectOneMenu value="#{newCustomer}" converter="customerConverter"> <f:selectItems value="#{customers}" var="current" itemLabel="#{current.firstName}, #{current.lastName}" /> </h:selectOneMenu> <h:panelGroup id="auswahl"> <h:outputText value="#{newCustomer.lastName}" /> </h:panelGroup> <h:commandButton value="Klick" action="#{customerRegistration.selected}" /> </h:form> </h:body> </html> working selectCustomer.xhtml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title>Auswahl</title> </h:head> <h:body> <h:form> <h:selectOneMenu value="#{customerRegistration.newCustomer}" converter="customerConverter"> <f:selectItems value="#{customers}" var="current" itemLabel="#{current.firstName}, #{current.lastName}" /> </h:selectOneMenu> <h:panelGroup id="auswahl"> <h:outputText value="#{newCustomer.lastName}" /> </h:panelGroup> <h:commandButton value="Klick" action="#{customerRegistration.selected}" /> </h:form> </h:body> </html> CustomerConverter.java: @SessionScoped @FacesConverter("customerConverter") public class CustomerConverter implements Converter, Serializable { private static final long serialVersionUID = -6093400626095413322L; @Inject EntityManager entityManager; @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { Long id = Long.valueOf(value); return entityManager.find(Customer.class, id); } @Override public String getAsString(FacesContext context, UIComponent component, Object value) { return ((Customer) value).getId().toString(); } }

    Read the article

  • Webrat select_date selector failure.

    - by sharas
    Code in steps file: select_date user.date_of_birth, :from => "Date of birth" Selector fail When I register with valid user credentials # features/step_definitions/authentication_steps.rb:2 Could not find field: "user_date_of_birth_1i_1i" (Webrat::NotFoundError) ./features/step_definitions/authentication_steps.rb:9:in `/^I register with valid user credentials$/' features/authentication.feature:6:in `When I register with valid user credentials' HTML output seems to be normal: <select name="user[date_of_birth(1i)]" id="user_date_of_birth_1i"> Is it bug, or I am doing something wrong

    Read the article

  • Programming style question on how to code functions

    - by shawnjan
    Hey all! So, I was just coding a bit today, and I realized that I don't have much consistency when it comes to a coding style when programming functions. One of my main concerns is whether or not its proper to code it so that you check that the input of the user is valid OUTSIDE of the function, or just throw the values passed by the user into the function and check if the values are valid in there. Let me sketch an example: I have a function that lists hosts based on an environment, and I want to be able to split the environment into chunks of hosts. So an example of the usage is this: listhosts -e testenv -s 2 1 This will get all the hosts from the "testenv", split it up into two parts, and it is displaying part one. In my code, I have a function that you pass it in a list, and it returns a list of lists based on you parameters for splitting. BUT, before I pass it a list, I first verify the parameters in my MAIN during the getops process, so in the main I check to make sure there are no negatives passed by the user, I make sure the user didnt request to split into say, 4 parts, but asking to display part 5 (which would not be valid), etc. tl;dr: Would you check the validity of a users input the flow of you're MAIN class, or would you do a check in your function itself, and either return a valid response in the case of valid input, or return NULL in the case of invalid input? Obviously both methods work, I'm just interested to hear from experts as to which approach is better :) Thanks for any comments and suggestions you guys have!

    Read the article

  • Help with javascript form validation

    - by zac
    I am getting a headache with form validation and hoping that the kind folks here can give me a hand finishing this sucker up I have it basically working except the email validation is very simplistic (only alerts if it is blank but does not actually check it if is a valid email address) and I am relying on ugly alerts but would like to have it reveal a hidden error div instead of the alert. I have this all wrapped up with an age validation check too.. here are the important bits, minus the cookie scripts function checkAge() { valid = true; if ( document.emailForm.email.value== 0 ) { alert ( "Please enter your email." ); valid = false; } if ( document.emailForm.year.selectedIndex == 0 ) { alert ( "Please select your Age." ); valid = false; } var min_age = 13; var year = parseInt(document.forms["emailForm"]["year"].value); var month = parseInt(document.forms["emailForm"]["month"].value) - 1; var day = parseInt(document.forms["emailForm"]["day"].value); var theirDate = new Date((year + min_age), month, day); var today = new Date; if ( (today.getTime() - theirDate.getTime()) < 0) { var el = document.getElementById('emailBox'); if(el){ el.className += el.className ? ' youngOne' : 'youngOne'; } document.getElementById('emailBox').innerHTML = "<img src=\"emailSorry.gif\">" createCookie('age','not13',0) return false; } else { //this part doesnt work either document.getElementById('emailBox').innerHTML = "<img src=\"Success.gif\">" createCookie('age','over13',0) return valid; }; }; var x = readCookie('age'); window.onload=function(){ if (x=='null') { }; if (x=='over13') { }; if (x=='not13') { document.getElementById('emailBox').innerHTML = "<img src=\"emailSorry.gif\">"; }; } can someone please help me figure a better email validation for this bit: if ( document.emailForm.email.value== 0 ) { alert ( "Please enter your email." ); valid = false; } and how would I replace the alert with something that changes a class from hidden to visible? Something like? document.getElementById('emailError').style.display='block'

    Read the article

  • Better Java method Syntax? Return early or late? [closed]

    - by Gandalf
    Duplicate: Should a function have only one return statement? and Single return or multiple return statements? Often times you might have a method that checks numerous conditions and returns a status (lets say boolean for now). Is it better to define a flag, set it during the method, and return it at the end : boolean validate(DomainObject o) { boolean valid = false; if (o.property == x) { valid = true; } else if (o.property2 == y) { valid = true; } ... return valid; } or is it better/more correct to simply return once you know the method's outcome? boolean validate(DomainObject o) { if (o.property == x) { return true; } else if (o.property2 == y) { return true; } ... return false; } Now obviously there could be try/catch blocks and all other kinds of conditions, but I think the concept is clear. Opinions?

    Read the article

  • rails, activerecord callbacks not saving

    - by Joseph Silvashy
    I have a model with a callback that runs after_update: after_update :set_state protected def set_state if self.valid? self.state = 'complete' else self.state = 'in_progress' end end But it doesn't actually save those values, why not? Regardless of if the model is valid or not it won't even write anything, even if i remove the if self.valid? condition, I can't seem to save the state. Um, this might sound dumb, do I need to run save on it?

    Read the article

  • Require a default constructor in java?

    - by jdc0589
    Is there any way to require that a class have a default (no parameter) constructor, aside from using a reflection check like the following? (the following would work, but it's hacky and reflection is slow) boolean valid = false; for(Constructor<?> c : TParse.class.getConstructors()) { if(c.getParameterTypes().length == 0) { valid = true; break; } } if(!valid) throw new MissingDefaultConstructorException(...);

    Read the article

  • preg_match in php

    - by Satish
    I want to use preg_match() such that there should not be special characters such as `@#$%^&/ ' in a given string. For example : Coding : Outputs valid : Outputs Invalid(String beginning with space) 12Designing : outputs invalid Project management :Outputs valid (space between two words are valid) 123 :Outputs invalid

    Read the article

  • How to check if numbers are in correct sequence?

    - by Nazariy
    I have a two dimensional array that contain range of numbers that have to be validated using following rules, range should start from 0 and follow in arithmetic progression. For example: $array = array(); $array[] = array(0);//VALID $array[] = array(0,1,2,3,4,5);//VALID $array[] = array("0","1");//VALID $array[] = array(0,1,3,4,5,6);//WRONG $array[] = array(1,2,3,4,5);//WRONG $array[] = array(0,0,1,2,3,4);//WRONG what is most efficient way to do that in php? UPDATE I forgot to add that numbers can be represented as string

    Read the article

  • Passing a pointer to a function that doesn't match the requirements of the formal parameter

    - by Andreas Grech
    int valid (int x, int y) { return x + y; } int invalid (int x) { return x; } int func (int *f (int, int), int x, int y) { //f is a pointer to a function taking 2 ints and returning an int return f(x, y); } int main () { int val = func(valid, 1, 2), inval = func(invalid, 1, 2); // <- 'invalid' does not match the contract printf("Valid: %d\n", val); printf("Invalid: %d\n", inval); /* Output: * Valid: 3 * Invalid: 1 */ } At the line inval = func(invalid, 1, 2);, why am I not getting a compiler error? If func expects a pointer to a function taking 2 ints and I pass a pointer to a function that takes a single int, why isn't the compiler complaining? Also, since this is happening, what happens to the second parameter y in the invalid function?

    Read the article

  • Is the XML processing instructions node mandatory ?

    - by ereOn
    I had a discussion with a colleague of mine about the XML processing instructions node (I'm talking about this = <?xml version="1.0" encoding="UTF-8"?>). I believe that for something to be called "valid XML", it requires a processing instructions node. My colleague states that the processing instruction node is optionnal, since the default encoding is UTF-8 and the version is always 1.0. This make sense, but what does the standard says ? In short, given the following file: <books> <book id="1"><title>Title</title></book> </book> Can we say that: It is valid XML ? It is a valid XML node ? It is a valid XML document ? Thank you very much.

    Read the article

  • C#, why does Convert.ToBoolean("0") fail?

    - by JL
    I know that trying to convert string "0" to boolean will fail, I also know how to fix this, thanks to Jon Skeets answers on other questions. What I would like to know is WHY does C# not recognise "0" as a valid input for a boolean conversion, surely you could look at it like 0 = false, 1 = true, or even -1 = false and 0 = true, anyways, my logic tells me that it could be a valid input, so is there a very good reason why its not? My bet is old vb6 would be able to recognize the string input "0" as valid.

    Read the article

  • Trouble with jQuery Form Validation

    - by Sennheiser
    I'm making a form that has the following validation rules: no fields are "required", but if you enter an email, it must be valid, and if you enter a password, it must be at least 6 characters and match the confirm password field value. The form works flawlessly with no validation so I know it's not a PHP or HTML problem. Here's the jQuery code handling the form: $('#success').hide(); $('#pwerror').hide(); $('#emailError').hide(); $('#subSet').live('click',function() { //if any of the fields have a value if($("#chfn").val() != "" || $("#chln").val() != "" || $("#chpw").val() != "" || $("#chpw2").val() != "" || $("#chem").val() != "") { $ev = 1; $pv = 1; //validates an email if there is one, trips the valid variable flag if($("#chem").val() != "") { $("#profSet").validate({ rules: { chem: { email: true }, chpw: { required: false, minlength: 6 }, chpw2: { required: false, minlength: 6, equalTo: $("#chpw").val() } }, messages:{ chpw2: { equalTo: "Passwords must be the same." }, chpw: { minlength: "Password must be at least 6 characters." } } }); if(!($("#profSet").valid())) { $ev = 0; } } //if either password field is filled, start trying to validate it if($("#chpw").val() != "" || $("#chpw2").val() != "") { if(!($("#profSet").valid())) { $pv = 0; } } //if those two were valid if($pv == 1 && $ev == 1) { $.post('php/profSet.php', $('#profSet').serialize(), function(){ $('#profSet').hide(); $('#success').show(); }); } //if either was invalid, the error was already tripped, and this code exits here } }); The problem I'm having now is that the "passwords must be the same" error keeps getting triggered even if both fields are blank, or if they actually are the same. Therefore, the form cannot submit. Any help?

    Read the article

  • Why does Convert.ToBoolean("0") fail?

    - by JL
    I know that trying to convert string "0" to boolean will fail, I also know how to fix this, thanks to Jon Skeets answers on other questions. What I would like to know is WHY does C# not recognize "0" as a valid input for a boolean conversion, surely you could look at it like 0 = false, 1 = true, or even -1 = false and 0 = true, anyways, my logic tells me that it could be a valid input, so is there a very good reason why its not? My bet is old vb6 would be able to recognize the string input "0" as valid.

    Read the article

  • some clarification on accept field in http request

    - by Salvador Dali
    Can anyone enlighten me on the following question: What do different fields in accept field in HTTP request mean? I can understand the basics that through accept the client is telling the server what type of information it is waiting to receive, so for example: Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 This way the client will tell the server that it can understand three following formats: text/html application/xhtml+xml application/xml But can someone tell me what this q values mean and that / Also if I have any flaws in my understanding - please tell me.

    Read the article

  • Glassfish JSF/EAR Apache 2.2 proxy_ajp_mod Referred Content Missing (images/links/etc)

    - by BillR
    Full disclosure: Since this seems to be more of a configuration issue, I deleted this from Stack (where it wasn't getting any response) and reposted here. The problem is how to change the requestContextPath served up by Glassfish behind mod_proxy_ajp. The site/app runs fine if connecting directly to Glassfish port 8080 which is ultimately not what I want to do. So I need help with configuration for my servers and jsf deployment. I can see the issue but don't know how to resolve it. It has to do with the requestContextPath. Simply put, Apache directs to http://mysite.com/welcome.xhtml which is correct and what I want, but the page is minus the images and styles. The issue is Glassfish itself is still pointing to http://mysite.com/myapp/*. So all links it serves in the app/site still refer via the requestContextPath. That is the /myapp/* part of http://mysite.com/myapp/welcome.xhtml. When I look in the page source, images which are referred to with relative links still point to the requestContextPath (that is, /myapp/). This is fixable but a real pain. However with page links I can't set the relative path. If I hover over the contact page link I see http://mysite.com/myapp/contact.xhtml, and if I click it, I get 404. You can see the /myapp/ context path in the page source as well. If I type in the URL http://mysite.com/contact.xhtml I get the page minus its referred links (requestContextPath). On Apache ProxyPass / ajp://littlewalterserver:8009/myapp-web/ ProxyPassReverse / ajp://littlewalterserver:8009/myapp_Project-web On Glassfish asadmin create-network-listener --listenerport 8009 --protocol http-listener-1 --jkenabled true jk-connector I have tried going in to Glassfish and setting the web app as the default web app. I have changed the / in glassfish-web.xml (and checked to make sure it was the same in the EAR file). How can I get Glassfish to not include the /myapp/ context in the URLs? This has to be easy if you know how, but I don't know how, can someone help out here? Thanks.

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >