Novell Home

Validating URLs with the NSL Web Wizard

Novell Cool Solutions: Feature

Digg This - Slashdot This

Posted: 5 Jul 2006
 

Problem

A Forum reader asked the following question:

"We have Round Robin DNS enabled for many of our web applications. When I setup the application with a URL like http:\\myapp.mycompany.com, it works great. But sometimes the URL will be http:\\myapp2.mycompany.com and the script will not work. Is there anyway to use wildcards in URL definition? It would look something like this: http:\\myapp*.mycompany.com

I have tried to find a way to check a valid URL, I saw that GetURL and IF would help me to do that. I can see that GetURL is only available for Web Scripts, but I'd like to use Advanced Web Applications Definitions (Web Wizard). Is there a way to resolve my problem in this scenario?"

And here's a reply from Ivan ...

Solution

Well, it works with Advanced Web applications Definitions (Web Wizard) - I did it manually and it's OK. (When I tried converting the definition to a real script, the script is created but nothing happens when I go back to the URL.)

What I did was :

1. Create a new web application choosing Web wizard script and fill "mydomain.com" in the URL field (not http://myapp.mydomain.com).

2. Use Site\EndSite command and MatchDomain for both of my Round robin application URL. For example, to access http://myapp.mydomain.com the DNS will redirect to either http://myappDNS1.mydomain.com or http://myappDNS2.mydomain.com.

The script would be:

# === Initial Login ===
Site Login -userid "myCred" -initial
 MatchDomain "myappDNS1.mydomain.com"
 MatchForm #1 -name "_LoginForm"
 MatchField #1:1 -name "Username" -type "text"
 MatchField #1:2 -name "Password" -type "password"
 MatchField #1:3 -name "" -type "submit"
EndSite

SetPrompt "Enter login credentials"
TextInput #1:1 -value "$Username"
TextInput #1:2 -value "$Password"
FocusInput #1:2 -focus "true"
PressInput
EndScript


# === Initial Login ===
Site Login -userid "myCred" -initial
 MatchDomain "myappDNS2.mydomain.com"
 MatchForm #1 -name "_LoginForm"
 MatchField #1:1 -name "Username" -type "text"
 MatchField #1:2 -name "Password" -type "password"
 MatchField #1:3 -name "" -type "submit"
EndSite

SetPrompt "Enter login credentials"
TextInput #1:1 -value "$Username"
TextInput #1:2 -value "$Password"
FocusInput #1:2 -focus "true"
PressInput


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell